Is this still the case in CityEngine 2012.1?
I'm trying to something similar, I have this CGA rule applied to a shape:
Then I have generated the shape. I then have this python script to interrogate it:
attr MyAttribute = true
When I select the generated object, I get this output:
from scripting import *
ce = CE()
shapes = ce.getObjectsFrom(ce.selection)
for shape in shapes:
print ce.getAttributeSource(shape, "/ce/rule/MyAttribute" )
print ce.getAttribute(shape, "/ce/rule/MyAttribute" )
if __name__ == '__main__':
When I delete the generated object, and just select the lot shape, I get this output:
My questions is, within CE 2012.1, is there a way to mark certain geometry from CGA rules and access it from python? My end goal is to mark certain geometry and then allow my python exporter to distinguish between the different geometries so it can export them into a different model file.
['/ce/name', '/ce/rule/randomSeed', '/ce/rule/ruleFile', '/ce/rule/startRule', '0streetWidth\x00', '1streetWidth\x00', '2streetWidth\x00', '3streetWidth\x00', '4streetWidth\x00', 'shapeType']