POST
|
Just a note for next release, the example in the documentation for the "Import" command, entitled "Combining two facades with a structure", generates "undefined rule" warnings. I wanted to use this technique of filling in rules from imported files, but the warnings tend to make the code editor messy, though it does seem to work fine.
... View more
12-19-2012
10:06 AM
|
0
|
1
|
507
|
POST
|
Is this still the case in CityEngine 2012.1? I'm trying to something similar, I have this CGA rule applied to a shape:
version "2012.1"
attr MyAttribute = true
Lot -->
BuildingMass
LotInner -->
BuildingMass
BuildingMass -->
extrude(20)
Building
Building -->
set(MyAttribute, true)
color(1,1,0)
Then I have generated the shape. I then have this python script to interrogate it:
from scripting import *
ce = CE()
def main():
print
shapes = ce.getObjectsFrom(ce.selection)
for shape in shapes:
print
print shape
print ce.getAttributeList(shape)
print ce.getAttributeSource(shape, "/ce/rule/MyAttribute" )
print ce.getAttribute(shape, "/ce/rule/MyAttribute" )
if __name__ == '__main__':
main()
When I select the generated object, I get this output:
Shape:MyBuilding.cga:Lot
[]
None
None
When I delete the generated object, and just select the lot shape, I get this output:
Shape
['/ce/name', '/ce/rule/randomSeed', '/ce/rule/ruleFile', '/ce/rule/startRule', '0streetWidth\x00', '1streetWidth\x00', '2streetWidth\x00', '3streetWidth\x00', '4streetWidth\x00', 'shapeType']
DEFAULT
None
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.
... View more
12-13-2012
09:09 AM
|
0
|
0
|
419
|
POST
|
Suppose you still want to use a revision control program like perforce for the revision history features. Are there files within a CityEngine workspace that aren't appropriate for adding to version control, such as the .lock files? For example, I see these in my workspace: .attribute_layer .metadata ce.lib I was thinking ce.lib may be appropriate for version control, but I have no idea about the other two.
... View more
12-11-2012
10:29 AM
|
0
|
0
|
278
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|