Encodes geometry to Pixar RenderMan.
@example:
# Settings class used to control parameters for exporting models to Renderman RIB
exportSettings = RIBExportModelSettings()
exportSettings.setOutputPath(ce.toFSPath("/general/models/batchExportTests/"))
exportSettings.setBaseName("rib_batchexport.rib")
exportSettings.setTerrainLayers(exportSettings.TERRAIN_NONE)
ce.export(ce.selection()[0], exportSettings)
Methods defined here:
getAddCameraData
getAddCameraData(self):
Gets AddCameraData field. Adds the minimal set of commands (e.g. camera) to the master file to make it directly renderable.
@return: Value of AddCameraData field. [True/False]
getAtlasAddWrapBorder
getAtlasAddWrapBorder(self):
Gets AtlasAddWrapBorder field. Add a border of clamped pixels to protect against wrap mode bleeding.
@return: Value of AtlasAddWrapBorder field. [True/False]
getBaseName
getBaseName(self):
Gets BaseName field. The base name for all files.
@return: Value of BaseName field. [str]
getCamRotate
getCamRotate(self):
Gets CamRotate field. Rotation of the camera.
@return: Value of CamRotate field. [sequence of float]
getCamTranslate
getCamTranslate(self):
Gets CamTranslate field. Translation of the camera.
@return: Value of CamTranslate field. [sequence of float]
getCollectTextures
getCollectTextures(self):
Gets CollectTextures field. Collects all used textures and copies them into the target folder. All texture references are adjusted accordingly.
@return: Value of CollectTextures field. [True/False]
getCompression
getCompression(self):
Gets Compression field. Compress exported files.
@return: Value of Compression field. [True/False]
getCreateTextureAtlases
getCreateTextureAtlases(self):
Gets CreateTextureAtlases field. Creates texture atlases which combine a set of textures into one, thus reducing the number of textures and materials. All textures except COLORMAPs are removed.
@return: Value of CreateTextureAtlases field. [True/False]
getExistingFiles
getExistingFiles(self):
Gets ExistingFiles field. Specifies how files should be written during the export run. The log file will be written anyways.
@return: Value of ExistingFiles field. ["OVERWRITE", "SKIP"] [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.
getFacesWithHoles
getFacesWithHoles(self):
Gets FacesWithHoles field. Specifies how faces with holes should be handled during the export.
@return: Value of FacesWithHoles field. ["PASS", "TRIANGULATE_FACES_WITH_HOLES", "DISCARD_HOLES", "CONVERT_HOLES_TO_FACES"] [str]
getFileGranularity
getFileGranularity(self):
Gets FileGranularity field. Specifies the partition of the generated geometry into files.
@return: Value of FileGranularity field. ["MEMORY_BUDGET", "START_SHAPE"] [str]
getFileType
getFileType(self):
Gets FileType field. Specifies geometry file type.
@return: Value of FileType field. ["TEXT", "BINARY"] [str]
getGlobalOffset
getGlobalOffset(self):
Gets GlobalOffset field. Global (= for all shapes/models) offset for exported geometry.
@return: Value of GlobalOffset field. [sequence of float]
getIncludeMaterials
getIncludeMaterials(self):
Gets IncludeMaterials field. Exports material definitions (e.g. color, textures, ...).
@return: Value of IncludeMaterials field. [True/False]
getLocalOffset
getLocalOffset(self):
Gets LocalOffset field. Local (= per shape or model) offset for exported geometry.
@return: Value of LocalOffset field. ["NONE", "MODEL_CENTROID", "MODEL_CENTROID_BOTTOM", "SHAPE_CENTROID", "SHAPE_CENTROID_BOTTOM"] [str]
getMasterFile
getMasterFile(self):
Gets MasterFile field. Write master scene file.
@return: Value of MasterFile field. [True/False]
getMaxAtlasDim
getMaxAtlasDim(self):
Gets MaxAtlasDim field. Specifies the maximal dimension of the texture atlases in power-of-2 pixels, e.g. 11 gives a 2048x2048 Atlas.
@return: Value of MaxAtlasDim field. [int]
getMemoryBudget
getMemoryBudget(self):
Gets MemoryBudget field. Specifies the size limit in megabytes per exported file (value 0 = unlimited). Please note: The size is measured on the unoptimized geometry, i.e. the final size may vary. The check is only performed per input shape.
@return: Value of MemoryBudget field. [int]
getMergeNormals
getMergeNormals(self):
Gets MergeNormals field. Finds parallel normals (using the precision distance) and shares their index.
@return: Value of MergeNormals field. [True/False]
getMergeTexcoords
getMergeTexcoords(self):
Gets MergeTexcoords field. Finds identical texture coordinates (using the precision distance) and shares their index.
@return: Value of MergeTexcoords field. [True/False]
getMergeVertices
getMergeVertices(self):
Gets MergeVertices field. Finds co-incidental vertices (using the precision distance) and shares their index.
@return: Value of MergeVertices field. [True/False]
getMeshGranularity
getMeshGranularity(self):
Gets MeshGranularity field. Specifies the processing of meshes.
@return: Value of MeshGranularity field. ["AS_GENERATED", "PER_MATERIAL", "INSTANCED"] [str]
getNormalPrecision
getNormalPrecision(self):
Gets NormalPrecision field. Specifies the minimal difference between normals.
@return: Value of NormalPrecision field. [float]
getObjectMode
getObjectMode(self):
Gets ObjectMode field. Select the kind of statement to enclose geometry.
@return: Value of ObjectMode field. ["OBJECT", "ARCHIVE"] [str]
getOutputPath
getOutputPath(self):
Gets OutputPath field. Output directory for all exported files.
@return: Value of OutputPath field. [str]
getRiLib
getRiLib(self):
Gets RiLib field. Filename of library that implements the RenderMan Interface.
@return: Value of RiLib field. [str]
getScript
getScript(self):
Gets Script field. Python script to use for export callbacks.
@return: Value of Script field. [str]
getShaderTemplate
getShaderTemplate(self):
Gets ShaderTemplate field. Name of RenderMan shader template file.
@return: Value of ShaderTemplate field. [str]
getShapeNameDelimiter
getShapeNameDelimiter(self):
Gets ShapeNameDelimiter field. Delimiting character for resolution of shape name clashes.
@return: Value of ShapeNameDelimiter field. [str]
getSimplifyTerrainMeshes
getSimplifyTerrainMeshes(self):
Gets SimplifyTerrainMeshes field. Perform geometry simplification on terrains.
@return: Value of SimplifyTerrainMeshes field. [True/False]
getTemplateShaderName
getTemplateShaderName(self):
Gets TemplateShaderName field. Name of shader in RenderMan shader template file.
@return: Value of TemplateShaderName field. [str]
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]
getTexcoordPrecision
getTexcoordPrecision(self):
Gets TexcoordPrecision field. Specifies the minimal distance between texels.
@return: Value of TexcoordPrecision field. [float]
getTextureCoordinates
getTextureCoordinates(self):
Gets TextureCoordinates field. Choose which - if any - texture coordinate layers to export.
@return: Value of TextureCoordinates field. ["NONE", "FIRST", "ALL"] [str]
getTriangulateMeshes
getTriangulateMeshes(self):
Gets TriangulateMeshes field. Triangulate resulting meshes.
@return: Value of TriangulateMeshes field. [True/False]
getVertexNormals
getVertexNormals(self):
Gets VertexNormals field. Controls the export of vertex normals.
@return: Value of VertexNormals field. ["PASS", "NONE", "SET_MISSING", "SET_ALL"] [str]
getVertexPrecision
getVertexPrecision(self):
Gets VertexPrecision field. Specifies the minimal distance between vertices.
@return: Value of VertexPrecision field. [float]
getWriteLog
getWriteLog(self):
Gets WriteLog field. Write log file with statistics about this export session.
@return: Value of WriteLog 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. [RIBExportModelSettings]
save
save(self, name):
Save the named settings to the current scene file.
@param name: The name of the settings to save. [str]
setAddCameraData
setAddCameraData(self, booleanValue):
Sets AddCameraData field. Adds the minimal set of commands (e.g. camera) to the master file to make it directly renderable.
@param booleanValue: the new value. [True/False]
setAtlasAddWrapBorder
setAtlasAddWrapBorder(self, booleanValue):
Sets AtlasAddWrapBorder field. Add a border of clamped pixels to protect against wrap mode bleeding.
@param booleanValue: the new value. [True/False]
setBaseName
setBaseName(self, stringValue):
Sets BaseName field. The base name for all files.
@param stringValue: the new value. [str]
setCamRotate
setCamRotate(self, floatArrayValue):
Sets CamRotate field. Rotation of the camera.
@param floatArrayValue: the new value. [sequence of float]
setCamTranslate
setCamTranslate(self, floatArrayValue):
Sets CamTranslate field. Translation of the camera.
@param floatArrayValue: the new value. [sequence of float]
setCollectTextures
setCollectTextures(self, booleanValue):
Sets CollectTextures field. Collects all used textures and copies them into the target folder. All texture references are adjusted accordingly.
@param booleanValue: the new value. [True/False]
setCompression
setCompression(self, booleanValue):
Sets Compression field. Compress exported files.
@param booleanValue: the new value. [True/False]
setCreateTextureAtlases
setCreateTextureAtlases(self, booleanValue):
Sets CreateTextureAtlases field. Creates texture atlases which combine a set of textures into one, thus reducing the number of textures and materials. All textures except COLORMAPs are removed.
@param booleanValue: the new value. [True/False]
setExistingFiles
setExistingFiles(self, stringValue):
Sets ExistingFiles field. Specifies how files should be written during the export run. The log file will be written anyways.
@param stringValue: the new value ["OVERWRITE", "SKIP"]. [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]
setFacesWithHoles
setFacesWithHoles(self, stringValue):
Sets FacesWithHoles field. Specifies how faces with holes should be handled during the export.
@param stringValue: the new value ["PASS", "TRIANGULATE_FACES_WITH_HOLES", "DISCARD_HOLES", "CONVERT_HOLES_TO_FACES"]. [str]
setFileGranularity
setFileGranularity(self, stringValue):
Sets FileGranularity field. Specifies the partition of the generated geometry into files.
@param stringValue: the new value ["MEMORY_BUDGET", "START_SHAPE"]. [str]
setFileType
setFileType(self, stringValue):
Sets FileType field. Specifies geometry file type.
@param stringValue: the new value ["TEXT", "BINARY"]. [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]
setIncludeMaterials
setIncludeMaterials(self, booleanValue):
Sets IncludeMaterials field. Exports material definitions (e.g. color, textures, ...).
@param booleanValue: the new value. [True/False]
setLocalOffset
setLocalOffset(self, stringValue):
Sets LocalOffset field. Local (= per shape or model) offset for exported geometry.
@param stringValue: the new value ["NONE", "MODEL_CENTROID", "MODEL_CENTROID_BOTTOM", "SHAPE_CENTROID", "SHAPE_CENTROID_BOTTOM"]. [str]
setMasterFile
setMasterFile(self, booleanValue):
Sets MasterFile field. Write master scene file.
@param booleanValue: the new value. [True/False]
setMaxAtlasDim
setMaxAtlasDim(self, intValue):
Sets MaxAtlasDim field. Specifies the maximal dimension of the texture atlases in power-of-2 pixels, e.g. 11 gives a 2048x2048 Atlas.
@param intValue: the new value. [int]
setMemoryBudget
setMemoryBudget(self, intValue):
Sets MemoryBudget field. Specifies the size limit in megabytes per exported file (value 0 = unlimited). Please note: The size is measured on the unoptimized geometry, i.e. the final size may vary. The check is only performed per input shape.
@param intValue: the new value. [int]
setMergeNormals
setMergeNormals(self, booleanValue):
Sets MergeNormals field. Finds parallel normals (using the precision distance) and shares their index.
@param booleanValue: the new value. [True/False]
setMergeTexcoords
setMergeTexcoords(self, booleanValue):
Sets MergeTexcoords field. Finds identical texture coordinates (using the precision distance) and shares their index.
@param booleanValue: the new value. [True/False]
setMergeVertices
setMergeVertices(self, booleanValue):
Sets MergeVertices field. Finds co-incidental vertices (using the precision distance) and shares their index.
@param booleanValue: the new value. [True/False]
setMeshGranularity
setMeshGranularity(self, stringValue):
Sets MeshGranularity field. Specifies the processing of meshes.
@param stringValue: the new value ["AS_GENERATED", "PER_MATERIAL", "INSTANCED"]. [str]
setNormalPrecision
setNormalPrecision(self, floatValue):
Sets NormalPrecision field. Specifies the minimal difference between normals.
@param floatValue: the new value. [float]
setObjectMode
setObjectMode(self, stringValue):
Sets ObjectMode field. Select the kind of statement to enclose geometry.
@param stringValue: the new value ["OBJECT", "ARCHIVE"]. [str]
setOutputPath
setOutputPath(self, stringValue):
Sets OutputPath field. Output directory for all exported files.
@param stringValue: the new value. [str]
setRiLib
setRiLib(self, stringValue):
Sets RiLib field. Filename of library that implements the RenderMan Interface.
@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]
setShaderTemplate
setShaderTemplate(self, stringValue):
Sets ShaderTemplate field. Name of RenderMan shader template file.
@param stringValue: the new value. [str]
setShapeNameDelimiter
setShapeNameDelimiter(self, stringValue):
Sets ShapeNameDelimiter field. Delimiting character for resolution of shape name clashes.
@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]
setTemplateShaderName
setTemplateShaderName(self, stringValue):
Sets TemplateShaderName field. Name of shader in RenderMan shader template file.
@param stringValue: the new value. [str]
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]
setTexcoordPrecision
setTexcoordPrecision(self, floatValue):
Sets TexcoordPrecision field. Specifies the minimal distance between texels.
@param floatValue: the new value. [float]
setTextureCoordinates
setTextureCoordinates(self, stringValue):
Sets TextureCoordinates field. Choose which - if any - texture coordinate layers to export.
@param stringValue: the new value ["NONE", "FIRST", "ALL"]. [str]
setTriangulateMeshes
setTriangulateMeshes(self, booleanValue):
Sets TriangulateMeshes field. Triangulate resulting meshes.
@param booleanValue: the new value. [True/False]
setVertexNormals
setVertexNormals(self, stringValue):
Sets VertexNormals field. Controls the export of vertex normals.
@param stringValue: the new value ["PASS", "NONE", "SET_MISSING", "SET_ALL"]. [str]
setVertexPrecision
setVertexPrecision(self, floatValue):
Sets VertexPrecision field. Specifies the minimal distance between vertices.
@param floatValue: the new value. [float]
setWriteLog
setWriteLog(self, booleanValue):
Sets WriteLog field. Write log file with statistics about this export session.
@param booleanValue: the new value. [True/False]
Constants
This class defines the following constants:
ALL = 'ALL'
ARCHIVE = 'ARCHIVE'
AS_GENERATED = 'AS_GENERATED'
BINARY = 'BINARY'
CONVERT_HOLES_TO_FACES = 'CONVERT_HOLES_TO_FACES'
DISCARD_HOLES = 'DISCARD_HOLES'
FIRST = 'FIRST'
INSTANCED = 'INSTANCED'
MEMORY_BUDGET = 'MEMORY_BUDGET'
MODEL_CENTROID = 'MODEL_CENTROID'
MODEL_CENTROID_BOTTOM = 'MODEL_CENTROID_BOTTOM'
MODEL_GEOMETRY = 'MODEL_GEOMETRY'
MODEL_GEOMETRY_FALLBACK = 'MODEL_GEOMETRY_FALLBACK'
NONE = 'NONE'
OBJECT = 'OBJECT'
OVERWRITE = 'OVERWRITE'
PASS = 'PASS'
PER_MATERIAL = 'PER_MATERIAL'
SET_ALL = 'SET_ALL'
SET_MISSING = 'SET_MISSING'
SHAPE_CENTROID = 'SHAPE_CENTROID'
SHAPE_CENTROID_BOTTOM = 'SHAPE_CENTROID_BOTTOM'
SHAPE_GEOMETRY = 'SHAPE_GEOMETRY'
SKIP = 'SKIP'
START_SHAPE = 'START_SHAPE'
TERRAIN_ALL = 'TERRAIN_ALL'
TERRAIN_ALL_SELECTED = 'TERRAIN_ALL_SELECTED'
TERRAIN_ALL_VISIBLE = 'TERRAIN_ALL_VISIBLE'
TERRAIN_NONE = 'TERRAIN_NONE'
TEXT = 'TEXT'
TRIANGULATE_FACES_WITH_HOLES = 'TRIANGULATE_FACES_WITH_HOLES'