Just downloaded the CityEngine 2020 and was giving it the paces. One thing I noticed is that when I updated the ESRI library including the vegetation rules, is that that the new tree loader is run differently:
@Order(1) @Enum(valuesAttr=_nameEnumValues)
attr Name = "Orange Tree"
and the old one had all the trees listed under @Range:
@Order(1) @Range("Alder Buckthorn","Amazon Sword Plant",...,...,...)
attr Name = "Orange Tree"
From reading the notes in the new CGA version, I understand that the change was done for file lookup speed/performance, and a shorter code to boot.
However, some of the rules that I created using Plant.Loader.Generate now are slightly less flexible. When I look at the Plant.Loader in the inspector tab, under the Plant.Loader selector attributes, I only see the current tree species and none of the other trees. I figured out that if I parameterize the tree name when I call into my code: e.g. Plant.Loader.Generate("Red Hickory") - I can change it. But I don't know ~100 tree species by memory so this is a little inconvenient when I am just trying to get the best "look".
Picture of what is happening in new Plant_Loader cga when called into my other codes (only Orange Tree, no others):
Also, I don't quite understand what is happening now, maybe there is some new documentation on this?
The new code also has a hidden attribute:
@Hidden
attr _nameEnumValues = _getNameEnumValues
And I am getting a yellow caution error from this: "unused attribute_ str array _nameEnumValues()", which seems to drive a bunch of others warnings.
How do I fix this?
Thanks!
Brian