sel=ce.selection() #gives me a shape 'sel' sel.getReports()['asset'] #suggests that the Shape object returned has a getReports method that generates a dictionary, no? reportDict=sel.getReport() #I get no return from this at all.. yet the shape does have report data displaying in the Inspector I certainly don't get a dictionary returned? sel.getReport().has_key('asset') #causes city engine to lock up, it never comes back so I have to kill it, I guess this should not happen? sel.getReport(). #is where it locks up as soon as I hit the 'g' key to enter 'get_key'
Okay, so being on the trial I can not access the export functions to try them out ( a key part of my evaluation) 😞
sel=ce.selection() #gives me a shape 'sel' sel.getReports()['asset'] #suggests that the Shape object returned has a getReports method that generates a dictionary, no? ... model=Model(modelUUID) Can Model be used within the city Engine python script Console? Is 'modelUUID' the equivalent of the 'shapeUUID' that I can return from my shape I generate within the City Engine?
I find no mention of using Class instances in the APi docmentation, is this possible, being a standard part of python?
Am i able to use Class Instances that contain more complex data structures within the global scope of these export scripts?
I assume you are using module based globals within the exportInstances.py script examples to pass data from one function to another?
i.e. one catalogs as the exporter iterates through shapes in the scene and the other uses the data gathered and runs the finishExport() after the export process has completed
from finishModel() to finishExport()
class MyClass: n = 0 c = MyClass def initModel(exportContextUUID, shapeUUID): ctx = ScriptExportModelSettings(exportContextUUID) shape = Shape(shapeUUID) global c c.n = c.n+1 print c.n
I assume that finishModel() is always run before finishExport()?
# Called before the export start. def initExport(exportContextUUID): # Called for each shape before generation. def initModel(exportContextUUID, shapeUUID): # Called for each shape after generation. def finishModel(exportContextUUID, shapeUUID, modelUUID): # Called after all shapes are generated. def finishExport(exportContextUUID):
Am I able to run both and fbx export for unique geometry as well as handle instances as described above in one export step or is is a case of having to run multiple export steps to extract specific data from the scene at each export step?
How do I tear off windows? this is very annoying everything being docked?
Are you going to be moving this to be more pythonic ie object orientated?