Module mset

Marmoset Toolbag's Python interface.
Build: 5.02
Legacy Docs: Toolbag 3, Toolbag 4

def getToolbagVersion(unknown):

getToolbagVersion() -> int

Returns the current toolbag version, as an integer (e.g. 5021).

def getGraphicsAdapterName(unknown):

getGraphicsAdapterName() -> str

Returns the name of the graphics device in use.

def getPluginPath(unknown):

getPluginPath() -> str

Returns the current plugin path (eg. "C:/Program Files/Marmoset Toolbag 5/data/plugins/Example.py").

def quit(unknown):

quit()

Quits the application. Any unsaved changes will be lost.

def loadScene(unknown):

loadScene(filePath: str, downloadMissingLibraryAssets: bool = False)

Loads a Marmoset Toolbag scene file. Unsaved changes to any currently open scenes are lost.

def saveScene(unknown):

saveScene(filePath: str)

Saves a Marmoset Toolbag scene file. If a scene file path is not specified, the scene will be saved to its existing location.

def newScene(unknown):

newScene()

Creates a new empty scene. Any unsaved changes in the current scene will be lost.

def getSceneUnitScale(unknown):

getSceneUnitScale() -> float

Returns the current unit size of the scene, in meters. For example, a scene working in centimeters will return 0.01.

def getScenePath(unknown):

getScenePath() -> str

Returns the path of the current scene file.

def importModel(unknown):

importModel(filePath: str) -> SceneObject

Imports the specified model into the existing scene, using the scene's current import settings. Returns the imported object.

def importMaterial(unknown):

importMaterial(filePath: str, name: str = '') -> Material

Imports the specified material file into the scene. If no name is given, one will be automatically assigned. This function supports import from Toolbag materials, MTL files, Valve/Dota materials, and named texture files. Returns the imported material.

def renderCamera(unknown):

renderCamera(path: str = '', width: int = -1, height: int = -1, sampling: int = -1, transparency: bool = False, camera: str = '', viewportPass: str = '') -> Image

Renders an image with the given camera, or the main camera if none is specified. This will use the current resolution/format settings from the render scene object. Viewport pass accepts a render pass string (from component view / render passes dropdown box), if the string is not on the list or an empty string is used, the Full Quality pass is rendered by default.Returns an Image instance. Optionally takes a path parameter, which specifies where to write the image. If no path is specified, no image file will be written.

def renderImages(unknown):

renderImages(width: int = -1, height: int = -1, sampling: int = -1, transparency: bool = False)

Renders images with the render scene object's current settings and cameras. To render a single image, see renderCamera().

def renderVideos(unknown):

renderVideos(width: int = -1, height: int = -1, sampling: int = -1, transparency: bool = False)

Captures an animation into a video file or image sequence. The animation will be written into the file path(s) specified in the scene's render object.

def exportViewer(unknown):

exportViewer(path: str = '', title: str = '', author: str = '', authorURL: str = '', textureQuality: str = 'high', highResThumbnail: bool = False, html: bool = False, autoStartHTML: bool = False, fullframeHTML = False, presetHTML: bool = False, width: int = -1, height: int = -1, exportAnimations: bool = False, exportModelShowcase: bool = False, autoPlayAnimations: bool = False, showPlaybackControls: bool = False)

Exports a Marmoset Viewer (.mview) archive. This file will be written to the file path specified, or to the scene's default location if no path is specified.

def exportSceneUSD(unknown):

exportSceneUSD(path: str = '', models: bool = True, lights: bool = True, skies: bool = True, cameras: bool = True, materials: bool = True, normals: bool = True, uvmaps: bool = True, vertexcolors: bool = True, triangulate: bool = False, subdivision: bool = False, displacement: bool = False, copyfilereferences: bool = False, skiptextures: bool = False, uniquetextures: bool = False)

Exports a Universal Scene Description (.usdx) archive. This file will be written to the file path specified, or to the scene's default location if no path is specified. This format supports models, lights, skies, cameras, and materials (converted to their closest equivalent). Mesh data can include normals, uvmaps, and vertex colors. Meshes can be exported with original polygons or triangulated - subdivision and displacement can be directly applied to the output meshes - this may increase the file size. Note: When displacement is enabled, subdivision will also be enabled. The copyfilereferences option will export referenced files bundled with this file when True (False to keep their absolute paths the same). Note:This option is ignored when exporting a .usdz file The uniquetextures option decides whether to overwrite, or create a unique texture name in the case where the same file name exists at the export path (when skiptextures is False).

def exportSceneGLTF(unknown):

exportSceneGLTF(path: str = '', models: bool = True, lights: bool = True, cameras: bool = True, materials: bool = True, normals: bool = True, tangents: bool = True, uvmaps: bool = True, vertexcolors: bool = True, subdivision: bool = False, displacement: bool = False, texturequality: int = 3, metalnessthreshold: float = 0.8)

Exports a WebGL-ready glTF (.glb) archive. This file will be written to the file path specified, or to the scene's default location if no path is specified. This format supports models, lights, cameras, and materials (converted to their closest equivalent). Mesh data can include normals, tangents, uvmaps and vertex colors. Meshes are triangulated by default - subdivision and displacement can be directly applied to the output meshes - this may increase the file size. Note: When displacement is enabled, subdivision will also be enabled. Texture quality is set from 0 to 3, with 3 being the highest. The specular metalness conversion threshold is a value above which materials will be converted to metalness.

def exportSceneFBX(unknown):

exportSceneFBX(path: str = '', models: bool = True, lights: bool = True, cameras: bool = True, materials: bool = True, embedassets: bool = False, uvmaps: bool = True, triangulate: bool = False, subdivision: bool = False, displacement: bool = False)

Exports an Autodesk FBX (.fbx) archive. This file will be written to the file path specified, or to the scene's default location if no path is specified. This format supports models, lights, cameras, and materials (converted to their closest equivalent).Mesh vertex data can include uvmaps (normals are included by default).Meshes can be exported with original polygons or triangulated - subdivision and displacement can be directly applied to the output meshes - this may increase the file size. Note: When displacement is enabled, subdivision will also be enabled. The embedassets option is used to save textures in the export file (depending on the format being exported this may not be possible).

def exportSceneOBJ(unknown):

exportSceneOBJ(path: str = '', models: bool = True, materials: bool = True, uvmaps: bool = True, subdivision: bool = False, displacement: bool = False)

Exports an Alias/WaveFront Object (.obj) archive. This file will be written to the file path specified, or to the scene's default location if no path is specified. This format supports models and materials (converted to their closest equivalent). Mesh vertex data can include uvmaps (normals are included by default).Meshes are triangulated by default - subdivision and displacement can be directly applied to the output meshes - this may increase the file size. Note: When displacement is enabled, subdivision will also be enabled.

def exportSceneCOLLADA(unknown):

exportSceneCOLLADA(path: str = '', models: bool = True, lights: bool = True, materials: bool = True, embedassets: bool = False, uvmaps: bool = True, subdivision: bool = False, displacement: bool = False)

Exports a COLLAborative Design Activity (.dae) archive. This file will be written to the file path specified, or to the scene's default location if no path is specified. This format supports models, lights, and materials (converted to their closest equivalent). Mesh vertex data can include uvmaps (normals are included by default). Meshes are triangulated by default - subdivision and displacement can be directly applied to the output meshes - this may increase the The embedassets option is used to save textures in the export file (depending on the format being exported this may not be possible).

def frameObject(unknown):

frameObject(object: SceneObject)

Centers and frames the given object in the current camera.

def frameScene(unknown):

frameScene()

Centers and frames the entire scene in the current camera.

def getSceneBounds(unknown):

getSceneBounds() -> List[List[float]]

Gets the bounds of the entire scene. Formatted as [min_xyz, max_xyz]

def findObject(unknown):

findObject(searchString: str)

Finds an Object in the scene by string name.

def setSelectedObjects(unknown):

setSelectedObjects(objs: List[SceneObject]) -> bool

Select the provided scene objects. Returns true if successful. See also 'getSelectedObjects'.

def getSelectedObject(unknown):

getSelectedObject() -> SceneObject

Returns the currently selected Object. If multiple objects are selected this function will return the first selection. See also 'getSelectedObjects'.

def getSelectedObjects(unknown):

getSelectedObjects() -> List[SceneObject]

Returns all currently selected scene Objects as a list.

def getAllObjects(unknown):

getAllObjects() -> List[SceneObject]

Returns all scene Objects as a list.

def groupObjects(unknown):

groupObjects(list: List[SceneObject])

Groups an array of SceneObjects.

def getAllMaterials(unknown):

getAllMaterials() -> List[Material]

Returns all materials as a list.

def findMaterial(unknown):

findMaterial(name: str) -> Material

Finds a Material by string name.

def getSelectedMaterial(unknown):

getSelectedMaterial() -> Material

Returns the currently selected Material.

def getSelectedMaterialGroup(unknown):

getSelectedMaterialGroup() -> List[Material]

Returns the currently selected Material group as an array of materials.

def bakeAll(unknown):

bakeAll()

Bakes all objects in the scene.

def getCamera(unknown):

getCamera()

Gets the current active camera from the currently focused viewport.

def setCamera(unknown):

setCamera(camera: CameraObject)

Sets the current active camera for viewport and screenshot rendering.

def getTimeline(unknown):

getTimeline() -> Timeline

Returns the current scene's timeline, for animation control.

def getLibrary(unknown):

getLibrary() -> Library

Returns your current installation's library. Used to configure your library with custom assets.

def getPreferences(unknown):

getPreferences() -> Preferences

Returns your preferences. Used to configure yourToolbag instalation.

def getTraceBackendType(unknown):

getTraceBackendType() -> str

Returns the type of the trace backend in use.

def getOptimalTraceBackendType(unknown):

getOptimalTraceBackendType() -> str

Returns optimal trace backend type for the current GPU.

def shutdownPlugin(unknown):

shutdownPlugin()

Halts execution and shuts down the currently running plugin.

def fail(unknown):

fail(msg: str)

Generates a failure message to an automated testing log. Mainly for internal use.

def log(unknown):

log(msg: str)

Prints text to the application log, similar to print(). No return will be appended.

def err(unknown):

err(msg: str)

Prints text to the application log, as an error. No return will be appended.

def clearTestLog(unknown):

clearTestLog()

Marmoset internal use for testing.

def freeUnusedResources(unknown):

freeUnusedResources()

Frees from memory any retained but unused resources (such as textures). Generally this function is unnecessary, but it can be useful to keep total memory use lower in scripts that batch process large numbers of resources. Called automatically whenever a new scene is created or loaded.

def showOpenFileDialog(unknown):

showOpenFileDialog(fileTypes: List[str] = [], multiple: bool = False) -> str

Prompts the user with a file open dialog box, and resumes after the user selects a file. Returns the selected file path, or an empty string if the user canceled the dialog. Permitted file extensions can be optionally specified by the fileTypes array, which can contain one or more of: 'images', 'models', 'materials', which specify categories of file types, individual file extensions supported by Marmoset Toolbag (such as 'jpg', 'fbx', etc.), or at most one custom file extension. Specify extension names in lower case without the '.' character. Multiple files my be selected, and paths will be returned as an array, if 'multiple' is set to True.

def showOpenFolderDialog(unknown):

showOpenFolderDialog() -> str

Prompts the user with a folder open dialog box, and resumes after the user selects a folder. Returns the selected file path, or an empty string if the user canceled the dialog.

def showSaveFileDialog(unknown):

showSaveFileDialog(fileTypes: List[str] = []) -> str

Prompts the user with a file save dialog box, and resumes after the user selects a file destination. Returns the selected file path, or an empty string if the user canceled the dialog. Permitted file extensions can be optionally specified by the fileTypes array, which can contain one or more of: 'images', 'models', 'materials', which specify categories of file types, individual file extensions supported by Marmoset Toolbag (such as 'jpg', 'fbx', etc.), or at most one custom file extension. Specify extension names in lower case without the '.' character.

def showOkCancelDialog(unknown):

showOkCancelDialog(title: str, prompt: str) -> bool

Prompts the user with a modal dialog box. The window is given a titlebar named 'title' and prompt text 'prompt'. Returns True or False depending on whether OK or Cancel is selected.

def showOkDialog(unknown):

showOkDialog(title: str, prompt: str) -> bool

Prompts the user with a modal dialog box. The window is given a titlebar named 'title' and prompt text 'prompt'. Returns True when OK is selected.

def compressFile(unknown):

compressFile(filePath: str, archiveOutputPath: str)

Compresses a file on disk into a gzipped tarball archive (tgz).

def compressFolder(unknown):

compressFolder(folderPath: str, archiveOutputPath: str)

Compresses a folder, including all subdirectories, into a gzipped tarball archive (tgz).

def readAndExportStamp(unknown):

readAndExportStamp(inputPath: str, outputPath: str)

Marmoset internal use for stamp brush creation

def getStoreItem(unknown):

getStoreItem(key: str) -> Any

Get data in a shared persistent store that is accessable across plugins.

def setStoreItem(unknown):

setStoreItem(key: str, val: Any)

Store data in a shared persistent store that is accessable across plugins.

def compareImages(unknown):

compareImages(imageLhs: Image, imageRhs: Image, metric: str)

Compare the images using a specified metric.

def generateDifferenceImage(unknown):

generateDifferenceImage(imageLhs: Image, imageRhs: Image, fuzziness: float)

Generate a difference image highlighting the different pixel.

class SceneObject:

Scene Object

def duplicate(unknown):

duplicate(name: str = '') -> SceneObject

Duplicates the object, optionally assigning it a new name. Returns the new object.

def destroy(unknown):

destroy()

Destroys the object and removes it from the scene.

def getChildren(unknown):

getChildren() -> List[SceneObject]

Returns a list of all immediate children of the object.

def findInChildren(unknown):

findInChildren(searchStr: str) -> SceneObject

Finds and returns an object with a name matching 'searchStr', parented under this object. The search recursively checks all child objects.

def setKeyframe(unknown):

setKeyframe(lerp: str = '', property: str = '')

Sets a keyframe on this object with the assigned interpolation function ("linear", "step", "spline", or "splineBreak"). This setting defaults to editor's default. If no property string is specified, all object properties will be keyframed.

def getBounds(unknown):

getBounds() -> List[List[float]]

Gets the bounds of this object, or None if it doesn't have any. Formatted as [min_xyz, max_xyz]

name

name: str The name of the object.

parent

parent: SceneObject The parent of the object.

visible

visible: bool Controls object viewport visibility.

locked

locked: bool Controls the locking of object settings in the user interface.

collapsed

collapsed: bool Controls the display of the object's children in the outline view.

uid

uid: int The unique identifier of this scene object.

class RenderObject(SceneObject):

Render Object in scene. Manages render configuration can render images/videos.

def renderImages(unknown):

renderImages()

Render all enabled images in this render object.

def renderVideos(unknown):

renderVideos()

Render all enabled videos in this render object.

images

images: RenderOutputOptions Output configuration for image outputs.

videos

videos: RenderOutputOptions Output configuration for video outputs.

options

options: RenderOptions Render settings for Full Composite configurations of Toolbag.

cameras

cameras: List[mset.RenderCamera] Cameras configured to render with Toolbag.

renderPasses

renderPasses: List[mset.RenderPass] Cameras configured to render with Toolbag.

class RenderOptions:

The final scene render configuration.

drawWireframe

"drawWireframe": type Enables the rendering of mesh wireframes.

wireframeColor

wireframeColor: List[float] Wireframe color as an RGBA array.

shadowQuality

shadowQuality: str Shadow quality. Valid values are 'Low', 'High', and 'Mega'.

rasterUseShadowCascades

"rasterUseShadowCascades": type Use cascaded shadow maps for directional lights. This can provide better resolution distribution over larger scenes.

shadowCascadeDistance

"shadowCascadeDistance": type A bias value for how distance the furthest shadow cascade is from the camera.

shadowBias

"shadowBias": type A bias value for how distance the furthest shadow cascade is from the camera.

occludeAmbient

"occludeAmbient": type Whether screen space ambient occlusion should occlude ambient light in raster rendering.

occludeDiffuse

"occludeDiffuse": type Whether screen space ambient occlusion should occlude diffuse light in raster rendering.

occludeSpecular

"occludeSpecular": type Whether screen space ambient occlusion should occlude specular light in raster rendering.

occlusionStrength

"occlusionStrength": type Whether screen space ambient occlusion should occlude ambient light in raster rendering.

occlusionSize

"occlusionSize": type The radius size for occlusion. Can be any number > 0.0.

occlusionMode

occlusionMode: str Occlusion mode. Valid values are 'Disabled', 'Screen', 'Raytraced'.

occlusionColor

occlusionColor: List[float] The color of the ambient occlusion.

useReflections

"useReflections": type Whether screen space reflections should be enabled.

reflectDiffuse

"reflectDiffuse": type Whether screen space reflections should be enabled.

reflectionIntensity

"reflectionIntensity": type The level of brightness the reflections have.

reflectionDiffuseIntensity

"reflectionDiffuseIntensity": type The level of brightness the diffuse reflections have.

reflectionDiffuseDistance

"reflectionDiffuseDistance": type The distance diffuse reflections should be allowed to propigate.

renderer

renderer: str Whether real time ray tracing is enabled.

rayTraceCaustics

"rayTraceCaustics": type Caustics quality when ray tracing.

rayTraceAdvancedSampling

"rayTraceAdvancedSampling": type Whether advanced sampling is enabled. Reduces noise in scenes with many lights. Has moderate impact on render time and viewport performance.

rayTraceBounces

"rayTraceBounces": type The maximum number of bounces a ray can perform.

rayTraceTransmissionBounces

"rayTraceTransmissionBounces": type The maximum number of transmission bounces a ray can perform.

rayTraceDirectRadianceClamp

"rayTraceDirectRadianceClamp": type The maximum direct brightness allowed when ray tracing. Useful to reduce fireflies.

rayTraceIndirectRadianceClamp

"rayTraceIndirectRadianceClamp": type The maximum indirect brightness allowed when ray tracing. Useful to reduce fireflies.

rayTraceDiffuseIntensity

"rayTraceDiffuseIntensity": type The base intensity of diffuse interactions. Can be scaled for a more stylistic look.

rayTraceReflectionIntensity

"rayTraceReflectionIntensity": type The base intensity of reflection interactions. Can be scaled for a more stylistic look.

rayTraceSampleAccumulation

"rayTraceSampleAccumulation": type The number of samples total allowed to be traced in the viewport each frame.

rayTraceDenoiseTemporal

"rayTraceDenoiseTemporal": type Enables temporal mode for denoising.

rayTraceDenoiseMode

rayTraceDenoiseMode: str The current denoising mode. Can be 'off', 'cpu', or 'gpu'.

rayTraceDenoiseQuality

rayTraceDenoiseQuality: str The current level of denoising quality. Can be 'low', 'medium', or 'high'.

rayTraceDenoiseStrength

rayTraceDenoiseStrength: float The current level of denoising quality. Is a value between 0.0 and 1.0.

rayTraceVolumetricFogAnisotropy

rayTraceVolumetricFogAnisotropy: float The current level of volumetric anisotropy. Is a value between -1.0 and 1.0.

wireframeCull

"wireframeCull": type Cull backfaces when rendering wireframes.

albedoEnergyConservation

"albedoEnergyConservation": type Albedo is energy converving. Applies to the albedo and specular render passes.

depthDither

"depthDither": type Whether dithering is enabled when rendering depth passes.

positionDither

"positionDither": type Whether dithering is enabled when rendering position passes.

normalSpace

normalSpace: str The normal space to render when using a Normal render pass. Valid values are 'tangent', 'object', and 'view'.

normalFlipX

normalFlipX: bool Whether to flip normal outputs along the X axis.

normalFlipY

normalFlipY: bool Whether to flip normal outputs along the Y axis.

normalFlipZ

normalFlipZ: bool Whether to flip normal outputs along the Z axis.

positionNormalization

positionNormalization: str The normal view to render when using a Position render pass. Valid values are 'Bounding Sphere', 'Bounding Box', and 'Disabled'.

depthNormalization

depthNormalization: str The normal view to render when using a Depth render pass. Valid values are 'Bounding Sphere', 'Bounding Box', and 'Disabled'.

fogSkyIllumination

fogSkyIllumination: float Influence of sky illumination on fog. Is a value between 0.0 and 1.0.

fogLightIllumination

fogLightIllumination: float Influence of light illumination on fog. Is a value between 0.0 and 10.0.

watermarkEnabled

"watermarkEnabled": type Whether the Marmoset watermark is enabled.

watermarkDark

"watermarkDark": type Determines if the Marmoset watermark is set to dark mode.

watermarkColored

"watermarkColored": type Determines if the Marmoset watermark is set to colored mode.

watermarkSize

"watermarkSize": type Size of the watermark relative to the render's minimum side.

watermarkPosition

watermarkPosition: List[float] The position of the watermark. [0,0] coresponds to top left, and [1,1] corresponds to bottom right.

class RenderOutputOptions:

Render Output options, the configuration of image or video export.

outputPath

outputPath: str This output directory.

format

format: str The output format for this export. can be 'JPEG', 'PNG', 'TGA', 'PSD', 'PSD (16-bit)', 'EXR (16-bit)', 'EXR (32-bit)', 'DDS (16-bit)', 'DDS (32-bit)', 'PFM (32-bit)', 'MP4 Lossless' on MacOS or 'AVI Lossless' on Windows, 'MPEG4', or 'Auto'.

width

width: int The width of this output.

height

height: int The height of this output.

samples

samples: int The number of samples used for this output.

compressionQuality

compressionQuality: int The level of compression for compressed video file formats like avi. Can be between 0 and 100. Does not apply to image exports.

transparency

transparency: bool Whether this output should be transparent or not.

overwrite

overwrite: bool Whether this output should overwrite the file by the same name.

rayTraceDenoiseMode

rayTraceDenoiseMode: str The current denoising mode for this output. Can be 'off', 'cpu', or 'gpu'.

rayTraceDenoiseQuality

rayTraceDenoiseQuality: str The current level of denoising quality for this output. Can be 'low', 'medium', or 'high'.

rayTraceDenoiseStrength

rayTraceDenoiseStrength: float The level of contribution the denoiser should have on the final output. Can be any float between 0.0 and 1.0.

class RenderPassOptions:

Options when configuring a render pass to render with Toolbag.

enabled

enabled: bool If this render pass is enabled when exporting images/videos.

renderPass

renderPass: str The render pass to be executed when rendering images/videos.

class RenderCameraOptions:

Options when configuring a camera to render with Toolbag.

enabled

enabled: bool If this camera is enabled when exporting images/videos.

camera

camera: CameraObject The reference to this camera object.

class BackdropObject(SceneObject):

Backdrop Object

path

path: str The file path to the backdrop image.

alpha

alpha: float The transparency of the backdrop image.

useAlpha

useAlpha: bool Specifies whether or not to use the image's alpha channel.

class TransformObject(SceneObject):

Transform Object

def centerPivot(unknown):

centerPivot()

Centers the pivot point of this object to its bounding box.

position

position: List[float] The position of the object, as a list of 3 floats.

rotation

rotation: List[float] The rotation of the object, as a list of 3 floats.

scale

scale: List[float] The scale of the object, as a list of 3 floats.

pivot

pivot: List[float] The pivot of the object, as a list of 3 floats.

class LightObject(TransformObject):

Light Object

lightType

lightType: str The type of the light (valid values are 'directional', 'spot', 'omni'

color

color: List[float] The color of the light.

useTemperature

useTemperature: bool Enables the use of color temperature on this light source.

temperature

temperature: float The black body color temperature of the light. This value is in degrees Kelvin, in the range 1,000 to 10,000. This setting only takes effect when enabled (see useTemperature).

brightness

brightness: float The brightness of the light.

lengthX

lengthX: float The length along the X axis of the light source.

lengthY

lengthY: float The length along the Y axis of the light source.

width

width: float The radius of the light source.

spotAngle

spotAngle: float The spot angle, in degrees, for use by spot lights only.

spotSharpness

spotSharpness: float The sharpness of the spotlight shape, for use by spot lights only.

spotVignette

spotVignette: float The degree of spotlight vignette, for use by spot lights only.

castShadows

castShadows: bool Enables the casting of shadows by the light.

visibleShape

visibleShape: bool Makes the light source shape visible in final renders.

gelPath

gelPath: str Path of image to mask light shape.

gelTile

gelTile: float Tiling scalar for the gel texture.

castLensFlare

castLensFlare: bool Determines whether or not this light casts lens flare.

lensFlareStrength

lensFlareStrength: float Sets the lens flare strength of the light.

class CameraLimits:

Camera Limits Settings

useLimitsInViewport

useLimitsInViewport: bool Enables use of camera motion limits in the viewport.

panLimit

panLimit: str Limits the panning to either the Y-axis or completly (valid values are: 'Off', 'YAxis', 'Locked').

nearLimitEnabled

nearLimitEnabled: bool Enables the near orbit distance limit.

nearLimit

nearLimit: float The near orbit limit distance.

farLimitEnabled

farLimitEnabled: bool Enables the far orbit distance limit.

farLimit

farLimit: float The far orbit limit distance.

pitchLimitEnabled

pitchLimitEnabled: bool Enables the pitch angle limit.

pitchLimitMin

pitchLimitMin: float The minimum pitch angle, in degrees.

pitchLimitMax

pitchLimitMax: float The maximum pitch angle, in degrees.

yawLimitEnabled

yawLimitEnabled: bool Enables the yaw angle limit.

yawLimitMin

yawLimitMin: float The minimum yaw limit angle, in degrees.

yawLimitMax

yawLimitMax: float The maximum yaw limit angle, in degrees.

yawLimitOffset

yawLimitOffset: float The offset of the yaw limit angle, in degrees.

class CameraLens:

Camera Lens Settings

safeFrameEnabled

safeFrameEnabled: bool Displays the safe frame in the viewport.

safeFrameOpacity

safeFrameOpacity: float Opacity of the safe frame display.

dofMode

dofMode: int Specifies the depth of field mode: 0 = off, 1 = post effect, 2 = ray traced.

dofEnabled

dofEnabled: bool Enables the depth of field effect. This is a legacy variable, consider using 'dofMode' instead.

dofFocusDistance

dofFocusDistance: float Focal distance of the depth of field.

dofStop

dofStop: float F-stop value for controlling depth of field. Smaller values are blurrier.

dofAnamorphicRatio

dofAnamorphicRatio: float Anamorphic lens ratio for horizontal distortion of depth of field.

dofAperture

dofAperture: str Path of the aperture shape texture file.

dofApertureRotation

dofApertureRotation: float Rotation of the aperture shape texture.

distortionBarrel

distortionBarrel: float Strength of the barrel distortion effect.

distortionChromaticAberration

distortionChromaticAberration: float Strength of the chromatic aberration effect.

distortionCARed

distortionCARed: float Strength of the chromatic aberration in the red component.

distortionCAGreen

distortionCAGreen: float Strength of the chromatic aberration in the green component.

distortionCABlue

distortionCABlue: float Strength of the chromatic aberration in the blue component.

lensFlareStrength

lensFlareStrength: float Sets the intensity of the lens flare effect.

lensFlareCoating

lensFlareCoating: float Adds coating to the entire lens system, causing lens flare more apparent.

lensFlareSize

lensFlareSize: float Sets the size of the individual flares or "ghosts".

motionBlurEnable

motionBlurEnable: bool Toggles motion blur effect for final render animations and stills.

motionBlurEnableLoopingAnimation

motionBlurEnableLoopingAnimation: bool Toggles last frame to wrap back to the first frame for future frame accumulation.

motionBlurShutterSpeed

motionBlurShutterSpeed: float Determine the intensity or length of the blur. Usually the shutter speed on a camera is represented in fractions of a second, ie: 1/60, 1/120, 1/250, etc.

motionBlurSamples

motionBlurSamples: unsigned int Control the quality of the motion blur/how smooth the blur is.

class CameraPostEffect:

Camera Post Effect

toneMappingMode

toneMappingMode: str Tone mapping mode (allowed values are: 'linear', 'reinhard', 'hejl', 'aces', 'agx')

exposure

exposure: float Exposure multiplier.

contrast

contrast: float Contrast multiplier.

contrastCenter

contrastCenter: float A value above which color values are brightened, and below which color values are darkened to achive the contrast effect.

saturation

saturation: float Adjusts the intensity of color saturation (default is 1.0).

sharpen

sharpen: float Strength of the edge sharpening effect.

sharpenLimit

sharpenLimit: float A numerical limit on the stength of the edge sharpening effect.

bloomBrightness

bloomBrightness: float Brightness multiplier for the bloom effect.

bloomSize

bloomSize: float Size scalar for the bloom effect.

vignetteStrength

vignetteStrength: float Strength multiplier for the vignette effect.

vignetteSoftness

vignetteSoftness: float Softness scalar for the vignette effect.

filmGrainMode

filmGrainMode: str Sets the style of grain. (allowed values are: 'Off', 'Film', 'Digital')

filmGrainPreview

filmGrainPreview: bool Toggles randomized preview of the grain effect.

filmGrainIntensity

filmGrainIntensity: float Sets the strength of the grain effect.

filmGrainTilingMode

filmGrainTilingMode: str Sets the texture or coarseness of the grain effect. (allowed values are: 'Fine', 'Medium', 'Coarse')

filmGrainDirtIntensity

filmGrainDirtIntensity: float Sets the overall opacity of the scratches and stains.

filmGrainDirtDensity

filmGrainDirtDensity: float Controls the amount scratches and stains visible in each frame.

filmGrainDirtSize

filmGrainDirtSize: float Controls the size of scratches and stains.

highlights

highlights: float Adjusts the intensity of the highlights. Range: [-1, 1]

shadows

shadows: float Adjusts the intensity of the shadows. Range: [-1, 1]

midtones

midtones: float Adjusts the intensity of the midtones. Range: [-1, 1]

clarity

clarity: float Adjusts the intensity of the clarity. Range: [-1, 1]

class CameraObject(TransformObject):

Camera Object

def loadPostEffect(unknown):

loadPostEffect(path: str)

Load a camera post effect from a file.

def savePostEffect(unknown):

savePostEffect(path: str)

Save a camera post effect to a file.

mode

mode: str The mode of this camera, can be 'perspective' or 'orthographic'.

fov

fov: float The vertical field of view of the camera, in degrees.

orbitRadius

orbitRadius: float The radius about which the camera orbits. This value won't move the camera directly, but affects orbit behavior when the camera view is rotated.

orthoScale

orthoScale: float The scale of this camera in orthographic mode. Measured in scene units.

focalLength

focalLength: float The focal length of the camera, in mm.

nearPlaneScale

nearPlaneScale: float A scalar for adjusting the automatic near clipping plane. Lower values will bring the clipping closer to the camera, but can result in unstable depth for the rest of the scene.

limits

limits: CameraLimits The camera limits settings.

lens

lens: CameraLens The camera lens settings.

postEffect

postEffect: CameraPostEffect The camera post effect settings.

class ShadowCatcherObject(TransformObject):

Shadow Catcher Object

skyShadow

skyShadow: bool Enables receiving shadow from the sky light (ray tracing only).

indirectShadow

indirectShadow: bool Enables receiving shadow from the sky light (ray tracing only).

edgeFade

edgeFade: bool Enables a fading of shadow opacity towards the edges of the shadow catcher plane.

fadeRadius

fadeRadius: float Radius of the edge fade effect.

fadeFalloff

fadeFalloff: float Falloff of the edge fade effect.

fadeTexturePath

fadeTexturePath: str File path of the fade texture, which is used to control the shadow fade pattern.

textureChannel

textureChannel: str The active channel in the fade texture (must be one of: 'R', 'G', 'B', 'A').

opacity

opacity: float The opacity of the shadow catcher.

roughness

roughness: float Specifies the maximum roughness value.

roughnessTexturePath

roughnessTexturePath: str The texture used to specify surface roughness. White corresponds to a rough surface while black corresponds to smooth surfaces.

roughnessTextureChannel

roughnessTextureChannel: str Determines the channel of the texture from which to read roughness content (must be one of: 'R', 'G', 'B', 'A').

invertRoughness

invertRoughness: bool Inverts the output of the roughness shader. Useful for loading gloss maps in place of roughness maps.

specularIntensity

specularIntensity: float Sets the intensity of the specular reflections.

specularFresnel

specularFresnel: float Sets the intensity of the Fresnel effect, or how reflective surfaces are at grazing angles.

specularTexturePath

specularTexturePath: str The texture that will be used to set the color and intensity of the specular reflections.

specularTextureChannel

specularTextureChannel: str Determines the channel of the texture from which to read specular content (must be one of: 'R', 'G', 'B', 'A').

class SkyBoxObject(SceneObject):

Skybox Scene Object

def computeProcedural(unknown):

computeProcedural()

def importImage(unknown):

importImage(path: str)

Imports an image to use for this skybox.

def loadSky(unknown):

loadSky(path: str)

Loads a .tbsky file in place of the current sky.

def saveSky(unknown):

saveSky(path: str)

Saves the current sky to the specified file path as a .tbsky archive.

def renderPreview(unknown):

renderPreview(width: int, height: int) -> Image

Renders the sky background, in latitude-longitude format, to a preview image. Returns an Image instance.

def clearLightChildren(unknown):

clearLightChildren()

Clears all light children of this skybox.

brightness

brightness: float The brightness of the skybox.

rotation

rotation: float The current rotation angle of the skybox.

backgroundBrightness

backgroundBrightness: float The brightness of the skybox background.

blur

blur: float The amount of blurring for the background.

mode

mode: str The background mode. Can be 'color', 'sky', 'blurred sky', or 'ambient sky'.

backgroundColor

backgroundColor: List[float] The background color when rendering with the skybox mode set to 'color'.

childLightBrightness

childLightBrightness: float The brightness of child lights on this skybox object.

time

time: float Time of day, in hours, generally from 0 to 24, although values outside this range will also work. Only applies to procedural skies.

day

day: int Day of year, from 1 to 365. Only applies to procedural skies.

timeZone

timeZone: int Time zone, specified in hours offset from UTC. Only applies to procedural skies.

latitude

latitude: float Degrees latitude on earth, from -90 south to 90 north. Only applies to procedural skies.

longitude

longitude: float Degrees longitude on earth, from -180 west to 180 east. Only applies to procedural skies.

turbidity

turbidity: float A value from 0 to 1 which controls the particulate density in the atmosphere. Only applies to procedural skies.

sunBrightness

sunBrightness: float Scales the apparent brightness of the sun, relative to the sky. A value of 1 is most realistic. Only applies to procedural skies.

sunScale

sunScale: float Scales the apparent size of the sun. A value of 1 is most realistic. Only applies to procedural skies.

groundColorNear

groundColorNear: vec Color of the ground plane near the scene. Only applies to procedural skies.

groundColorFar

groundColorFar: vec Color of the ground plane near the horizon. Only applies to procedural skies.

saturation

saturation: float Color intensity of the sun and sky. Only applies to procedural skies.

whiteBalance

whiteBalance: float Color temperature shift of the sun and sky. Only applies to procedural skies.

tint

tint: float Color balance shift of the sun and sky, complementary to white balance. Only applies to procedural skies.

class FogObject(SceneObject):

Fog Object

color

color: List[float] The color of the fog effect, as a list of 3 floats for RGB color.

density

density: float The density of the fog effect.

opacity

opacity: float The maximum opacity of the fog effect.

class PyTurntableObject(TransformObject):

Turntable Object

enabled

enabled: bool Enables the active motion of the turntable object.

spinRate

spinRate: float The rate at which the turntable object rotates, in degrees per second.

class Mesh:

Mesh

triangles

triangles: List[float] Mesh triangle indices, as a list of int groups of 3 ( e.g. [0,1,2, 1,3,2] )

polygons

polygons: List[int] Mesh polygon groups, as a list of int groups of 2, start and count ( e.g. [0,2, 1,2] )

vertices

vertices: List[float] Mesh vertex positions, as a list of float groups of 3 ( e.g. [x,y,z, x,y,z] )

uvs

uvs: List[float] Mesh texture coordinates as a list of float groups of 2 ( e.g. [u,v, u,v] )

secondaryUVs

secondaryUVs: List[float] Mesh secondary texture coordinates, as a list of float groups of 2 ( e.g. [u,v, u,v] )

colors

colors: List[float] Mesh colors, as a list of float groups of 4 ( e.g. [r,g,b,a, r,g,b,a] )

normals

normals: List[float] Mesh normals, as a list of float groups of 3 ( e.g. [x,y,z, x,y,z] )

tangents

tangents: List[float] Mesh tangents, as a list of float groups of 3 ( e.g. [x,y,z, x,y,z] )

bitangents

bitangents: List[float] Mesh bitangents, as a list of float groups of 3 ( e.g. [x,y,z, x,y,z] )

class MeshObject(TransformObject):

Mesh Object

def addSubmesh(unknown):

addSubmesh(name: str, material: Material = None, startIndex: int = 0, indexCount: int = -1)

Adds and returns a SubMeshObject to the MeshObject, rendering the specified range of indices. name: Name of the SubMeshObject material: The Material assigned to the submesh. startIndex: The index of the first vertex of the submesh. indexCount: The number of indices following 'startIndex', or -1 to cover all remaining indices in the mesh.

castShadows

castShadows: bool Enables casting of shadows from the mesh.

cullBackFaces

cullBackFaces: bool Enables the culling of back faces during render.

tangentSpace

tangentSpace: str Mesh tangent space for normal mapping. This must be one of the following values: 'Custom' 'Marmoset', 'Mikk', 'Maya', '3D Studio Max', 'Unity'

fixMirroredTangents

fixMirroredTangents: bool Fix tangent issues that arise with mirrored UVs in certain tangent spaces.

mesh

mesh: Mesh The mesh containing vertex data.

subdivisionEnabled

subdivisionEnabled: bool If subdivisions are enabled or not.

subdivisionLevel

subdivisionLevel: bool If this object isn't visible to the camera. Useful for emissive surfaces you may want hidden.

subdivisionMode

subdivisionMode: str The method used for subdivision. Can be 'Catmull-Clark', 'Regular', or 'PN Triangles'.

subdivisionSharpenCorners

subdivisionSharpenCorners: bool If corners should be sharp when subdividing. Helps keep the shape of your mesh with catmull-clark subdivisions.

subdivisionSmoothing

subdivisionSmoothing: float The level of smoothing that should be done with PN Triangle subdivision.

subdivisionWireframeMode

subdivisionWireframeMode: str How wireframes should look with subdivisions. Can be 'Isolines' or 'Polygons'.

subdivisionGeometryReduction

subdivisionGeometryReduction: str The level of geometry decimation that should be done while subdividing. Helps with real time performance.

invisibleToCamera

invisibleToCamera: bool If this object isn't visible to the camera. Useful for emissive surfaces you may want hidden.

class SubMeshObject(SceneObject):

Sub Mesh Object

startIndex

startIndex: int The first index of the submesh.

indexCount

indexCount: int The index count of the submesh.

material

material: Material The material assigned to the submesh.

class GradientData:

Gradient Data, used with Texture Project layers to control various effects.

def addColor(unknown):

addColor(color: List[float], position: float, weight: float)

Adds a color to this gradient.

def setColor(unknown):

setColor(index: int, color: List[float], weight: float)

Sets a given color of this gradient.

def getColor(unknown):

getColor(index: int) -> Tuple[List[float], float]

Gets a color of this gradient.

def getColorCount(unknown):

getColorCount() -> int

Gets the number of colors this gradient has.

def reset(unknown):

reset()

Resets this gradient to a default configuration (black to white).

class LevelData:

Level Data, used with Texture Project layers to control various effects.

def setLevel(unknown):

setLevel(color: str, black: float, gamma: float, white: float, outputBlack: float, outputWhite: float)

Configures this level.

def getHandle(unknown):

getHandle(color: str) -> List[float]

Gets the settings for this level.

def reset(unknown):

reset()

Resets this level to a default configuration.

class Spline:

Spline Data, used with Texture Project layers to control various effects.

def addHandle(unknown):

addHandle(x: float, y: float)

Add a point to this spline.

def setHandle(unknown):

setHandle(index: int, x: float, y: float)

Edit a point on this spline.

def getHandle(unknown):

getHandle(index: int) -> List[float]

Get the positional data of a given spline index.

def getHandleCount(unknown):

getHandleCount() -> int

Get the number of points on this spline.

def reset(unknown):

reset()

Resets this spline to a default configuration.

class Projector:

A Projector object that controls layer projection.

projectionMethod

projectionMethod: str The projection method of this projector (uv, triplanar, positional, brush, or planar).

tiling

tiling: List[float] The tiling configuration of this projector.

clamp

clamp: bool If clamping is enabled for UVs or not.

uvRotation

uvRotation: float Rotation of UVs in the W axis.

edgeFade

edgeFade: float The amount of edge fading. Used in triplanar projection to blend edges.

normalWeight

normalWeight: float The amount of normal fading. Used in triplanar projection to blend normals.

position

position: List[float] A list of 3 floats (x, y, z) describing the position of this projector.

scale

scale: List[float] A list of 3 floats (x, y, z) describing the scale of this projector.

rotation

rotation: List[float] A list of 3 floats (x, y, z) describing the rotation of this projector.

transform

transform: List[float] A list of 16 floats describing the transform matrix of this projector.

class MaterialSurfaceMap:

A Material Surface Map, with customizable parameters.

def reset(unknown):

reset()

Resets this map with the default base color/contrst.

texture

texture: Texture The texture that corresponds to this map, or None if none exists.

mode

mode: str The mode of this map, can be either 'texture' or 'material'

contrast

contrast: float The level of contrast for this map.

color

color: List[int] The base color of this map.

invert

invert: bool Determines if contrast/color have been flipped.

class TextureProjectLayerMaps:

Per map settings for layers/brushes.

mask

The Mask project map of this surface.

normal

The Normal project map of this surface.

albedo

The Albedo project map of this surface.

specular

The Specular project map of this surface.

gloss

The Gloss project map of this surface.

roughness

The Roughness project map of this surface.

metalness

The Metalness project map of this surface.

ambientOcclusion

The Ambient Occlusion project map of this surface.

cavity

The Cavity project map of this surface.

transparency

The Transparency project map of this surface.

displacement

The Gloss project map of this surface.

bump

The Bump project map of this surface.

emissive

The Emissive project map of this surface.

scatter

The Scatter project map of this surface.

transmissionMask

The Transmission Mask project map of this surface.

anisoDir

The Anisotropic Direction project map of this surface.

fuzz

The Fuzz project map of this surface.

sheen

The Sheen project map of this surface.

sheenRoughness

The Sheen (Roughness) project map of this surface.

class TextureProjectLayer:

A Texture Project Layer (Fill, Stroke, etc.).

def addContentChild(unknown):

addContentChild(contentType: str) -> TextureProjectLayer

Add a content child to the current layer.

def addMaskChild(unknown):

addMaskChild(maskType: str) -> TextureProjectLayer

Add a mask child to the current layer.

def getBlendMode(unknown):

getBlendMode(projectMap: str)

Gets the blend mode of this layer for a given project map.

def setBlendMode(unknown):

setBlendMode(projectMap: str, mode: str)

Sets the blend mode of this layer for a given project map.

def duplicate(unknown):

duplicate() -> TextureProjectLayer

Duplcates this layer in this painter project. Returns duplicated layer.

def remove(unknown):

remove()

Removes this layer from this painter project.

def moveUp(unknown):

moveUp()

Moves this layer up it's parent list in the painter project.

def moveDown(unknown):

moveDown()

Moves this layer down it's parent list in the painter project.

def isDescendantOfMask(unknown):

isDescendantOfMask()

Checks if this layer is a descendant of a mask layer for this painter project.

def isCarveGroup(unknown):

isCarveGroup()

Checks if this layer is a carve group.

def isCarveGroupRegularMask(unknown):

isCarveGroupRegularMask()

Checks if this layer is a carve group regular mask.

def importStroke(unknown):

importStroke(filename: str)

def clearContent(unknown):

clearContent()

maps

maps: TextureProjectLayerMaps The per map settings of this layer.

name

name: str The name of this layer.

visible

visible: bool The visibility of this layer.

opacity

opacity: float The transparency of this layer.

maskColor

maskColor: float The mask color of this layer. Works similar to opacity, but for the mask tree.

uid

uid: int The unique identifier of this layer.

activeProjectMaps

activeProjectMaps: List[str] The active project maps for this layer.

parent

parent: TextureProjectLayer The parent of this layer.

contentChildren

contentChildren: List[TextureProjectLayer] This layers content children.

maskChildren

maskChildren: List[TextureProjectLayer] This layers mask children.

class TextureProjectOutputMap:

A Texture Project Output Map

suffix

suffix: str The suffix appended to the output name of this map.

format

format: str The extension type for this output map. Can be one of the following: 'PNG', 'TGA', 'JPG', 'PSD'

sRGB

sRGB: bool Whether this map is exported with sRGB encoding.

bitrate

bitrate: int The bitrate for this output map. Can be 8 or 16. PNG supports 8/16 bit, TGA supports 8 bit, JPG supports 8 bit, PSD supports 8/16 bit

type

type: str The type of output map. Can be one of the following: 'RGB', 'RGB+A', 'RGBA', 'R+G+B', 'R+G+B+A', 'Grayscale'.

r

r: str The project map type for the R output channel.

g

g: str The project map type for the G output channel.

b

b: str The project map type for the B output channel.

a

a: str The project map type for the A output channel.

rgb

rgb: str The project map type for the RGB output channels.

class TextureProjectObject(SceneObject):

Scene Object for Texture Projects.

def addLinkedMaterial(unknown):

addLinkedMaterial(mat: Material)

Add a linked material to this texture project.

def addDefaultProjectMaps(unknown):

addDefaultProjectMaps()

Convenience function, adds the default set of project maps (PBR Metalness + Normals, Occlusion, Bump) to this texture project.

def addProjectMap(unknown):

addProjectMap(name: str)

Add a project map to this texture project.

def removeProjectMap(unknown):

removeProjectMap(name: str)

Add a project map to this texture project.

def getAllProjectMaps(unknown):

getAllProjectMaps() -> List[str]

Gets all project maps from this texture project to get/set any settings it might have.

def getProjectMapFormat(unknown):

getProjectMapFormat(name: str) -> str

Get the format of a given texture project map.

def setProjectMapFormat(unknown):

setProjectMapFormat(name: str, format: str)

Set the format of a given texture project map. Can be one of the following: 'RGB 8-bit (sRGB)', 'RGB 8-bit (Linear)', 'RGB 16-bit (sRGB)', 'RGB 16-bit (Linear)', 'Grayscale 8-bit (sRGB)', 'Grayscale 8-bit (Linear)', 'Grayscale 16-bit (sRGB)', 'Grayscale 16-bit (Linear)'

def setInputMap(unknown):

setInputMap(name: str, tex: Union[Texture, str])

Sets an input map to this texture project to be used as base information during texture generation.

def getInputMap(unknown):

getInputMap(name: str) -> Texture

Sets an input map to this texture project to be used as base information during texture generation.

def getOutputMapCount(unknown):

getOutputMapCount() -> int

Get the number of project maps in this texture project.

def getOutputMap(unknown):

getOutputMap(index: int) -> TextureProjectOutputMap

Get an output map coresponding to this index or name for this texture project.

def addOutputMap(unknown):

addOutputMap(suffix: str, type: str, format: str, bitrate: int, rgb: str, a: str) -> TextureProjectOutputMap

Add and configure an output map for this texture project. For parameter info, see TextureProjectOutputMap.

def removeOutputMap(unknown):

removeOutputMap(index: Union[int, TextureProjectOutputMap])

Remove an output map for this texture project.

def exportOutputMap(unknown):

exportOutputMap(index: int)

Exports a single output map given a zero-based index.

def exportOutputMapTiles(unknown):

exportOutputMapTiles(index: int, baseName: str, tiles:List[int], tilesCount: int)

Exports a single output map given a zero-based index.

def exportAllOutputMaps(unknown):

exportAllOutputMaps()

Convenience function that exports all output maps for this painter project according to your export settings.

def addLayer(unknown):

addLayer(layerType: str) -> TextureProjectLayer

Add a layer to the top of this texture project.

def getSelectedLayers(unknown):

getSelectedLayers() -> List[TextureProjectLayer]

Get a list of all selected layers in this texture project.

def findLayerByName(unknown):

findLayerByName(layerType: str) -> TextureProjectLayer

Finds and returns a layer by name, if multiple layers share the same name, the first one that matches will be returned.

def getAllLayers(unknown):

getAllLayers() -> List[TextureProjectLayer]

Get a list of all layers in this texture project.

def getActiveLayer(unknown):

getActiveLayer() -> TextureProjectLayer

Gets the currently active layer selected in this texture project.

def getAllLayerTypes(unknown):

getAllLayerTypes() -> List[str]

Get all types of layers that can be created in a texture project.

def recomposite(unknown):

recomposite()

Rerender this texture project. Useful if you're having trouble seeing changes in your texture renders.

def generateExportAsset(unknown):

generateExportAsset(index: int) -> Image

Generates an output map asset image given an zero-based index.

projectWidth

projectWidth: int The width in pixels of the texture project working resolution.

projectHeight

projectHeight: int The height in pixels of the texture project working resolution.

viewportUndersample

viewportUndersample: int Resolution undersampling scale (viewport res = full res / undersampling). Meant to improve viewport performance at the cost of quality. Does not affect final output.

previewUndersample

previewUndersample: int Resolution undersampling scale. (preview res = full res / undersampling). Improves performance at the cost of quality when actively editing or painting on a layer. Does not affect final output.

viewportQuality

viewportQuality: str The quality of the viewport, can be either 'Full' or 'Fast'.

paddingSize

paddingSize: int UV padding size in pixels.

useBumpAsDetailNormals

useBumpAsDetailNormals: bool Use bump channel as detail normals.

bumpDetailWeight

bumpDetailWeight: float The amount that bump maps contribute to normal details.

useHeightAsParallax

useHeightAsParallax: bool Use height map in paralax subroutine with materials.

useThicknessAsScatter

useThicknessAsScatter: bool Use tickness as scatter subroutine with materials.

reflectionWorkflow

reflectionWorkflow: str The current reflection workflow. Can be either 'metalness' or 'specular'

metalnessThresholdCenter

metalnessThresholdCenter: float The center region where materials are defined as non-metal vs metal.

metalnessThresholdRange

metalnessThresholdRange: float The range of values that are interpolated between non-metal and metal.

outputPath

outputPath: str The directory of the texture project exports. For the file name itself, see outputPathBaseName.

outputPathBaseName

outputPathBaseName: str The base file name of the texture project exports. Suffixes are appended to this string upon export. For example, if the base name is 'output', an albedo map is written as 'output_albedo'. Files are written to the directory specified by 'outputPath'.

outputWidth

outputWidth: int The width in pixels of exported texture project textures.

outputHeight

outputHeight: int The height in pixels of exported texture project textures.

class BakerMap:

Baker Map Settings

def resetSuffix(unknown):

resetSuffix()

Resets the current map suffix to its default.

suffix

suffix: str The output suffix of the current Baker Map.

enabled

enabled: bool Whether or not this Baker Map should render when baking.

class PositionBakerMap(BakerMap):

Position Baker Map Settings

normalization

normalization: str The method by which you normalize position data.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class NormalBakerMap(BakerMap):

Normal Baker Map Settings

flipX

flipX: bool Determines whether the normal map's X channel will be flipped.

flipY

flipY: bool Determines whether the normal map's Y channel will be flipped.

flipZ

flipZ: bool Determines whether the normal map's Z channel will be flipped.

dither

dither: bool Determines whether this map output will be dithered.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class HeightBakerMap(BakerMap):

Height Baker Map Settings

dither

dither: bool Determines whether this map output will be dithered.

innerDistance

innerDistance: float Inner height map distance from the low poly mesh, in world units. This value maps to black in the height map.

outerDistance

outerDistance: float Outer height map distance from the low poly mesh, in world units. This value maps to white in the height map.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class CurvatureBakerMap(BakerMap):

Curvature Baker Map Settings

strength

strength: float Determines the strength of the curvature output.

dither

dither: bool Determines whether this map output will be dithered.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class ThicknessBakerMap(BakerMap):

Thickness Baker Map Settings

rayCount

rayCount: int The number of rays used for thickness baking.

dither

dither: bool Determines whether this map output will be dithered.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class BentNormalBakerMap(BakerMap):

Bent Normal Baker Map Settings

rayCount

rayCount: int The number of rays used for Bent Normal baking.

dither

dither: bool Determines whether this map output will be dithered.

flipX

flipX: bool Determines whether the normal map's X channel will be flipped.

flipY

flipY: bool Determines whether the normal map's Y channel will be flipped.

flipZ

flipZ: bool Determines whether the normal map's Z channel will be flipped.

searchDistance

searchDistance: float The maximum distance rays can go. 0 defaults to infinity.

ignoreGroups

ignoreGroups: bool Determines whether bake groups will be ignored when baking bent normals.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class AOBakerMap(BakerMap):

Bent Normal Baker Map Settings

rayCount

rayCount: int The number of rays used for AO baking.

dither

dither: bool Determines whether this map output will be dithered.

floor

floor: float The amount of floor occlusion.

floorOcclusion

floorOcclusion: float Determines whether an artificial floor plane will be used for ambient occlusion baking.

ignoreGroups

ignoreGroups: bool Determines whether bake groups will be ignored when baking ambient occlusion.

twoSided

twoSided: bool Determines whether the ambient occlusion baking will also use back faces.

cosineWeight

cosineWeight: float Weights from -1 to 1, increasing values result in more 'cavity' shadows.

searchDistance

searchDistance: float The maximum distance rays can go. 0 defaults to infinity.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class UVIslandBakerMap(BakerMap):

UVIsland Baker Map Settings

enableSVGUVIsland

enableSVGUVIsland: bool Enables the exporting of an SVG version of the UV Island map.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class MetalnessBakerMap(BakerMap):

Metalness Baker Map Settings

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class WireframeBakerMap(BakerMap):

Wireframe Baker Map Settings

lineThickness

lineThickness: float The thickness of the UV wireframe lines.

vertexRadius

vertexRadius: float The radius of each vertex of the UV wireframe.

wireframeColor

wireframeColor: List[float] Wireframe color as an RGB array.

Inherited Members
BakerMap
resetSuffix
suffix
enabled
class BakerObject(SceneObject):

Baker Object

def bake(unknown):

bake()

Bakes with the current configuration.

def bakePSD(unknown):

bakePSD()

Bakes with the current configuration, into a single layered PSD file.

def importModel(unknown):

importModel(path: str)

Imports a model file via the Baker's quick loader. path: string path to model file

def addGroup(unknown):

addGroup(name: str)

Adds a BakeGroup to the BakerObject. name: The Name of the BakeGroup returns: The BakeGroup

def savePreset(unknown):

savePreset(name: str)

saves the current configuration of the BakerObject. name: The Name of the Preset

def loadPreset(unknown):

loadPreset(name: str)

loads a given preset for the BakerObject. name: The Name of the Preset

def getTextureSetCount(unknown):

getTextureSetCount() -> int

Gets the number of texture sets in the current BakerObject. returns: integer number of texture sets.

def getTextureSetName(unknown):

getTextureSetName(i: int) -> str

Gets the name of a given texture set. i: The index of the Texture Set you want returns: the string name of the texture set.

def getTextureSetEnabled(unknown):

getTextureSetEnabled(i: int) -> bool

Gets the enabled status of a texture set. i: The index of the texture set you want returns: True if the texture set is enabled False if not.

def setTextureSetEnabled(unknown):

setTextureSetEnabled(i: int, enabled: bool)

Sets whether or the texture set specified is enabled or disabled. i: The index of the Texture Set you want enabled: if the texture set should bake or not.

def getTextureSetWidth(unknown):

getTextureSetWidth(i: int) -> int

Gets the width of a texture set. i: The index of the texture set you want returns: Width of texture set.

def setTextureSetWidth(unknown):

setTextureSetWidth(i: int, width: int)

Sets the width of a given texture set. i: The index of the Texture Set you want width: your desired width of the texture set.

def getTextureSetHeight(unknown):

getTextureSetHeight(i: int) -> int

Gets the height of a texture set. i: The index of the texture set you want returns: Height of the texture set.

def setTextureSetHeight(unknown):

setTextureSetHeight(i: int, height: int)

Sets the height of a given texture set. i: The index of the Texture Set you want height: your desired height of the texture set.

def getUDIMTileCount(unknown):

getUDIMTileCount() -> int

Gets the number of UDIM tiles in the current Baker. returns: integer number of UDIM tiles

def getUDIMTileName(unknown):

getUDIMTileName(i: int) -> str

Gets the name of a given UDIM tile. i: The index of the UDIM tile you want returns: the string name of the UDIM tile.

def getUDIMTileEnabled(unknown):

getUDIMTileEnabled(i: int) -> bool

Gets the enabled status of a UDIM tile. i: The index of the UDIM tile you want returns: True if the UDIM tile is enabled False if not.

def setUDIMTileEnabled(unknown):

setUDIMTileEnabled(i: int, enabled: bool)

Sets whether or the UDIM tile specified is enabled or disabled. i: The index of the UDIM tile you want enabled: if the UDIM tile should bake or not.

def getUDIMTileWidth(unknown):

getUDIMTileWidth(i: int) -> int

Gets the width of a UDIM tile. i: The index of the UDIM tile you want returns: Width of UDIM tile.

def setUDIMTileWidth(unknown):

setUDIMTileWidth(i: int, width: int)

Sets the width of a given UDIM tile. i: The index of the UDIM tile you want width: your desired width of the UDIM tile.

def getUDIMTileHeight(unknown):

getUDIMTileHeight(i: int) -> int

Gets the height of a UDIM tile. i: The index of the UDIM tile you want returns: Height of the UDIM tile.

def setUDIMTileHeight(unknown):

setUDIMTileHeight(i: int, height: int)

Sets the height of a given UDIM tile. i: The index of the UDIM tile you want height: your desired height of the UDIM tile.

def getAllMaps(unknown):

getAllMaps() -> List[BakerMap]

Gets a list of all baker maps. returns: A list of all baker map handles

def getMap(unknown):

getMap(name: str) -> BakerMap

Gets a baker map handle. name: The Name of the Map you want returns: A handle to the Baker Output Map

def applyPreviewMaterial(unknown):

applyPreviewMaterial()

Applys a preview material on all baker low poly mesh objects.

def linkTextureProject(unknown):

linkTextureProject(proj: TextureProjectObject) -> None

Links a texture project to this baker. The textureset parameter may be an empty string if the bake project doesn't use texture sets.

outputPath

"outputPath": str The file path where the baked textures will be stored.

outputBits

outputBits: int Bit depth of the output format; must be one of the following values: 8, 16, 32.

outputSamples

outputSamples: int Sample count of the bake output.

edgePadding

edgePadding: str Edge padding amount. Must be one of the following values: 'None', 'Moderate', 'Extreme'.

edgePaddingSize

"edgePaddingSize": float Edge padding size in pixels.

outputSoften

"outputSoften": float Determines how much the baked result will be softened; must be between 0.0 and 1.0.

useHiddenMeshes

"useHiddenMeshes": bool Determines whether hidden meshes will be used when baking.

ignoreTransforms

"ignoreTransforms": bool Determines whether transforms on meshes will be used when baking.

smoothCage

"smoothCage": bool Determines whether the cage mesh will use smooth vertex normals, ignoring any hard edges.

ignoreBackfaces

"ignoreBackfaces": bool Determines whether back sides of faces will be ignored when baking.

fixMirroredTangents

"fixMirroredTangents": bool Fixes mirrored tangents, use this setting if you're seeing artifacts in your normal map bakes from your tangent space.

tileMode

tileMode: int Baker tile mode for outputs (Single, Multiple, UDIM)

outputWidth

outputWidth: int The width in pixels of the baked textures.

outputHeight

outputHeight: int The height in pixels of the baked textures.

class BakerTargetObject(SceneObject):

Baker Target Object

def estimateOffset(unknown):

estimateOffset()

Estimates the Cage Offsets.

minOffset

"minOffset": float The minimum offset of the cage mask.

maxOffset

"maxOffset": float The maximum offset of the cage mask.

excludeWhenIgnoringGroups

"excludeWhenIgnoringGroups": bool Whether this target will be used when ignoring groups in cone based ray passes (AO, Bent Normals).

cageAlpha

"cageAlpha": float The opacity of the cage.

class Material:

Material

def getSubroutine(unknown):

getSubroutine(subroutine: str) -> MaterialSubroutine

Returns the subroutine in a given slot, specified by string name in the UI. See also setSubroutine().

def setSubroutine(unknown):

setSubroutine(subroutine: str, shader: str)

Assigns a shader type to a given subroutine. Both parameters are string names. 'shader' must be a valid shader name, and 'subroutine' must be one of: 'subdivision', 'displacement', 'surface', 'microsurface', 'albedo', 'diffusion', 'reflectivity', 'reflection', 'clearcoat reflection', 'clearcoat microsurface', 'clearcoat reflectivity', 'occlusion', 'emissive', 'transparency', 'texture'.

def getGroup(unknown):

getGroup() -> str

Returns the string name of the group the material is assigned to or an empty string, if the material is in no group.

def setGroup(unknown):

setGroup(name: str)

Assigns the material to a new or existing group. Use '' to assign the material to no group.

def duplicate(unknown):

duplicate(name: str = '') -> Material

Duplicates the Material, optionally assigning it a name. If no name is specified, one will be automatically generated. Returns the new material.

def destroy(unknown):

destroy()

Destroys the Material and removes it from the scene.

def assign(unknown):

assign(object: SceneObject, includeChildren: bool = True)

Assigns the material to a scene object. If 'includeChildren' is true, this material will also be applied to the children of the object.

def getAssignedObjects(unknown):

getAssignedObjects() -> List[SceneObject]

Returns a list of all scene objects to which this material is assigned.

def exportFile(unknown):

exportFile(path: str)

Exports this material to the path specified.

def renderPreview(unknown):

renderPreview(width: int, height: int)

Renders the material, applied to a sample mesh, to a preview image. Returns an Image instance.

def setKeyframe(unknown):

setKeyframe(lerp: str)

Sets a keyframe on this object with the assigned interpolation function ("linear", "step", "spline", or "splineBreak"). This setting defaults to editor's default.

name

name: Material The name of the Material. Please note that Materials must have unique names in Toolbag scenes.

displacement

displacement: MaterialSubroutine The MaterialSubroutine currently assigned to the Displacement Slot

surface

surface: MaterialSubroutine The MaterialSubroutine currently assigned to the Surface Slot

microsurface

microsurface: MaterialSubroutine The MaterialSubroutine currently assigned to the Microsurface Slot

albedo

albedo: MaterialSubroutine The MaterialSubroutine currently assigned to the Albedo Slot

diffusion

diffusion: MaterialSubroutine The MaterialSubroutine currently assigned to the Diffusion Slot

transmission

transmission: MaterialSubroutine The MaterialSubroutine currently assigned to the Transmission Slot

reflectivity

reflectivity: MaterialSubroutine The MaterialSubroutine currently assigned to the Reflectivity Slot

reflection

reflection: MaterialSubroutine The MaterialSubroutine currently assigned to the Reflection Slot

clearCoatReflection

clearCoatReflection: MaterialSubroutine The MaterialSubroutine currently assigned to the Clear Coat Reflection Slot

clearCoatMicrosurface

clearCoatMicrosurface: MaterialSubroutine The MaterialSubroutine currently assigned to the Clear Coat Microsurface Slot

clearcoatReflectivity

clearcoatReflectivity: MaterialSubroutine The MaterialSubroutine currently assigned to the Clear Coat Reflectivity Slot

occlusion

occlusion: MaterialSubroutine The MaterialSubroutine currently assigned to the Occlusion Slot

emission

emission: MaterialSubroutine The MaterialSubroutine currently assigned to the Emission Slot

transparency

transparency: MaterialSubroutine The MaterialSubroutine currently assigned to the Transparency Slot

texture

texture: MaterialSubroutine The MaterialSubroutine used for texture parameters

class MaterialSubroutine:

Material Subroutine

def getFieldNames(unknown):

getFieldNames() -> List[str]

Returns a list of all field names of the subroutine.

def setField(unknown):

setField(name: str, value: Union[int, float, str, Texture])

Sets the value of a field. Texture fields may be set by either passing a string path or a Texture instance.

def getField(unknown):

getField(name: str) -> Union[None, int, float, str, Texture]

Returns the value of a field.

name

name: str The name of the current shader attached to this subroutine.

class Texture:

GPU Texture

def renderPreview(unknown):

renderPreview(width: int, height: int, name = '')

Renders a preview of the texture, at the given resolution, with an optional name specifying the numberof frames for use in brushes / animations (eg. myname_4x.mpic). Returns an Image instance.

path

path: str The file path of the texture. Note: You cannot set the path of a Texture, only get it.

sRGB

sRGB: bool Determines whether the texture is sampled in sRGB color space.

useMipmaps

useMipmaps: bool Determines whether mipmaps are used on the texture.

useFiltering

useFiltering: bool Determines whether the texture is filtered bilinearly (smooth) or by nearest neighbor (pixelated).

anisotropicFiltering

anisotropicFiltering: bool Sets the degree of anisotropic filtering applied to this texture.

wrapping

wrapping: str Sets the type of texture wrapping applied to this texture.

class Image:

A CPU-side image. Used for image loading and saving, and pixel manipulations. See Texture for material and rendering uses.

def getPixelFormat(unknown):

getPixelFormat() -> str

Returns the current pixel format, or -1 if the image is invalid. See convertPixelFormat() for a list of format values.

def convertPixelFormat(unknown):

convertPixelFormat(format: str)

Converts the image to the specified format. Some formats of interest: BGRA8: "PIXEL_FORMAT_BGRA8", RGBA16: "PIXEL_FORMAT_RGBA16", RGBA_FLOAT16: "PIXEL_FORMAT_RGBA_FLOAT16", RGBA_FLOAT32: "PIXEL_FORMAT_RGBA_FLOAT32", RGB10_A2: "PIXEL_FORMAT_RGB10_A2", R8: "PIXEL_FORMAT_R8", R16: "PIXEL_FORMAT_R16", RG8: "PIXEL_FORMAT_RG8", RG16: "PIXEL_FORMAT_RG16", R_FLOAT16: "PIXEL_FORMAT_R_FLOAT16", RG_FLOAT16: "PIXEL_FORMAT_RG_FLOAT16", R_FLOAT32: "PIXEL_FORMAT_R_FLOAT32", RG_FLOAT32: "PIXEL_FORMAT_RG_FLOAT32", R11G11B10_FLOAT: "PIXEL_FORMAT_R11G11B10_FLOAT"

def compressBCn(unknown):

compressBCn(mode: int)

Encodes the image in a GPU-friendly block-compressed format. Currently supported modes are 4, 5, 6, and 7. Source images must be in an 8bit-per-channel color mode (such as BGRA8 or R8), except for mode 6, which requires a floating point color format. BC4 (mode=4) encodes grayscale in 4 bits per pixel. BC5 (mode=5) encodes two color channels in 8 bits per pixel. This is often useful for normal maps. BC6H(mode=6) encodes HDR RGB color in 8 bits per pixel. This is useful for high dynamic range images, such as backgrounds or panoramas. BC7 (mode=7) encodes RGB color and an alpha channel in 8 bits per pixel.

def generateMipmaps(unknown):

generateMipmaps(sRGB: bool = False)

Generates mipmaps for the image. Can optionally account for sRGB color space.

def linearTosRGB(unknown):

linearTosRGB()

Converts the color space of this image from Linear to sRGB.

def sRGBToLinear(unknown):

sRGBToLinear()

Converts the color space of this image from sRGB to Linear.

def flipVertical(unknown):

flipVertical()

Vertically flips an image. Some pixel formats, such as BC7, may not be flippable.

def writeOut(unknown):

writeOut(path: str)

Writes the image contents to a file on disk. The file format is determined by the file extension.

def createTexture(unknown):

createTexture(sRGB: bool = True)

Creates a Texture object from the image contents, ready for GPU use.

def duplicate(unknown):

duplicate()

Creates a duplicate of this image.

class ExternalObject(TransformObject):

External Object

path

path: str Path to a model file. If this path is altered, a new model will be loaded in place of the old one.

class Timeline:

Animation Timeline

def getTime(unknown):

getTime() -> float

Returns the current animation time, in seconds.

def setTime(unknown):

setTime(time: float)

Sets the current animation time, in seconds. This time may be rounded to the nearest frame.

def getFrameRate(unknown):

getFrameRate() -> int

Returns the scene's animation frame rate, in frames per second.

def resample(unknown):

resample(frameRate: int)

Alters the animation timeline's frame rate, in frames per second. This will resample existing keyframes to fit the new frame rate, and alter the appropriate frame counts.

def play(unknown):

play()

Activates animation playback.

def pause(unknown):

pause()

Stops animation playback.

currentFrame

currentFrame: int Current animation frame. This value must be within the valid range of 0 to totalFrames.

totalFrames

totalFrames: int Total frame count for the animation. This value must be greater than zero.

selectionStart

selectionStart: int The first frame of the selected time range. Must be less than totalFrames and greater than zero.

selectionEnd

selectionEnd: int The last frame of the selected time range. Must be less than totalFrames and greater than zero.

playbackSpeed

playbackSpeed: float The current playback speed. This value controls the apparent speed of playback in the viewport, but does not affect exported animation length.

class Library:

The Marmoset Library. Provides access to a library of thousands of materials, textures, smart materials, skies, and much more. Customize your library to suit your needs.

def addAsset(unknown):

addAsset(desc: Dict)

Add an asset to your current library distribution. You must supply a dictionary with the following keys: { name: str, author: str, link: str, tags: str, type: str, path: str }.Tags are comma separated, and type must be one of the following:'Materials', 'Skies', 'Textures', 'Smart Materials', 'Smart Masks', 'Brushes'.

def updateLocalAssets(unknown):

updateLocalAssets()

Updates all local assets.

def removeAsset(unknown):

removeAsset(name: str)

Remove an asset from your current library distribution.

def waitForTransactions(unknown):

waitForTransactions()

Wait for all the downloads to complete.

def resetContents(unknown):

resetContents()

Resets the contents of the library.

def resetUserContents(unknown):

resetUserContents()

Resets the contents of the user library.

class Preferences:

The preferences.

unsavedChangesPrompts

"unsavedChangesPrompts": type If enabled, you will be prompted to save any unsaved work when closing a scene.

browseForMissingFiles

"browseForMissingFiles": type Displays prompts to locate missing external files, such as textures and animations, during scene loads.

browseForMissingMeshes

"browseForMissingMeshes": type Displays prompts to locate missing external meshes during scene loads.

autoTextureReload

"autoTextureReload": type Changed textures will be automatically reloaded when Toolbag regains focus.

updateCheck

"updateCheck": type Determines whether or not you will be prompted to install new updates. If enabled, Toolbag will check for new versions every time it opens.

updateCheckAllowBeta

"updateCheckAllowBeta": type Toolbag will check for and update to the latest beta builds when they are available. Enable this if you want to test out the latest features under development. Take care; beta builds may have bugs. Restart Toolbag for this setting to take effect.

displayTooltips

"displayTooltips": type Disabling this would remove these helpful little boxes. Pro-moves only.

tabletCompatibilityMode

"tabletCompatibilityMode": type Enables enhanced tablet compatibility. This setting can sometimes solve issues with tablet input, and disables some mouse features.

defaultWatermark

"defaultWatermark": type Determines whether or not the "Rendered in Marmoset Toolbag" watermark is enabled when creating a new scene.

defaultTangentMethod

defaultTangentMethod: str Sets the tangent space that will be applied to meshes when imported. Choose the application that you most frequently use to bake normal maps. Allowed values are 'Marmoset', 'Mikk', 'Maya' and '3DS Max'.

defaultTangentHandedness

defaultTangentHandedness: str Newly created bake and texture projects will default to this tangent space handedness. Allowed values are 'Right-Handed' and 'Left-Handed'.

defaultSceneUnit

defaultSceneUnit: str Determines which unit system to use for new scenes. This setting should match the unit setting in your 3D modeling application. Allowed values are 'mm', 'cm', 'm', 'km', 'in', 'ft', 'yd' and 'mi'.

rayTraceBackend

rayTraceBackend: str Selects a ray tracing engine for rendering and baking. "Accelerated" attempts to provide the best performance and makes use of new GPU features such as NVIDIA's RTX. "Generic" works on all GPUs but is not as fast. Changing this setting requires an app restart. Allowed values are 'Generic' and 'DXR' (if supported).

importModelsAsReferences

"importModelsAsReferences": type Model files will import as file references instead of simply grouped objects. This allows for quick in-place model reloading. Note that disabling this feature will prevent animated meshes from being imported.

importAbcWithMaterials

"importAbcWithMaterials": type Model files will import along with any available material definitions, including textures and other parameters where available.

importFbxWithMaterials

"importFbxWithMaterials": type Model files will import along with any available material definitions, including textures and other parameters where available.

importObjWithMaterials

"importObjWithMaterials": type Model files will import along with any available material definitions, including textures and other parameters where available.

importPlyWithMaterials

"importPlyWithMaterials": type Model files will import along with any available material definitions, including textures and other parameters where available.

importStlWithMaterials

"importStlWithMaterials": type Model files will import along with any available material definitions, including textures and other parameters where available.

importUsdWithMaterials

"importUsdWithMaterials": type Model files will import along with any available material definitions, including textures and other parameters where available.

import8mlWithMaterials

"import8mlWithMaterials": type Model files will import along with any available material definitions, including textures and other parameters where available.

autoModelReload

"autoModelReload": type Model files will be automatically reloaded when Toolbag regains focus. This only applies to external model references; models not imported as references will not reload.

outputDirectory

"outputDirectory": type Sets the default directory where rendered images are saved when creating a new scene.

sceneStartPref

sceneStartPref: str Selects whether, on startup, Toolbag will open a blank scene, the last opened scene, or the template scene. Allowed values are 'Empty', 'Last Opened' and 'Template'.

newScenePref

newScenePref: str Determines whether new scenes are empty or created from the template scene. Allowed values are 'Empty' and 'Template'.

rememberDimensions

"rememberDimensions": type If enabled, the Toolbag window will load with the same position and size as it was when last closed.

undoVerificationCheck

"undoVerificationCheck": type Runs an extra integrity check on the scene when an action is undone or redone. Also displays diagnostic data in the performance window.

tabletBackend

tabletBackend: str The default backend when using a digitizer, defaults to the latest available to your operating system. Allowed values are 'Windows Pointer' and 'WinTab'.

libraryLocalPath

libraryLocalPath: str Path where first party library content is stored.

libraryUserPath

libraryUserPath: str Path where user third party library content is stored.

libraryAutoUpdate

"libraryAutoUpdate": type Automatically update assets when a new version is available.

autoSaves

"autoSaves": type Automatically save a backup of your scene to the autosave folder at the specified time interval.

autoSaveDuration

autoSaveDuration: float Determines how often autosaving occurs in minutes.

autoSaveMaxCount

"autoSaveMaxCount": type Determines the maximum number of autosaves to keep for a given scene. Older autosaves will be deleted when this value is exceeded. Using a value of 0 will retain all files.

autoSaveFolderSize

autoSaveFolderSize: float Maximum amount of space the autosave folder can use. Older autosaves will be deleted when total size of the folder exceeds this value.

autoSaveUnits

autoSaveUnits: str Determines whether the Maximum Autosave Folder Size is set in 'GBs' or 'MBs'.

autoSaveLocation

"autoSaveLocation": type Determines the folder that backups are saved in.

autoSaveRelativeToMaster

"autoSaveRelativeToMaster": type Creates autosave files in the same folder as your current scene. The Max Saves and Max Autosave Folder Size settings do not apply when this is option enabled.

class UIControl:

User Interface Control

class UIWindow(UIControl):

UIWindow

def addReturn(unknown):

addReturn()

Adds a line return to the window, placing all following elements on the next line.

def addSpace(unknown):

addSpace(width: float)

Adds a space of fixed width to the window, placing all following elements after it.

def addStretchSpace(unknown):

addStretchSpace()

Adds a stretchable space to the Window, placing all following elements after it at the end of the current line.

def clearElements(unknown):

clearElements()

Removes all elements from the window.

def addElement(unknown):

addElement(child: UIControl)

Adds a child control to the Window.

def getElements(unknown):

getElements() -> List[UIControl]

Returns a list of all contained controls.

def close(unknown):

close()

Closes the current window.

title

title: str The title of the Window

visible

visible: bool True if the Window is visible.

width

width: float The width of the Window in screen pixels.

height

height: float The height of the Window in screen pixels.

class UIScrollBox(UIControl):

UIScrollBox

containedControl

containedControl: UIWindow The control contained by the scrollbox object, to which other elements may be added.

class UIDrawer(UIControl):

UIDrawer

title

title: str The text title of the drawer.

onOpenClose

onOpenClose: Callable[[], None] A callable, called when opening/closing the drawer.

containedControl

containedControl: mset.Control The control contained by the drawer object, to which other elements may be added.

open

open: bool The current open/closed state of the drawer.

class UIColorPicker(UIControl):

UIColorPicker

title

title: str The text title of the color picker.

color

color: List[float] The color of the color picker.

class UIListBox(UIControl):

UIListBox

def addItem(unknown):

addItem(item: str)

Adds an item with the label specified to the ListBox.

def clearItems(unknown):

clearItems()

Removes all items from this ListBox.

def selectItemByName(unknown):

selectItemByName(name: str)

Selects the item that matches the name specified.

def selectNone(unknown):

selectNone()

Select no item on the list.

title

title: str The text title of the ListBox.

selectedItem

selectedItem: int The currently selected item in the ListBox.

onSelect

onSelect: Callable[[], None] A callable, called when selecting an item in the ListBox.

onMenuOpen

onMenuOpen: Callable[[], None] A callable, called when opening the ListBox.

class UIButton(UIControl):

UIButton

def setIcon(unknown):

setIcon(icon: str)

Lets you set an image as the button icon.

def setIconPadding(unknown):

setIconPadding(left: float = 0, right: float = 0, top: float = 0, bottom: float = 0)

Lets you set an image as the button icon.

text

text: str The text label of the button.

lit

lit: bool If the button has a highlighted frame.

frameless

frameless: bool If the button has a frame.

onClick

onClick: Callable[[], None] A callable, called when the button is clicked.

class UIBaseTextField(UIControl):

UI Base Text Field. Abstract class, do not use in your plugins.

onChange

onChange: Callable[[], None] A callable, called when the text is changed.

onCancel

onCancel: Callable[[], None] A callable, called when text editing is canceled.

width

width: float The width of the control.

class UITextField(UIBaseTextField):

UI text field, useful for entering in text data.

value

value: str The contents of the text field.

class UITextFieldInt(UIBaseTextField):

UI text field that exclusively works with int values.

value

value: int The numerical value of the text field.

class UITextFieldFloat(UIBaseTextField):

UI text field that exclusively works with floating point values.

value

value: float The numerical value of the text field.

class UIBaseSlider(UIControl):

UI Base Slider. Abstract class, do not use in your plugins.

onChange

onChange: Callable[[], None] A callable, called when the tracked value changes.

width

width: float The width of the control.

class UISliderFloat(UIBaseSlider):

UI slider that exclusively works with float values.

value

value: float The value of the slider.

min

min: float The minimum of the slider range.

max

max: float The maximum of the slider range.

logScale

logScale: float The logarithmic exponent scale of the slider.

logScaleCenter

logScaleCenter: float The center of the logarithmic scale of the slider.

Inherited Members
UIBaseSlider
onChange
width
class UISliderInt(UIBaseSlider):

UI slider that exclusively works with int values.

value

value: int The value of the slider.

min

min: int The minimum value of the slider range.

max

max: int The maximum value of the slider range.

logScale

logScale: int The logarithmic exponent of the slider.

logScaleCenter

logScaleCenter: int The center of the logarithmic scale of the slider.

Inherited Members
UIBaseSlider
onChange
width
class UICheckBox(UIControl):

UICheckBox

value

value: bool The boolean value of the CheckBox.

label

label: str The text label of the CheckBox.

onChange

onChange: Callable[[], None] A callable, called when the CheckBox value is changed.

class UILabel(UIControl):

UILabel

def setMonospaced(unknown):

setMonospaced(monospaced: bool)

Changes this label to a monospaced font.

text

text: str The text of the label.

fixedWidth

fixedWidth: float The desired fixed width of the label.

class Callbacks:

A collection of callable methods which are run during various events. Set these methods via the mset.callbacks global instance.

onSceneLoaded

onSceneLoaded: Callable[[], None] This Callback will run when a new scene is loaded.

onSceneChanged

onSceneChanged: Callable[[], None] This Callback will run when the scene is changed (e.g. by moving an object).

onRegainFocus

onRegainFocus: Callable[[], None] This Callback will run when the application regains focus. This can be useful for plugins that need to refresh files or make other checks when the user switches to Toolbag.

onPeriodicUpdate

onPeriodicUpdate: Callable[[], None] This Callback will run periodically: a few times per second. This can be useful for plugins that need to refresh external files or make frequent polling checks. Since this callback is run frequently, care should be taken to keep the average execution time low, or poor performance could result.

onShutdownPlugin

onShutdownPlugin: Callable[[], None] This Callback will run immediately before the plugin is shut down.

class mset.TextureProjectLayerPaint(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

class mset.TextureProjectLayerVector(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

class mset.TextureProjectLayerFill(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

material

Property of a layer.

projection

projection: Any A property of a layer.

class mset.TextureProjectLayerDecal(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

material

Property of a layer.

projection

projection: Any A property of a layer.

class mset.TextureProjectLayerBlur(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

px

px: int A property of a layer.

class mset.TextureProjectLayerCurves(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

spline

spline: Any A property of a layer.

class mset.TextureProjectLayerGradientMap(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

class mset.TextureProjectLayerHueSaturation(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

class mset.TextureProjectLayerInvert(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

class mset.TextureProjectLayerLevels(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

class mset.TextureProjectLayerSharpen(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

amount

amount: float A property of a layer.

radius

radius: float A property of a layer.

class mset.TextureProjectLayerRecolor(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

class mset.TextureProjectLayerColorSelection(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

source

source: int A property of a layer.

class mset.TextureProjectLayerCurvature(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

contrast

contrast: float A property of a layer.

contrastCenter

contrastCenter: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

class mset.TextureProjectLayerDirection(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

contrast

contrast: float A property of a layer.

contrastCenter

contrastCenter: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

class mset.TextureProjectLayerDirt(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

brightness

brightness: float A property of a layer.

contrast

contrast: float A property of a layer.

creviceContrast

creviceContrast: float A property of a layer.

creviceIntensity

creviceIntensity: float A property of a layer.

creviceThickness

creviceThickness: float A property of a layer.

directionContrast

directionContrast: float A property of a layer.

directionIntensity

directionIntensity: float A property of a layer.

grungeContrast

grungeContrast: float A property of a layer.

grungeIntensity

grungeIntensity: float A property of a layer.

grungeRotation

grungeRotation: float A property of a layer.

grungeScale

grungeScale: float A property of a layer.

invert

invert: bool A property of a layer.

occlusionContrast

occlusionContrast: float A property of a layer.

occlusionIntensity

occlusionIntensity: float A property of a layer.

sharpness

sharpness: float A property of a layer.

class mset.TextureProjectLayerHeight(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

contrast

contrast: float A property of a layer.

contrastCenter

contrastCenter: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

sharpness

sharpness: float A property of a layer.

class mset.TextureProjectLayerOcclusion(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

contrast

contrast: float A property of a layer.

contrastCenter

contrastCenter: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

sharpness

sharpness: float A property of a layer.

class mset.TextureProjectLayerScratch(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

grungeContrast

grungeContrast: float A property of a layer.

grungeIntensity

grungeIntensity: float A property of a layer.

grungeRotation

grungeRotation: float A property of a layer.

invert

invert: bool A property of a layer.

scratchRotation

scratchRotation: float A property of a layer.

class mset.TextureProjectLayerThickness(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

contrast

contrast: float A property of a layer.

contrastCenter

contrastCenter: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

sharpness

sharpness: float A property of a layer.

class mset.TextureProjectLayerCellular(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

jitter

jitter: float A property of a layer.

phase

phase: float A property of a layer.

randomSeed

randomSeed: int A property of a layer.

scale

scale: int A property of a layer.

smoothing

smoothing: float A property of a layer.

warpAmount

warpAmount: float A property of a layer.

warpDetail

warpDetail: float A property of a layer.

class mset.TextureProjectLayerCheckered(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

A

A: List[float] A property of a layer.

B

B: List[float] A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

tileCount

tileCount: int A property of a layer.

warpAmount

warpAmount: float A property of a layer.

warpDetail

warpDetail: float A property of a layer.

class mset.TextureProjectLayerClouds(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

granularity

granularity: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

randomSeed

randomSeed: int A property of a layer.

scale

scale: float A property of a layer.

warpAmount

warpAmount: float A property of a layer.

warpDetail

warpDetail: float A property of a layer.

class mset.TextureProjectLayerGradient(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

scale

scale: float A property of a layer.

class mset.TextureProjectLayerPerlin(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

macroContrast

macroContrast: float A property of a layer.

macroWarpAmount

macroWarpAmount: float A property of a layer.

macroWarpDetail

macroWarpDetail: float A property of a layer.

microContrast

microContrast: float A property of a layer.

microWarpAmount

microWarpAmount: float A property of a layer.

microWarpDetail

microWarpDetail: float A property of a layer.

noisePasses

noisePasses: int A property of a layer.

sampling

sampling: int A property of a layer.

scale

scale: float A property of a layer.

seed

seed: int A property of a layer.

unitCount

unitCount: int A property of a layer.

class mset.TextureProjectLayerTiles(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

bevelDepth

bevelDepth: float A property of a layer.

bevelRoundness

bevelRoundness: float A property of a layer.

bevelWidth

bevelWidth: float A property of a layer.

cornerRoundness

cornerRoundness: float A property of a layer.

groutDepth

groutDepth: float A property of a layer.

groutWidth

groutWidth: float A property of a layer.

groutX

groutX: float A property of a layer.

groutY

groutY: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

maxX

maxX: float A property of a layer.

maxY

maxY: float A property of a layer.

maxZ

maxZ: float A property of a layer.

randomDepth

randomDepth: float A property of a layer.

randomRotation

randomRotation: float A property of a layer.

randomSeed

randomSeed: int A property of a layer.

shadowDepth

shadowDepth: float A property of a layer.

shadowWidth

shadowWidth: float A property of a layer.

tileCount

tileCount: int A property of a layer.

tileDepth

tileDepth: float A property of a layer.

tileHeight

tileHeight: float A property of a layer.

tileOffset

tileOffset: float A property of a layer.

tileWidth

tileWidth: float A property of a layer.

class mset.TextureProjectLayerTurbulence(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

amplitude

amplitude: float A property of a layer.

frequency

frequency: float A property of a layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

macroContrast

macroContrast: float A property of a layer.

macroWarpAmount

macroWarpAmount: float A property of a layer.

macroWarpDetail

macroWarpDetail: float A property of a layer.

microContrast

microContrast: float A property of a layer.

microWarpAmount

microWarpAmount: float A property of a layer.

microWarpDetail

microWarpDetail: float A property of a layer.

noisePasses

noisePasses: int A property of a layer.

projection

projection: Any A property of a layer.

scale

scale: int A property of a layer.

seed

seed: int A property of a layer.

class mset.TextureProjectLayerVoronoi(TextureProjectLayer):

A texture project layer. Used to configure a given layer.

intensity

intensity: float A property of a layer.

invert

invert: bool A property of a layer.

jitter

jitter: float A property of a layer.

phase

phase: float A property of a layer.

projection

projection: Any A property of a layer.

randomSeed

randomSeed: int A property of a layer.

scale

scale: int A property of a layer.

smoothing

smoothing: float A property of a layer.

warpAmount

warpAmount: float A property of a layer.

warpDetail

warpDetail: float A property of a layer.