I want to batch import and export batches of multiple heightmaps (.tif) using cityengine python API. Has anyone encountered this problem? I'd appreciate it if anyone could point me to how to do this.
hi there,
I don't have a complete solution, but I suggest having a look at this links in the python docs:
hope this points you into the right direction!
Cheers
Jonas
Created scrapbook for fbx batch export of all terrain in 3D view. But it doesn't work. What's the problem?
'''
Created on 2022. 4. 29.
@author: user
'''
from scripting import *
# get a CityEngine instance
ce = CE()
from scripting import *
ce = CE()
if __name__ == '__main__':
layers = ce.getObjectsFrom(ce.scene(), ce.isLayer)
for layer in layers:
objects = ce.getObjectsFrom(layer, ce.isShape)
ems = FBXExportModelSettings()
ems.setOutputPath(ce.toFSPath(r"filepath"))
#set other options
ce.setSelection(objects)
ce.export(objects, ems)
if __name__ == '__main__':
pass
hi again,
First, you should clean up your script:
Then you need also to define how you want to export terrains in your FBXExportModelSettings() e.g. if you want to export all:
ems.setTerrainLayers(ems.TERRAIN_ALL)