Python Scripting Notes and Changelog

CityEngine Scripting Interface

The CityEngine scripting interface is based on Jython, a Java implementation of Python. Current version is 2.7.0.
CityEngine comes with the special Jython module scripting containing CityEngine specific commands (see list of classes)

Jython supports almost all modules of the standard Python library. In addition, Jython can include arbitrary Java classes to extend its functionality. Please see the Jython website for more details.



Status Commands
new add/list/removeScriptMenuItems, import/rename/removeProject as well as and listProjects for CE object.
removed ABCExportModelSettings's get/setBaseName functions
new ABCExportModelSettings has get/setCellSize functions.
new SPKMeshExportModelSettings has get/setEmitReports and get/setWriteLog functions.


Status Commands
new get/setLayerPreferences, getSceneHierarchy, getParentGroup, isLayerGroup and isVisible for CE object.
new ABCExportModelSettings and SPKMeshExportModelSettings
new setDatasetFilter for FGDBImportSettings.
new get/setUrl for PortalUploadSettings objects.
new get/setConformNormals for CleanupShapesSettings objects.


Status Commands
new get/setAtlasAddWrapBorder, get/setCreateTextureAtlases and get/setMaxAtlasDim in ExportModelSettings for DAE, FBX, KML, OBJ, RIB and VOB.
new get/setWriteLog and getExportLog in all ExportSettings.


Status Commands
new FBXImportModelSettings
new get/setAlignToTerrain in ImportModelSettings for DAE, OBJ
new setUsername/Password in PortalUploadSettings


Status Commands
new get/setExportDatasetRelationships in FGDBExportModelSettings
new get/setExportFeatures in FGDBExportModelSettings
changed get/setAddObjectAttributes renamed to get/setExportObjectAttributes in FGDBExportModelSettings
new Several new methods in FGDBImportSettings
new setFloat in ImageExportTerrainSettings
new additional argument animate for View3D.restoreBookmark and View3D.setCameraPerspective
note Selection behaviour change in UI changes behaviour of ce.selection(), ce.setSelection() in cases where shape has a model. To get the shape from a selection with shape and model, use ce.getObjectsFrom(ce.selection, ce.isShape)[0] instead of ce.selection()[0]


Status Commands
new get/set for precision details in CEWebSceneExportModelSettings
changed get/setAddModelReports renamed to get/setEmitReports in FGDBExportModelSettings
changed set/getExportContent renamed to set/getExportGeometry in all export settings classes. Enums for setExportGeometry renamed as well.


Status Commands
new setFirstEdge
new setStreetEdges
new separateFaces
new setCameraPoI
new combineShapes
new get/setExportedContent in CEWebSceneExportModelSettings
new get/setReportMode in DAEExportModelSettings and KMLExportModelSettings
new get/setFacesWithHoles, get/setTriangulatedMeshes in FGDBExportModelSettings
new/changed get/setStreetWidthSettings* in GrowStreetSettings
changed New argument in addAttributeLayer to add georeferenced textures.
changed *StreetWidth* changed to *StreetLanes* in AnalyzeGraphSetings


Status Commands
new findByOID
new copy
new mergeLayers
new addBookmark, restoreBookmark, getBookmarks
new exportRPK and settings class RPKExportSettings
new upload and settings class PortalUploadSettings
new Street/Graph operations
  analyzeGraph and settings class AnalyzeGraphSettings
  cleanupGraph and settings class CleanupGraphSettings
  fitStreetWidths and settings class FitStreetWidthSettings
  generateBridges and settings class GenerateBridgeSettings
  simplifyGraph and settings class SimplifyGraphSettings
new Shape operations
  cleanupShapes and settings class CleanupShapeSettings
  textureShapeTool and settings class TexturingSettings
new Terrain operations
  resetTerrain and settings class ResetTerrainSettings
  alignTerrain and settings class AlignTerrainSettings
changed changed field names and values in settings classes of all model exporters
changed WebGLExportModelSettings renamed to CEWebSceneExportModelSettings
changed replaced connectivity methods (such as getNodesFromGraph) by extending getObjectsFrom.
changed replaced getUUID by getOID
removed MI Exporter
removed 3DS Exporter


Status Commands
update updated to Jython 2.5.3
new convertModelsToShapes
new FGDBExportModelSettings
new FGDBExportGraphSettings
new WebGLExportModelSettings
new getSceneCoordSystem
new terrain export settings in all model export classes (e.g. OBJExportModelSettings.setGeneralTerrainLayers)
removed all terrain export format settings classes(e.g. OBJExportTerrainSettings)
removed OBJExportShapeSettings (use model export with shape settings instead)

2011 SR1

Status Commands
update updated to Jython 2.5.2
new getLayer


Status Commands
new getCameraPosition, getCameraRotation, getCameraPoI
new convertToStaticShapes
new setCurveStraight, setCurveSmooth, curveAutoSmooth + settings
new isStaticModel, isStaticModelLayer filters
new createStaticModel, addStaticModelLayer
new alignStaticModels + settings
new setSceneCoordSystem
new importAsStaticModel option for OBJ and DAE import settings
new FGDBImportSettings class
changed Syntax changes in settings classes (commands now in better readable CamelCase)


Status Commands
new ExportTerrainSettings for all model export formats
new VOBExportModelSettings
new @noUIupdate
changed getObjectsFrom moved to class CE


Status Commands
changed CleanupGraphSettings
fixed getVertices, getPosition on dynamic shapes


Status Commands
new CE.isBlock
new CE.addAttributeLayer
new CE.getAttributeLayerExtents
new CE.getAttributeSource
new CE.getLayerAttributes
new CE.sampleBooleanLayerAttribute
new CE.sampleFloatLayerAttribute
new CE.sampleStringLayerAttribute
new CE.setAttributeLayerExtents
new CE.setLayerAttributes
new DAEImportSettings
new FBX20112ExportModelSettings
replaced CE.getStartRule (prev. getShapeSymbol)
replaced CE.setStartRule (prev. setShapeSymbol)
removed CE.isModelLayer
removed ce.createShapesFromGraph
removed createShapesFromGraphSettings

Copyright ©2008-2016 Esri R&D Center Zurich. All rights reserved.