Chaos Corona Forum

General Category => [ARCHICAD] Bug Reporting => [Archive] Chaos Corona for ARCHICAD => Porting and API => [ARCHICAD] Resolved Bugs => Topic started by: Hathor on 2018-12-01, 02:26:51

Title: saving materials
Post by: Hathor on 2018-12-01, 02:26:51
Hello! At first - thanks for your work!
I create objects for archicad in GDL, and often I include material in the code.
There is a special button in Archicad that can record information about the material in the special type of object, later I can copy this code and paste it into my object.
So people can use my objects and not think about materials, or I can compile a library with my materials.
But I can not do it with Corona, the report shows an error (error in the form of a constant). When I try to add material from this file, it again gives an error (failed to create the material).
I think this is because the dots are in the parameter names. I cannot find this rule in the GDL Reference Guide, but dots in the name are not available.
Title: Re: saving materials
Post by: Hathor on 2018-12-01, 02:30:53
for example - i  tried to update my object Massivator for using it with Corona
Title: Re: saving materials
Post by: emresenoglu on 2018-12-01, 12:52:27
Scattering in ArchiCAD - that is amazing to see. Your plugin works great Svetlana, apart from a few little bugs. Any plans to create the guide video in English?
Title: Re: saving materials
Post by: Hathor on 2018-12-01, 13:12:01
Thanks! It is not full scattering, just with several forms (box, sphere, cylind), it cant copy object on mesh or polygonal slab (
Have not plans to create guide in english, but i wrote interface in english, so i hope it should be clear
Title: Re: saving materials
Post by: emresenoglu on 2018-12-01, 17:11:11
True, however compared to what ArchiCAD offers this is a huge step up. You should consider posting it to ArchiCAD forums - I'm pretty sure it would get a lot of attention there.
Title: Re: saving materials
Post by: Jan Špaček on 2018-12-03, 12:13:10
Hi, thank you for your feedback! I moved this post to the "bug reporting" section of the forum.

I don't have the "save material" button in my ARCHICAD; maybe it is an add-on? However, you are right that it seems to be impossible to write the Corona material parameters in GDL scripts because of the '.' and ':' symbols! I will replace them with underscores; this may break some user projects, so the earlier this change is made the better!
Title: Re: saving materials
Post by: Hathor on 2018-12-03, 13:59:05
Sorry, I forgot. You should activate this button. Here what need to fo
https://archicad-talk.graphisoft.com/viewtopic.php?t=51780
Title: Re: saving materials
Post by: Jan Špaček on 2018-12-10, 15:39:44
Hi, the plugin now uses 'X' instead of '.' and 'Z' instead of ':' in the parameter names. In the long run, I will rename the parameters to use _ and camelCase; this is just a quick hack to maintain backwards compatibility.

Old materials will still contain '.'-s and ':'-s, but you can replace them with 'X' and 'Z' in the exported file and Corona will recognize the parameters.

The update will be available in the next daily build, which I plan to make at the end of the week.
Title: Re: saving materials
Post by: alexhajdu on 2019-07-16, 10:04:45
Exporting surfaces to gsm is working as expected. Closing.