I'm trying to create OBJ's using the python bindings for the procedural runtime. I have 4 shapes and I want different shapes to be generated using different rules defined in my CGA - I would normally do this by setting the startRule as an attribute of the shape.
It seems that pyprt does not support setting a StartRule file anymore? this used to be a parameter that could be set for each shape.
as an example I have:
Using the pyprt I've tried to use the shape attributes for this:
Hi Mateo,
we removed support for explicitly setting the start rule in PyPRT 1.1 (2020), there were some problematic edge-cases (styles) and we aimed for simplicity.
How about introducing a "dispatcher" start rule which calls the desired rule based on an (enum) attribute? If you do not want to modify your existing "model" rule you could put the dispatcher into a separate rule file and use import.
Best,
Simon
Hi Simon,
I did end up doing a similar approach to a dispatcher rule and that's all working. Thanks for the suggestion.
Best,
Mateo