General tips:
before you start scripting your customized utilities in Python for your SimLab Composer:

  • Always, remember to add from simlabpy import * at the beginning of your script.
  • In python, the semicolon ; is not required at the end of statements.
  • For a single line comment, use # at the beginnig of the line. For multiple lines, use """ at the beginning of the first line and another """ at the end of the last line.
  • You can do Python scripts with:
    1. The Scripts Library of the Automation workbench in SimLab Composer (write, edit, and run in GUI-mode only).
    2. SimLab Visual Scripting (write and run in GUI and non-GUI modes using -fl command).
    3. CLI (run only in non-GUI mode using -py command).

  • Note: Read more about Approaches to automatically do things with SimLab Composer on SimLab blog website.

Scene

The Scene class.

new Scene()
Example
from simlabpy import *
scene = Scene() # Always returns a reference to Scene singleton instance.
Instance Members
reset()
remove(sceneNode)
importFile(filePath)
importFileWithEnvironment(filePath)
setSavingModeToSaveAs(saveAsBool)
openFile(filePath)
exportFile(filePath)
exportFile(filePath, sceneStates)
saveFile(filePath)
render(imagePath, width, height, skipOpenFolder)
renderAnimation(outputDir, beginFrame, endFrame)
getRenderSettings()
getVrSettings()
packTheScene(outputFilePath, baseFileFormat)
movieMaker(outputFolderPath, inputImagesFolderPath, videoQuality, frameRate, outputFormat, audioFilePath)
bakeTexture(smart)
bakeTexture(nodes, smart)
bakeTextureForAnimation(nodes, smart)
setTextureBakingSettings(minSize, maxSize, spp, qualityLevelTop, optimizeBakingTime, maxPolygonsPerObject)
bakeLight(smart)
bakeLight(nodes, smart)
createDoorAndCabinetsAnimation(inputFilePath)
getNodeByName(nodeName)
getNodeBySubString(subString)
getNodesBySubString(subString)
getSceneStateByName(sceneStateName)
getMaterialByName(materialName)
getMaterialsFromScene()
getMaterialFromLibrary(libraryName, materialName)
captureSceneState()
captureSceneStateFromSelection()
setPDFTemplateFileName(pdfTemplateFilePath)
captureSceneImage(outputImagePath, outputImageWidth, outputImageHeight)
createMaterial()
createCamera()
createLight()
createInstanceOf(sceneNode)
createCopyOf(sceneNode)
createRoundTableCameraAnimation(rotateClockWise)
exportSceneData(txtfilePath)
isolate(sceneNode)
unisolate()
snapToGround(nodeName)
retainMaterialPalette(materialPaletteFilePath, retainType)
exportVrPackage(outputFile, packageTitle, packagePublisher, packageDescription, packageType, packageImage, optimize)
addAttribute(sceneNodeName, attributeName, attributeValue, attributeCategory)
replaceObject(includes, doesNotInclude, inputFilePath)
replaceObject(objectNameToReplace, objectNameToReplaceObjectsWith, deleteReplaceWithObjects, useOldName)
replaceObject(nodeToReplace, nodeToBeReplacedWith, deleteReplaceWithObjects, useOldName)
isGUIMode()
getSelectedNode()
applyReplaceRules(filePath)
mergeIdenticalMaterials()
mergeNodesOnMaterial(sceneNodes)
decimateMeshes(sceneNodes, decimationPercentage)
smoothNormals(sceneNodes)
optimizeTextures(compressMaps, removeDuplicatedMaps, maxMapWidth, maxMapHeight, maxEnvironmentWidth, maxEnvironmentHeight, outputDirectory)
optimizeForVR()
replaceMaterial(sceneNode, newMaterial)
findGeometricalInfo(sceneNode)
selectNodes(sceneNodes)
selectAllNodes()
removeAllNodes()
createBoundingBox(sceneNode)

Camera

The Camera class.

new Camera()

Extends Node

Example
from simlabpy import *
newCamera = Camera()
Instance Members
getFov()
getRoll()
getPosition()
getTargetPosition()
getUp()
setFov(fieldOfView)
setRoll(roll)
setPosition(newPosition)
setTargetPosition(newTargetPosition)
setUp(newUpVector)

BoundingBox

The BoundingBox class.

new BoundingBox(sceneNode: Node)
Parameters
sceneNode (Node) A scene node to calculate its bounding box.
Example
from simlabpy import *
scene = Scene()
sceneNode = scene.getSelectedNode()
nodeBoundingBox = BoundingBox(sceneNode)
Instance Members
getCenter()
getMax()
getMin()

SceneState

The SceneState class.

new SceneState()
Instance Members
apply()
isMaterialIncluded()
isCameraIncluded()
isVisibilityIncluded()
isLightIncluded()
isEnvironmentIncluded()
isTransformIncluded()
setMaterialIncluded(includeMaterialState)
setCameraIncluded(includeCameraState)
setVisibilityIncluded(includeVisibilityState)
setLightIncluded(includeLightState)
setEnvironmentIncluded(includeEnvironmentState)
setTransformIncluded(includeTransformState)

RunTime

The RunTime class.

new RunTime()
Example
from simlabpy import *
runtime = RunTime()
Instance Members
setView(newCamera)
setView(topView)
fitAll(drawingAreaWidth, drawingAreaHeight, zoomOutFactor)
getPreferences()

Properties
STANDARD_VIEW_TOP (str) : The standard top view.
STANDARD_VIEW_BOTTOM (str) : The standard bottom view.
STANDARD_VIEW_FRONT (str) : The standard fron view.
STANDARD_VIEW_BACK (str) : The standard back view.
STANDARD_VIEW_RIGHT (str) : The standard right view.
STANDARD_VIEW_LEFT (str) : The standard left view.
STANDARD_VIEW_DEFAULT (str) : The standard default view.
args (Arguments) : To access arguments which run against SimLab Composer from CLI.
dictionaty (Dictionary) : To access dictionary of SimLab Composer.
ui (UI) : Provides UI dialogs and messages.
preferences (Preferences) : Provides UI dialogs and messages.
Example
from simlabpy import *
runtime = RunTime()
topView = runtime.STANDARD_VIEW_TOP
runtime.setView(topView)
from simlabpy import *
runtime = RunTime()
bottomView = runtime.STANDARD_VIEW_BOTTOM
runtime.setView(bottomView)
from simlabpy import *
runtime = RunTime()
frontView = runtime.STANDARD_VIEW_FRONT
runtime.setView(frontView)
from simlabpy import *
runtime = RunTime()
topView = runtime.STANDARD_VIEW_TOP
backView = runtime.STANDARD_VIEW_BACK
runtime.setView(backView)
from simlabpy import *
runtime = RunTime()
rightView = runtime.STANDARD_VIEW_RIGHT
runtime.setView(rightView)
from simlabpy import *
runtime = RunTime()
leftView = runtime.STANDARD_VIEW_LEFT
runtime.setView(leftView)
from simlabpy import *
runtime = RunTime()
defaultView = runtime.STANDARD_VIEW_DEFAULT
runtime.setView(defaultView)
from simlabpy import *
runtime = RunTime()
arguments = runtime.args
from simlabpy import *
runtime = RunTime()
currentDictionary = runtime.dictionary
from simlabpy import *
runtime = RunTime()
theUi = runtime.ui
from simlabpy import *
runtime = RunTime()
prefs = runtime.preferences

Preferences

The Preferences object; a public property of RunTime class. The application preferences of SimLab Composer (Ver. 11.0+).

new Preferences()
Example
from simlabpy import *
runtime = RunTime()
prefs = runtime.preferences
Instance Members
getBool(preferenceName)
getString(preferenceName)
getFloat(preferenceName)
set(preferenceName, newBooleanValue)
set(preferenceName, newStringValue)
set(preferenceName, newFloatValue)

UI

The ui object; a public property of RunTime class.

new UI()
Example
from simlabpy import *
runtime = RunTime()
theUi = runtime.ui
Instance Members
getBool(message, label, init)
getString(message, label, init)
getValue(fromInt, message, label, init)
getColor(title, init)
getNode(message, label)
getNodeArray(message, label)
getOpenFileName(title, init, filter)
getSaveFileName(title, init, filter)

Arguments

The arguments object. A public property of RunTime class.

new Arguments()
Instance Members
isFound(key)
getAsNumber(key)
getAsString(key)
getAsColor(key)
getAsVector3(key)
getAsNumberArray(key)
getAsStringArray(key)
getAsColorArray(key)
getAsVector3Array(key)

Dictionary

The dictionary object. A public property of RunTime class.

new Dictionary()
Instance Members
isFound(key)
getAsNumber(key)
getAsString(key)
getAsColor(key)
getAsVector3(key)
getAsNumberArray(key)
getAsStringArray(key)
getAsColorArray(key)
getAsVector3Array(key)
set(key, floatValue)
set(key, stringValue)
set(key, colorValue)
set(key, vectorValue)
set(key, floatValues)
set(key, stringValues)
set(key, colorValues)
set(key, vectorValues)

Light

The Light class.

new Light()

Extends Node

Example
from simlabpy import *
light  = Light()
Instance Members
getBrightness()
getInnerConeAngle()
getOuterConeAngle()
getColor()
getType()
getIESFileName()
getCastShadow()
getBlend()
setBrightness(newBrightness)
setInnerConeAngle(newInnerConeAngle)
setOuterConeAngle(newOuterConeAngle)
setColor(newColor)
setType(lightType)
setIESFileName(iesFilePath)
setCastShadow(bNewCastShadowStatus)
setBlend(newLightBlend)

Color

The Color class.

new Color(r: float, g: float, b: float)
Parameters
r (float) The red channel.
g (float) The green channel.
b (float) The blue channel.
Example
from simlabpy import *
r = 0.1
g = 0.2
b = 0.3
newColor = Color(r, g, b)
Instance Members
red()
green()
blue()
setRed(newR)
setGreen(newG)
setBlue(newB)

Material

Material class.

new Material()
Example
from simlabpy import *
material = Material()
Instance Members
getName()
getDiffuseColor()
getAmbientColor()
getEmissiveColor()
getSpecularColor()
getEta()
getDiffuseTexture()
getBumpTexture()
getOpacityTexture()
getReflectionTexture()
getNormalTexture()
getRoughnessTexture()
getMaterialType()
setName(newMaterialName)
setDiffuseColor(newdiffuseColor)
setAmbientColor(newAmbientColor)
setEmissiveColor(newEmissiveColor)
setSpecularColor(newSpecularColor)
setEta(newEtaValue)
setDiffuseTexture(newDiffuseTexture)
setBumpTexture(newBumpTexture)
setOpacityTexture(newOpacityTexture)
setReflectionTexture(newOpacityTexture)
setNormalTexture(newOpacityTexture)
setRoughnessTexture(newRoughnessTexture)
setMaterialType(newMaterial)
set(newMaterial)

Matrix4x4

The Matrix4x4 class.

new Matrix4x4(): Matrix4x4
Returns
Matrix4x4: The data type of the returned variable.
Example
from simlabpy import *
matrix = Matrix4x4()
Instance Members
set()
getInverse()
scale(scaleX, scaleY, scaleZ)
scaleInPlace(scaleX, scaleY, scaleZ)
multiply(multiplyMatrix)
multiplyInPlace(multiplyMatrix)
transformPosition(inputVector)
translate(inputVector)
translateInPlace(inputVector)
rotate(inputFromVector, inputToVector)
rotateInPlace(inputVector1, inputVector2)
rotateAboutVectorInPlace(angle, aroundVector)

Node

The Node class.

new Node()
Example
from simlabpy import *
sceneNode = Node()
Instance Members
getName()
setName(newName)
getVisibility()
setVisibility(newVisibility)
getTransform()
getWorldTransform(bIncludeLocalTransform)
setTransform(transform)
getParent()
setParent(newParent)
computeBoundingBox()
addAttribute(attributeName, attributeValue, attributeCategory, attributeSortingKey)
readAttribute(attributeName, attributeCategory)
removeAttribute(attributeName)
updateAttributeValue(attributeName, attributeValue)
getChildren()
rotateByDegree(angleX, angleY, angleZ)

RenderSettings

The RenderSettings class. A private property of Scene class.

new RenderSettings()
Example
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
Instance Members
updateGUI()
stopUpdate()
resumeUpdate()
set(firstArgument, intSecondArgument, floatSecondArgument, boolSecondArgument, colorSecondArgument, strSecondArgument)

Properties
turbidity (int)
renderSolarDisc (bool)
enableAmbientLight (bool)
showStatistics (bool)
enableGroundShadow (bool)
groundReflectionEnableFresnel (bool)
groundReflectsEnvironment (bool)
enableHemisphericalBackplate (bool)
renderMode (int)
backgroundType (int)
backgroundColor (int)
skyStrength (int)
previewRatio (int)
spp (int)
sphericalBackplateRadius (int)
ambientLightStrength (int)
specularDepth (int)
lightDepth (int)
groundReflectionStrength (int)
groundShadowStrength (int)
backplateType (int)
solarHorizontalAngle (float)
solarElevation (float)
groundReflectionRoughness (float)
sunStrength (float)
brightness (float)
envPath (str)
sphericalBackPlateImage (str)
backPlateImage (str) : (Ver. 11.0+)
Example
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.turbidity = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.turbidity))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.renderSolarDisc = False
runtime = RunTime()
runtime.ui.alert(str(renderSettings.renderSolarDisc))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.enableAmbientLight = False
runtime = RunTime()
runtime.ui.alert(str(renderSettings.enableAmbientLight))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.showStatistics = False
runtime = RunTime()
runtime.ui.alert(str(renderSettings.showStatistics))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.enableGroundShadow = False
runtime = RunTime()
runtime.ui.alert(str(renderSettings.enableGroundShadow))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.groundReflectionEnableFresnel = False
runtime = RunTime()
runtime.ui.alert(str(renderSettings.groundReflectionEnableFresnel))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.groundReflectsEnvironment = False
runtime = RunTime()
runtime.ui.alert(str(renderSettings.groundReflectsEnvironment))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.enableHemisphericalBackplate = False
runtime = RunTime()
runtime.ui.alert(str(renderSettings.enableHemisphericalBackplate))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.renderMode = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.renderMode))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.backgroundType = 1 # 0 enables HDR only, 1 enables Sun only, 3 enables both.
runtime = RunTime()
runtime.ui.alert(str(renderSettings.backgroundType))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
newColor = Color(1, 0, 0)
renderSettings.backgroundColor = newColor
runtime = RunTime()
runtime.ui.alert(str(renderSettings.backgroundColor.red()))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.skyStrength = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.skyStrength))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.previewRatio = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.previewRatio))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.spp = 100
runtime = RunTime()
runtime.ui.alert(str(renderSettings.spp))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.sphericalBackplateRadius = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.sphericalBackplateRadius))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.ambientLightStrength = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.ambientLightStrength))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.specularDepth = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.specularDepth))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.lightDepth = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.lightDepth))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.groundReflectionStrength = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.groundReflectionStrength))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.groundShadowStrength = 1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.groundShadowStrength))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.backplateType = 1 # 0 for Image, 1 for Spherical, 2 for From Environment, and 3 for Single Color.
runtime = RunTime()
runtime.ui.alert(str(renderSettings.backplateType))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.solarHorizontalAngle = 1.1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.solarHorizontalAngle))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.solarElevation = 1.1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.solarElevation))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.groundReflectionRoughness = 1.1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.groundReflectionRoughness))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.sunStrength = 1.1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.sunStrength))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.brightness = 1.1
runtime = RunTime()
runtime.ui.alert(str(renderSettings.brightness))
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.envPath = "C:\\Users\\SimLab\\AppData\\Roaming\\SimLab\\SimLab Composer 10\\data\\hdrs\\5516F55C-FE6C-41EB-8465-A19A1C9E482E.exr"
runtime = RunTime()
runtime.ui.alert(renderSettings.envPath)
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.sphericalBackPlateImage = "C:\\Users\\SimLab\\AppData\\Roaming\\SimLab\\SimLab Composer 10\\data\\plates\\856EB27A-96A6-426D-9151-162CC4AA67BD.jpg"
runtime = RunTime()
runtime.ui.alert(renderSettings.sphericalBackPlateImage)
from simlabpy import *
scene = Scene()
renderSettings = scene.getRenderSettings()
renderSettings.backPlateImage = "C:\\Users\\SimLab\\AppData\\Roaming\\SimLab\\SimLab Composer 10\\data\\plates\\6D473578-83DF-4444-8C01-7A9290FB2AF5.jpg"
runtime = RunTime()
runtime.ui.alert(renderSettings.backPlateImage)

VRSettings

The VRSettings class. A private property of Scene class (Ver. 11.0+).

new VRSettings()
Example
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()

Properties
enableNightMode (bool)
exposureOffset (float)
enableFog (bool)
fogColor (Color)
fogDensity (float)
fogDistance (float)
autoAdjustHDRBrightness (bool)
desktopNavigation (int)
playerCameraFOV (float)
enableVRFlying (bool)
disableFlyCollision (bool)
useLightMap (bool)
shadowQuality (int)
cornerShading (int)
measurementUnits (int)
messageBoxScale (float)
catalogs (list)
accuratePhysics (bool) : (Ver. 12.0+)
multipleLightsOnStandaloneDevices (bool) : (Ver. 12.0+)
brightnessFactorOnStandaloneDevices (float) : (Ver. 12.0+)
voiceCommunication (int) : (Ver. 12.0+)
Example
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.enableNightMode = True
runtime = RunTime()
runtime.ui.alert(str(vrSettings.enableNightMode))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.exposureOffset = 2.1
runtime = RunTime()
runtime.ui.alert(str(vrSettings.exposureOffset))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.enableFog = True
runtime = RunTime()
runtime.ui.alert(str(vrSettings.enableFog))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
color = Color(0, 0, 1)
vrSettings.fogColor = color
runtime = RunTime()
runtime.ui.alert(str(vrSettings.fogColor.blue()))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.fogDensity = 5.5
runtime = RunTime()
runtime.ui.alert(str(vrSettings.fogDensity))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.fogDistance = 10.4
runtime = RunTime()
runtime.ui.alert(str(vrSettings.fogDistance))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.autoAdjustHDRBrightness = False
runtime = RunTime()
runtime.ui.alert(str(vrSettings.autoAdjustHDRBrightness))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.desktopNavigation = 1
runtime = RunTime()
runtime.ui.alert(str(vrSettings.desktopNavigation))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.playerCameraFOV = 2.2
runtime = RunTime()
runtime.ui.alert(str(vrSettings.playerCameraFOV))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.enableVRFlying = False
runtime = RunTime()
runtime.ui.alert(str(vrSettings.enableVRFlying))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.disableFlyCollision = True
runtime = RunTime()
runtime.ui.alert(str(vrSettings.disableFlyCollision))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.useLightMap = False
runtime = RunTime()
runtime.ui.alert(str(vrSettings.useLightMap))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.shadowQuality = 0
runtime = RunTime()
runtime.ui.alert(str(vrSettings.shadowQuality))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.cornerShading = 2
runtime = RunTime()
runtime.ui.alert(str(vrSettings.cornerShading))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.measurementUnits = 1
runtime = RunTime()
runtime.ui.alert(str(vrSettings.measurementUnits))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.messageBoxScale = 2.3
runtime = RunTime()
runtime.ui.alert(str(vrSettings.messageBoxScale))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
catalogs = [] 
catalogs.append("catalogA") 
catalogs.append("catalogB") 
vrSettings.catalogs = catalogs
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.accuratePhysics = True
runtime = RunTime()
runtime.ui.alert(str(vrSettings.accuratePhysics))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.multipleLightsOnStandaloneDevices = True
runtime = RunTime()
runtime.ui.alert(str(vrSettings.multipleLightsOnStandaloneDevices))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.brightnessFactorOnStandaloneDevices = 1.4
runtime = RunTime()
runtime.ui.alert(str(vrSettings.brightnessFactorOnStandaloneDevices))
from simlabpy import *
scene = Scene()
vrSettings = scene.getVrSettings()
vrSettings.voiceCommunication = 1
runtime = RunTime()
runtime.ui.alert(str(vrSettings.voiceCommunication))

Texture

The Texture class.

new Texture()
Example
from simlabpy import *
newTexture = Texture()
Instance Members
getScaleU()
getScaleV()
getOffsetU()
getOffsetV()
getPath()
setScaleU(newScaleU)
setScaleV(newScaleV)
setOffsetU(newOffsetU)
setOffsetV(newOffsetV)
setPath(textureMapPath)

Image

Image class.

new Image(sceneState: SceneState)
Parameters
sceneState (SceneState) The scene state to have a reference to its preview image.
Example
from simlabpy import *
scene = Scene()
sceneState = scene.getSceneStateByName("Scene1")
image = Image(sceneState)
Instance Members
getPath()
setPath(imageFilePath)

Vector3

The Vector3 class.

new Vector3()
Example
from simlabpy import *
vector = Vector3()
Instance Members
getX()
getY()
getZ()
getLength()
setX(newX)
setY(newY)
setZ(newZ)
normalize()
subtract(vector)
scaleInPlace(scale)
scale(scale)
dot(vector)
cross(vector)

SimLab Python API for SimLab Composer.

Author: SimLab Soft <support@simlab-soft.com>
Copyright: SimLab Soft 2020.