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 a 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 Added three new methods ce.insertGraphNodes, ce.mergeGraphNodes and ce.splitGraphNodes to manipulate graphs.
New Added two new methods ce.removeHoles and ce.unionShapes to manipulate shapes.
New The TPK exporter can be invoked via the TPKExportSettings class.
New SPKMeshExportModelSettings now has get/setWriteDDSTextures functions.


Status Commands
New Added two new methods ce.getTotalSolidAngle and ce.getVisibleSolidAngle to get visibility tool statistics.
New Added a new method ce.exit to cleanly shutdown CityEngine from within Python.
New The Unreal exporter has gained two new method pairs to control instancing and mesh merging, setInstancing/getInstancing and setMeshMering/getMeshMerging.
Changed The method FGDBImportSettings.setImportQueryAndEnvelope has been fixed to correctly import the specified extent.


Status Commands
New Complete Visibility Tools section added to control New visibility features.
New UnrealExportModelSettings were added to support Unreal export workflows.
New Added getCurveHandle to complement already existing setCurveHandle
New Functionality to open the dashboard view via showDashboard.
Changed SPKMeshExportModelSettings now has get/setFeatureGranularity and get/setLayerBackfaceCulling functions while get/setGlobalOffset functions were removed.


Status Commands
No changes


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
Changed 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
Changed 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-2018 Esri R&D Center Zurich. All rights reserved.