USDExportModelSettings

Encodes geometry into the Universal Scene Description.

@example:
lots = ce.getObjectsFrom(ce.scene, ce.withName("'Lots'"))
exportSettings = USDExportModelSettings()
exportSettings.setOutputPath(ce.toFSPath("assets/usd"))
exportSettings.setBaseName("Lots")
ce.export(lots, exportSettings)

 

此处定义的方法如下:

getBaseName

getBaseName(self):

Gets BaseName field. The base name for all files.

@return: Value of BaseName field.  [str]

getExportGeometry

getExportGeometry(self):

Gets ExportGeometry field. Choose what geometry is exported. 'Models with Shape Fallback' writes the Start Shape if the Model generation fails. 'Models' skips to the next export item if the Model generation fails. 'Shapes' always writes the Start Shape and disregards the Model generation.

@return: Value of ExportGeometry field.  ["MODEL_GEOMETRY_FALLBACK", "MODEL_GEOMETRY", "SHAPE_GEOMETRY"] [str]

getExportLog

getExportLog(self):

Returns a dictionary containing details of the export.

@return: A dictionary containing details about the finished export.

getFileType

getFileType(self):

Gets FileType field. Choose the USD file output type.

@return: Value of FileType field.  ["USDC", "USDZ"] [str]

getGlobalOffset

getGlobalOffset(self):

Gets GlobalOffset field. Global (= for all shapes/models) offset for exported geometry.

@return: Value of GlobalOffset field.  [sequence of float]

getMeshMerging

getMeshMerging(self):

Gets MeshMerging field. Controls how meshes (and instances) generated by CGA are merged together.

@return: Value of MeshMerging field.  ["perInitialShape", "perInitialShapeByMaterial"] [str]

getOutputPath

getOutputPath(self):

Gets OutputPath field. Output directory for all exported files.

@return: Value of OutputPath field.  [str]

getScript

getScript(self):

Gets Script field. Python script to use for export callbacks.

@return: Value of Script field.  [str]

getSimplifyTerrainMeshes

getSimplifyTerrainMeshes(self):

Gets SimplifyTerrainMeshes field. Perform geometry simplification on terrains.

@return: Value of SimplifyTerrainMeshes field.  [True/False]

getTerrainLayers

getTerrainLayers(self):

Gets TerrainLayers field. Choose how terrain layers are exported.

@return: Value of TerrainLayers field.  ["TERRAIN_ALL_VISIBLE", "TERRAIN_ALL_SELECTED", "TERRAIN_ALL", "TERRAIN_NONE"] [str]

getTerrainMeshResolution

getTerrainMeshResolution(self):

Gets TerrainMeshResolution field. Resolution of the generated terrain mesh. In the Python API this is an integer list [x-Resolution, y-Resolution]. A Python integer value of -1 will be replaced with the highest resolution of the selected terrains but limited at 1024.

@return: Value of TerrainMeshResolution field.  [sequence of int]

getTriangulateMeshes

getTriangulateMeshes(self):

Gets TriangulateMeshes field. Triangulate resulting meshes.

@return: Value of TriangulateMeshes field.  [True/False]

load

load(self, name):

Load the named settings from the current scene file.

@param name: The name of the settings to load.  [str]
@return: result. [USDExportModelSettings]

save

save(self, name):

Save the named settings to the current scene file.

@param name: The name of the settings to save.  [str]

setBaseName

setBaseName(self, stringValue):

Sets BaseName field. The base name for all files.

@param stringValue: the new value. [str]

setExportGeometry

setExportGeometry(self, enumValue):

Sets ExportGeometry field. Choose what geometry is exported. 'Models with Shape Fallback' writes the Start Shape if the Model generation fails. 'Models' skips to the next export item if the Model generation fails. 'Shapes' always writes the Start Shape and disregards the Model generation.

@param enumValue: the new value ["MODEL_GEOMETRY_FALLBACK", "MODEL_GEOMETRY", "SHAPE_GEOMETRY"]. [str]

setFileType

setFileType(self, stringValue):

Sets FileType field. Choose the USD file output type.

@param stringValue: the new value ["USDC", "USDZ"]. [str]

setGlobalOffset

setGlobalOffset(self, floatArrayValue):

Sets GlobalOffset field. Global (= for all shapes/models) offset for exported geometry.

@param floatArrayValue: the new value. [sequence of float]

setMeshMerging

setMeshMerging(self, stringValue):

Sets MeshMerging field. Controls how meshes (and instances) generated by CGA are merged together.

@param stringValue: the new value ["perInitialShape", "perInitialShapeByMaterial"]. [str]

setOutputPath

setOutputPath(self, stringValue):

Sets OutputPath field. Output directory for all exported files.

@param stringValue: the new value. [str]

setScript

setScript(self, stringValue):

Sets Script field. Python script to use for export callbacks.

@param stringValue: the new value. [str]

setSimplifyTerrainMeshes

setSimplifyTerrainMeshes(self, booleanValue):

Sets SimplifyTerrainMeshes field. Perform geometry simplification on terrains.

@param booleanValue: the new value. [True/False]

setTerrainLayers

setTerrainLayers(self, enumValue):

Sets TerrainLayers field. Choose how terrain layers are exported.

@param enumValue: the new value ["TERRAIN_ALL_VISIBLE", "TERRAIN_ALL_SELECTED", "TERRAIN_ALL", "TERRAIN_NONE"]. [str]

setTerrainMeshResolution

setTerrainMeshResolution(self, intArrayValue):

Sets TerrainMeshResolution field. Resolution of the generated terrain mesh. In the Python API this is an integer list [x-Resolution, y-Resolution]. A Python integer value of -1 will be replaced with the highest resolution of the selected terrains but limited at 1024.

@param intArrayValue: the new value. [sequence of int]

setTriangulateMeshes

setTriangulateMeshes(self, booleanValue):

Sets TriangulateMeshes field. Triangulate resulting meshes.

@param booleanValue: the new value. [True/False]

常量

此类用于定义以下常量:

MODEL_GEOMETRY = 'MODEL_GEOMETRY'
MODEL_GEOMETRY_FALLBACK = 'MODEL_GEOMETRY_FALLBACK'
SHAPE_GEOMETRY = 'SHAPE_GEOMETRY'
TERRAIN_ALL = 'TERRAIN_ALL'
TERRAIN_ALL_SELECTED = 'TERRAIN_ALL_SELECTED'
TERRAIN_ALL_VISIBLE = 'TERRAIN_ALL_VISIBLE'
TERRAIN_NONE = 'TERRAIN_NONE'
USDC = 'USDC'
USDZ = 'USDZ'
PERINITIALSHAPE = 'perInitialShape'
PERINITIALSHAPEBYMATERIAL = 'perInitialShapeByMaterial'