KeyShot 11.0 Headless Scripting Documentation

built-in module lux

lux          index (built-in)
The module contains various classes and functions to use for manipulating the scene and rendering images/animations/XRs/configurations.
  Classes
MaterialGraph encapsulates a graph of material nodes that constitutes a material in the scene, and enables manipulation of material parameters, adding/removing material nodes, and associating them with input and output edges. Get a material graph by using lux.getMaterialGraph(name).
 

Methods defined here:
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__le__(self, value, /)
Return self<=value.
__lt__(self, value, /)
Return self<value.
__ne__(self, value, /)
Return self!=value.
__repr__(self, /)
Return repr(self).
__str__(self, /)
Return str(self).
executeGeometryNodes(...)
Executes any pending geometry nodes related to the material of the graph.
getEdgeFromID(...)
Get edge of material graph specified by edge ID.
id = Edge ID. *
getMaterialName(...)
Get graph's material name.
getMaterialNodes(...)
Get list of material root nodes. For a multi-material, this is the individual sub-material roots. For a regular material, this is a list with a single item that is the same as getRoot().
getNodeFromID(...)
Get node of material graph specified by node ID.
id = Node ID. *
getNodes(...)
Get list of all material nodes of the graph. The edges are considered irrelevant in this function.
getNodesFromType(...)
Get nodes of material graph specified by node type.
type = Node type. See `lux.SHADER_TYPE_..` for possibilities. *
getRoot(...)
Get root node of material graph.
newEdge(...)
Create new edge between two nodes for a specific parameter in the material graph.
source = Node ID or lux.ShaderNode instance. *
target = Node ID or lux.ShaderNode instance. *
param = Parameter of target to attach source node to. *
newNode(...)
Create new node in the material graph.
type = Shader node type to create. See `lux.SHADER_TYPE_..` for possibilities. *
removeEdge(...)
Remove edge from material graph.
edge = Edge ID or lux.ShaderEdge instance to remove. *
removeNode(...)
Remove node from material graph.
node = Node ID or lux.ShaderNode instance to remove. *
setCurrentSubMaterial(...)
Set sub-material to specified node.
node = Node ID or lux.ShaderNode instance to set. *
setMultiMaterial(...)
Controls multi-material features of material graph. If disabling a multi-material, the current active sub-material will become root of the material and other sub-materials will be removed.
enable = Enable or disable. *

Static methods defined here:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
RenderOptions encapsulates render options in a clear and concise way. The options can be persisted as a dictionary using getDict() and fed to RenderOptions(dict=your_dict) when employing it.
 
The rendering mode can be found by the "render_mode" key of the dictionary. It can have three values: lux.RENDER_MODE_ADVANCED, lux.RENDER_MODE_TIME, or lux.RENDER_MODE_SAMPLES.
 
Get an instance of the current render options using lux.getRenderOptions().
 

Methods defined here:
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__gt__(self, value, /)
Return self>value.
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__le__(self, value, /)
Return self<=value.
__lt__(self, value, /)
Return self<value.
__ne__(self, value, /)
Return self!=value.
__repr__(self, /)
Return repr(self).
__str__(self, /)
Return str(self).
getDict(...)
Get specified options as a dictionary. This can be useful to persist options and then supply to a lux.RenderOptions() constructor when needed to render something. Be wary of the version specified in the dictionary, key values will be converted to the latest version automatically.
setAddToQueue(...)
Instead of rendering immediately then it will be added to the internal KeyShot queue, waiting for processing. Note that a copy of the scene will be saved to disk each time. Call lux.processQueue() to process the queue and render what has been added to it.
add = Whether to add to queue or not. *
setAdvancedRendering(...)
Render in advanced mode with specified samples.
samples = The number of samples. *
setAntiAliasing(...)
Set anti aliasing level.
level = Value from 1 to 8. *
setBackgroundRendering(...)
Render in external background process. Note that a background window will open and the call-site will return immediately!
ext = Whether to render in background or not. *
setCausticsQuality(...)
Set caustics quality.
quality = Value from 0 to 10 (0 will disable it). *
setDofQuality(...)
Set depth-of-field quality.
quality = Value from 1 to 10. *
setGlobalIllumination(...)
Set global illumination quality.
quality = Quality from 0 to 5 (0 will disable it). *
setGlobalIlluminationCache(...)
Set whether or not to use global illumination cache.
enable = Use cache. *
setIndirectBounces(...)
Set the number of indirect bounces.
bounces = The number of indirect bounces. *
setMaxSamplesRendering(...)
Render until max samples is reached.
samples = Maximum samples. *
setMaxTimeRendering(...)
Render the amount of time specified.
time = Time in seconds (floating-point number). *
setOutputAlphaChannel(...)
Set whether to have alpha channel in output image.
enable = Use alpha channel or not. *
setOutputAmbientOcclusionPass(...)
Output ambient occlusion pass separate to the result.
enable = Output ambient occlusion pass. *
setOutputCausticsPass(...)
Output caustics pass separate to the result.
enable = Output caustics pass. *
setOutputClownPass(...)
Output clown pass separate to the result.
enable = Output clown pass. *
setOutputDepthPass(...)
Output depth pass separate to the result.
enable = Output depth pass. *
setOutputDiffusePass(...)
Output diffuse pass separate to the result.
enable = Output diffuse pass. *
setOutputDirectLightingPass(...)
Output direct lighting pass separate to the result.
enable = Output direct lighting pass. *
setOutputIndirectLightingPass(...)
Output indirect lighting pass separate to the result.
enable = Output indirect lighting pass. *
setOutputNormalsPass(...)
Output normals pass separate to the result.
enable = Output normals pass. *
setOutputReflectionPass(...)
Output reflection pass separate to the result.
enable = Output reflection pass. *
setOutputRefractionPass(...)
Output refraction pass separate to the result.
enable = Output refraction pass. *
setOutputRenderLayers(...)
Output render layers separate to the result
enable = Output render layers. *
setOutputShadowPass(...)
Output shadow pass separate to the result.
enable = Output shadow pass. *
setPixelBlur(...)
Set pixel blur.
blur = Value from 1 to 3. *
setRayBounces(...)
Set the number of ray bounces.
bounces = The number of ray bounces. *
setRegion(...)
Set render region to get subset of image.
region = Tuple/list of (start x-axis, start y-axis, end x-axis, end y-axis). Use None to unset a region. *
setSendToNetwork(...)
Instead of rendering locally it can be done using KeyShot Network Rendering.
send = Whether to send to network or not. *
setShadowQuality(...)
Set shadow quality.
quality = Value from 1 to 10. *
setSharpShadows(...)
Set whether to have sharp shadows or not.
enable = Output sharp shadows. *
setSharperTextureFiltering(...)
Set whether or not to preserve detail in textures when viewed at grazing angles.
enable = Output sharper texture filtering. *
setThreads(...)
Set the number of rendering threads. Zero threads means one thread per core.
threads = The number of threads. *

Static methods defined here:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.

Data and other attributes defined here:
__hash__ = None
SceneNode encapsulates a node in the scene tree and enables for manipulation, such as hiding/showing, locking/unlocking, setting materials etc., and traversal of the tree. It provides a means for searching and accessing groups, objects and animations for global and local operations. Get an instance of the root of the scene tree using lux.getSceneTree().
 

Methods defined here:
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__le__(self, value, /)
Return self<=value.
__lt__(self, value, /)
Return self<value.
__ne__(self, value, /)
Return self!=value.
__repr__(self, /)
Return repr(self).
__str__(self, /)
Return str(self).
applyTransform(...)
Apply a transformation (luxmath.Matrix) to the node and its children.
For example, to scale the node to 1/10 of the size:
  T = luxmath.Matrix().makeIdentity().scale(0.1)
  node.applyTransform(T)
Where 'node' is your lux.SceneNode.
Or move an object to absolute position (1, 2, 3):
  T = luxmath.Matrix().makeIdentity().translate(luxmath.Vector((1, 2, 3)))
  node.applyTransform(T, absolute = True)
 
trans = The transformation (luxmath.Matrix) to apply. *
absolute = Whether to make an absolute transformation instead of a relative one. Must be an object node for absolute transform. (default = False)
centerAndFit(...)
Centers and fits the node.
deselect(...)
Visually deselects node in the scene.
dump(...)
Returns a string representation of the node and its children.
duplicate(...)
Duplicate current node and subtree.
amount = The amount of duplicates to create (default = 1).
linkMats = Whether to link materials or not (default = false).
find(...)
Find nodes in the subtree of this node by searching part names and material names. If no names or materials are given then it will find everything.
name = Part name to search for (string/tuple/list). 
mat = Material name to search for (string/tuple/list). 
all = Match all part names or all material names (default = false).
types = Filter results to match types (int/tuple/list) which can be the following the values: lux.NODE_TYPE_GROUP, lux.NODE_TYPE_OBJECT, lux.NODE_TYPE_ANIMATION, lux.NODE_TYPE_MODEL_SET, and lux.NODE_TYPE_MODEL default = all types). 
depth = The amount of levels to go down the tree. A value of 1 means to only match the direct children of this node etc. (default = -1 = all)
getBoundingBox(...)
Get bounding box of node as a tuple of two vectors: min and max.
world = Whether to be in world space or not (default = false).
getCenter(...)
Get the center of this node.
world = Whether to be in world space or not (default = false).
getChildren(...)
Get children of group.
getHidden(...)
Get hidden nodes of a group (recursive).
getID(...)
Get node ID.
getKind(...)
Get node kind. Can be one of the following values: lux.NODE_TYPE_GROUP, lux.NODE_TYPE_OBJECT, lux.NODE_TYPE_ANIMATION, lux.NODE_TYPE_MODEL_SET, or lux.NODE_TYPE_MODEL.
getLocked(...)
Get locked nodes of a group (recursive).
getMaterial(...)
Get material of a node.
getName(...)
Get node name.
getParent(...)
Get parent node of this node.
getPath(...)
Get path from root to this node as a tuple of lux.SceneNode objects.
text = Whether to return the names instead of lux.SceneNode objects (default = false).
getRenderLayer(...)
Get render layer for associated node, if any.
getSelected(...)
Get selected nodes of a group (recursive).
getTransform(...)
Get the transformation matrix of this node.
world = Whether to be in world space or not (default = false).
hide(...)
Hide node.
isAnimation(...)
Check if node is an animation.
isDescendantOf(...)
Checks if this node is a descendant of the input group node.
group = Group node to check sub-tree of. *
isGroup(...)
Check if node is a group.
isHidden(...)
Check if node is hidden.
isLocked(...)
Check if node is locked.
isModel(...)
Check if node is a model (direct child of a model set).
isModelSet(...)
Check if node is a model set.
isObject(...)
Check if node is an object.
isSelected(...)
Check if node is selected in the scene.
lock(...)
Lock node.
moveToGroup(...)
Move this node to another group node. Note: This changes the scene tree.
group = Group node to move this node to. *
select(...)
Visually selects node in the scene.
setMaterial(...)
Set material of a node. If applying to a group then it will apply to all sub nodes.
mat = The name of the material or multi-material to apply. It can also be an instance of lux.MultiMaterial. *
setName(...)
Set name of node.
name = New name of node. *
setRenderLayer(...)
Associate node with render layer, creating it if name is non-existent. Current render layer will be unset if name is unspecified or empty.
name = Render layer name. (See available ones with lux.getRenderLayers())
show(...)
Show node if hidden.
snapToGround(...)
Snaps node to ground plane.
unlock(...)
Unlock node.

Static methods defined here:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
ShaderEdge encapsulates a shader edge from a source shader node to a target shader node as part of a material graph. Get a shader edge via a shader node from a material graph instance.
 

Methods defined here:
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__le__(self, value, /)
Return self<=value.
__lt__(self, value, /)
Return self<value.
__ne__(self, value, /)
Return self!=value.
__repr__(self, /)
Return repr(self).
__str__(self, /)
Return str(self).
getID(...)
Get shader edge's ID.
getSourceNode(...)
Get source node of shader edge.
getTargetNode(...)
Get target node of shader edge.
isEnabled(...)
Checks if shader edge is enabled.

Static methods defined here:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
ShaderNode encapsulates a shader node as part of a material graph, and enables manipulation of material parameters. Get a shader node via a material graph instance.
 

Methods defined here:
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__le__(self, value, /)
Return self<=value.
__lt__(self, value, /)
Return self<value.
__ne__(self, value, /)
Return self!=value.
__repr__(self, /)
Return repr(self).
__str__(self, /)
Return str(self).
getID(...)
Get shader node's ID.
getInputEdge(...)
Get input edge with specified parameter name.
parameter = Name of parameter. *
getInputEdges(...)
Get all input edges to this shader node.
getName(...)
Get shader node's name.
getOutputEdges(...)
Get all output edges from this shader node.
getParameter(...)
Get parameter with specific name of this shader node.
name = Name of parameter. *
getParameters(...)
Get all parameters of this shader node.
getType(...)
Get shader node's type consisting of a shader type name and human-friendly name.
setName(...)
Set shader node's name.

Static methods defined here:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
ShaderParameter encapsulates a parameter of a shader node as part of a material graph. Get a shader parameter via a shader node instance.
 

Methods defined here:
__hash__(self, /)
Return hash(self).
__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self, /)
Return repr(self).
__str__(self, /)
Return str(self).
getDisplayName(...)
Get display name of shader parameter.
getName(...)
Get name of shader parameter.
getType(...)
Get type of shader parameter. All supported types are found as `lux.PARAMETER_TYPE_...`.
getValue(...)
Get concrete value of shader parameter. Cannot be called on pure parameters.
isPure(...)
Checks if shader parameter is pure, i.e. has no concrete value. Pure parameters cannot get/set concrete values on them!
setValue(...)
Set concrete value of shader parameter. Cannot be called on pure parameters.
value = The supported input types depend on the shader parameter type. *

Static methods defined here:
__new__(*args, **kwargs) from builtins.type
Create and return a new object.  See help(type) for accurate signature.
  Functions
applyMaterialMapping(...)
Applies a material mapping.
dict = Dictionary of object IDs to material names. *
clearGeometry(...)
Clears all geometry in the scene.
deleteMaterial(...)
Deletes material from KeyShot context. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
name = Name of material to delete. *
enablePerformanceMode(...)
Enable or disable performance rendering mode.
enable = Whether to enable or not. (default = true)
encodeVideo(...)
Encodes a video from frames of a folder.
folder = Folder to encode video frames from. *
frameFiles = Name of the frame files. The extension dictates the image format (can be jpg/jpeg, png, exr, or tif/tiff). *
videoName = Name of the video file, if any. The extension dictates the video format (can be mp4, mov, avi, or flv). *
fps = Frames per second. Relates to the number of frames available! *
firstFrame = Frame to start encoding from (defaults to scene settings).
lastFrame = Frame to end encoding at (defaults to scene settings).
keepFrames = Whether to keep the frames after encoding (default = true)
opts = Options specified as a lux.RenderOptions object (see lux.getRenderOptions()).
exportFile(...)
Export scene to a file of specified format.
path = Path to export file to. *
format = Export format can be one of the following values: lux.EXPORT_OBJ, lux.EXPORT_FBX, lux.EXPORT_GLTF (will be saved as GLB if the file extension is '.glb'), lux.EXPORT_STL, lux.EXPORT_3MF, lux.EXPORT_USD. *
mode = Optional texture mode dictionary to provide additional information. The dictionary has the following form:
  {"mode": mode}
where mode can be one of the following values: lux.EXPORT_SINGLE_COLOR (STL), lux.EXPORT_VERTEX_COLOR (STL), lux.EXPORT_BAKING (GLTF, THREEMF, USD). Some modes can take additional options:
  {"mode": lux.EXPORT_VERTEX_COLOR,
   "sub_div": sub_div,
   "stop_criteria": stop_criteria,
   "poly_count": poly_count,
   "edge_length": edge_length}
where sub_div can be either lux.EXPORT_SUB_DIV_NORMAL or lux.EXPORT_SUB_DIV_ADAPTIVE, and stop_criteria can be lux.EXPORT_SUB_DIV_POLYCOUNT or lux.EXPORT_SUB_DIV_EDGE_LENGTH.
  {"mode": lux.EXPORT_BAKING,
   "dpi": dpi,
   "num_samples": number_of_samples,
   "occlusion": include_ambient_occlusion_boolean,
   "draco_compression": Compress using Draco (only GLTF/B),
   "preferred_output": preferred_output}
where preferred_output can be either lux.EXPORT_OUTPUT_TEXTURES or lux.EXPORT_OUTPUT_GEOMETRY_SHADERS.
getAnimationFrame(...)
Returns the current animation frame.
getAnimationInfo(...)
Returns information about the animation; the duration in seconds, and the amount of frames.
getAnimationTime(...)
Returns the current animation time in seconds.
getCamera(...)
Retrieves the currently active camera of the scene.
getCameraDirection(...)
Gets the direction of the active camera of the scene.
getCameraDistance(...)
Get distance from active camera to pivot/look-at point.
getCameraFieldOfView(...)
Gets the field of view of the active camera of the scene.
getCameraFocalLength(...)
Gets the focal length of the active camera of the scene.
getCameraLookAt(...)
Gets the lool-at point of the active camera of the scene.
getCameraPosition(...)
Gets the position of the active camera of the scene.
getCameraUp(...)
Gets the up vector of the active camera of the scene.
getCameras(...)
Retrieves the cameras of the scene.
getExternalFiles(...)
Returns a list of all external files needed by the current scene.
getImportOptions(...)
Returns import options in a dictionary:
 accurate_tessellation: Use alternative tessellation method when available.
 adjust_camera_look_at: Adjust active camera to look at the imported geometry.
 adjust_environment: Adjust environment sphere to fit the imported geometry.
 camera_import: Import cameras if able.
 center_geometry: Center newly added geometry in the scene.
 snap_to_ground: Snap newly imported geometry to the ground plane.
 compute_normals: Compute normals during import, if the format allows.
 geometry_units: The unit of the imported scene, if not automatically detected. Supply as conversion factor from meters, e.g. cm = 100, feet = 3.2808399, etc.
 include_nurbs: Include NURBS data.
 import_type: How to import to scene. Add to scene = 0, Update active geometry = 1, Clear and  import to new scene = 2.
 merge_groups: Apply some post import merging to identically named groups.
 merge_objects: Apply some post import merging to identically named objects.
 retain_materials: Apply material changes to the active model to the imported model.
 separate_materials: Ensure that materials are not linked across parts.
 separate_parts: Prevent objects from being merged during import. Certain formats only.
 tessellation_quality: Tessellation quality from 0.0 to 1.0. Higher values should yield more triangles.
 up_vector: Up vector of the source program. x = 0, y = 1, z = 2, -x = 3, -y = 4, -z = 5
 frame: Import a specific animation frame, if able.
 mayaForceVersion: Maya file import depends on a local Maya installation. This option forces the importer to use a specific version. Should be a string representing the year release, e.g. "2013".
 group_by: For importers with multiple grouping options. Group by Layer = 0, Group by Shader = 1, Group by Object = 2.
 model_set_import_to: Which model set to import to. All = 0, Active = 1, Selected = 2, New = 3
selected_model_set_ids = List of ids of model sets to import to when model_set_import == 2. Get model set id with GetId() on a lux.SceneNode.
ext = File extension to get specific options.
getDefaults = Whether to get KeyShot defaults or user settings from a previous import (default = false).
inclusion_options = A bitwise collection of flags determining which features to import. Set to 31 for all features.
getKeyShotFolder(...)
Returns the path to the specified KeyShot folder.
type = Type of folder to retrieve can be lux.FOLDER_ANIMATIONS, lux.FOLDER_BACKPLATES, lux.FOLDER_COLORS, lux.FOLDER_CONFIG_ROOT, lux.FOLDER_DOWNLOADS, lux.FOLDER_ENVIRONMENTS, lux.FOLDER_EXTERNAL_PLUGIN, lux.FOLDER_FAVORITES, lux.FOLDER_MATERIALS, lux.FOLDER_MATERIAL_TEMPLATES, lux.FOLDER_MODELS, lux.FOLDER_RESOURCE_ROOT, lux.FOLDER_SCENES, lux.FOLDER_SCREENSHOTS, lux.FOLDER_SCRIPTS, or lux.FOLDER_TEXTURES. *
getKeyShotVersion(...)
Returns the KeyShot version as (major, minor, build, arch) tuple, where arch is either "32 bit" or "64 bit".
getLibraryBackplates(...)
Gets all backplates of the library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
filter = Filter by relative path in library, e.g. 'Backplates/Outdoor'.
getLibraryColors(...)
Gets all colors of the library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
filter = Filter by relative path or name, e.g. 'RAL Colours'.
getLibraryEnvironments(...)
Gets all environments of the library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
filter = Filter by relative path in library, e.g. 'Environments/Studio/Basic'.
getLibraryMaterials(...)
Gets all materials of the library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
filter = Filter by relative path in library, e.g. 'Materials/Metal/Titanium'.
getLibraryTextures(...)
Gets all textures of the library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
filter = Filter by relative path in library, e.g. 'Textures/Wood'.
getMaterialGraph(...)
Get lux.MaterialGraph object representing the material graph denoted by the material name.
name = Material name to access. *
getMaterialMapping(...)
Gets material mapping: object ID -> material name.
getMaterialTemplates(...)
Gets material template names.
getMetaData(...)
Get meta data of scene.
format = Format of meta data can be lux.META_DATA_SIMPLE (simple format .meta) or lux.META_DATA_XMP (XML). (default = XMP)
getModelSets(...)
Returns the list of active model sets.
getOS(...)
Returns the OS version string.
getObjectMaterial(...)
Gets the material applied to the object(s).
obj = Object ID or list of IDs. *
getObjects(...)
Gets the object IDs of the scene.
getRenderEngine(...)
Get render engine currently in use.
getRenderLayers(...)
Returns a list of render layers in the current scene.
getRenderOptions(...)
Returns render options as a lux.RenderOptions object. If defaults is set then it will return the internal defaults, otherwise it's the values as they appear in the render dialog.
defaults = Return defaults or not (default = false).
getSceneInfo(...)
Returns information about the scene in a dict: name, file name, unit/meter scale and number of triangles, objects, nurbs, curves, scene width/height, and rendering width/height.
getSceneTree(...)
Get lux.SceneNode object representing the root of the scene tree.
getSphericalCamera(...)
Get spherical information in degrees of active camera as a list: azimuth, inclination, and
twist.
hasContents(...)
Determine if there is any content in the scene.
importFile(...)
Imports a file.
path = File path to import. *
showOpts = Show options dialog (default = false, only in GUI mode).
dontAsk = Whether or not to suppress blocking dialogs while script is running, e.g. save scene (default = true, only in GUI mode).
opts = Options specified as a dictionary (see lux.getImportOptions()).
importMaterials(...)
Imports materials from MTL file into material library. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
file = MTL File path to import materials from. *
folder = The existing sub material library folder to add the materials to, i.e. 'Glass/Basic' (default = '.', which is the root materials folder).
isCameraUnsaved(...)
Checks if current camera has unsaved changes.
isHeadless(...)
Returns whether KeyShot is running in headless or GUI mode.
isPaused(...)
Checks if renderer is paused.
isPerformanceModeEnabled(...)
Checks if performance rendering mode is enabled.
isSceneChanged(...)
Checks if scene has been changed.
loadMaterials(...)
Loads materials from MTL file as in-project materials, i.e. they will not show up in the material library visually.
file = MTL File path to load materials from. *
newCamera(...)
Creates a new camera and makes it active. If not creating unique name and the name exists then it returns false.
name = The name of the camera to create. *
unique = Whether to create a unique name using numbers at the end (default = false)
newModelSet(...)
Create a new model set.
name = The name of the new model set to create. *
newScene(...)
Clears the scene.
dontAsk = Whether or not to suppress blocking dialogs while script is running, e.g. save scene (default = true, only in GUI mode).
openFile(...)
Opens or imports a file.
path = File path to open. *
dontAsk = Whether or not to suppress blocking dialogs while script is running, e.g. save scene (default = true).
pause(...)
Pauses renderer.
prettyPrint(...)
Returns pretty representation of input object.
processQueue(...)
Process render queue.
removeCamera(...)
Removes a camera.
name = The name of the camera to remove. *
removeModelSet(...)
Remove a model set. If current model set is to be removed then the default model set is chosen.
name = The name of the new model set to remove. *
renderImage(...)
Renders the scene to an image file.
path = File path to render to. The extension dictates the image format (can be jpg/jpeg, png, exr, tif/tiff or psd). *
width = Resolution width in pixels of the output image (default = scene width).
height = Resolution height in pixels of the output image (default = scene height).
opts = Options specified as a lux.RenderOptions object (see lux.getRenderOptions()).
format = Image format. Can be one of the following values: lux.RENDER_OUTPUT_JPEG, lux.RENDER_OUTPUT_PNG, lux.RENDER_OUTPUT_EXR, lux.RENDER_OUTPUT_TIFF8, lux.RENDER_OUTPUT_TIFF32, lux.RENDER_OUTPUT_PSD8, lux.RENDER_OUTPUT_PSD16, lux.RENDER_OUTPUT_PSD32 (requires file extension to match).
saveCamera(...)
Saves current camera if there are unsaved changes.
setAnimationFrame(...)
Set the animation frame.
frame = The animation frame number. *
setAnimationTime(...)
Set the animation time in seconds.
secs = The animation time in seconds as a floating-point number. *
setCamera(...)
Sets the active camera of the scene.
camera = The name of the camera to use. *
setCameraDirection(...)
Sets the direction of the active camera of the scene.
dir = Direction of the camera (x, y, z). *
setCameraDistance(...)
Set distance from active camera to pivot/look-at point.
dist = The distance. *
setCameraFieldOfView(...)
Sets the field of view of the active camera of the scene.
deg = Field of view in degrees ]0, 180[. *
setCameraFocalLength(...)
Sets the focal length of the active camera of the scene.
length = Focal length in mm [5, 200]. *
setCameraLookAt(...)
Set camera to look at an object or a point.
obj = Object ID.
pt = Point as tuple (x, y, z).
setCameraPosition(...)
Sets the position of the active camera of the scene.
pos = Position of the camera (x, y, z). *
setCameraUp(...)
Sets the up vector of the active camera of the scene.
up = Up vector of the camera (x, y, z). *
setMaterialTemplate(...)
Applies a material template to part of the scene or all of it if no argument is given. Note: It is required that resource libraries are loaded once per session - the operation blocks while loading.
name = Name of the material template. *
setModelSets(...)
Set active model sets and deativate all others. It returns true if all names of model sets could be activated, and thus false even if only some were activated.
names = The list of names of model sets to activate. Using 'Default' will set the default model set. An empty list deactivates all model sets. *
setObjectMaterial(...)
Applies a material to an object in the scene.
mat = Material name to apply. *
obj = Object ID to apply to. *
setRenderEngine(...)
Set render engine to use for the scene.
engine = Type of render engine to use: lux.RENDER_ENGINE_PRODUCT, lux.RENDER_ENGINE_INTERIOR, lux.RENDER_ENGINE_PRODUCT_GPU, or lux.RENDER_ENGINE_INTERIOR_GPU. *
setSphericalCamera(...)
Set spherical information of active camera: azimuth, inclination, and twist.
azimuth = The spherical azimuth in degrees [-180, 180]. *
incl = The spherical inclination in degrees [-90, 90]. *
twist = The spherical twist degrees [-180, 180]. *
setStandardView(...)
Set standard view of currently active camera.
view = Standard view to set. Must be one of the following: lux.VIEW_FRONT, lux.VIEW_BACK, lux.VIEW_LEFT, lux.VIEW_RIGHT, lux.VIEW_TOP, lux.VIEW_BOTTOM, lux.VIEW_ISOMETRIC. *
sync(...)
Synchronize event queue to enforce pending operations.
unpause(...)
Unpauses renderer.
  Data
EXPORT_3MF = 5
EXPORT_BAKING = 4
EXPORT_FBX = 1
EXPORT_GLTF = 2
EXPORT_OBJ = 0
EXPORT_OUTPUT_GEOMETRY_SHADERS = 1
EXPORT_OUTPUT_TEXTURES = 0
EXPORT_SINGLE_COLOR = 0
EXPORT_STL = 4
EXPORT_SUB_DIV_ADAPTIVE = 2
EXPORT_SUB_DIV_EDGE_LENGTH = 1
EXPORT_SUB_DIV_NORMAL = 1
EXPORT_SUB_DIV_POLYCOUNT = 0
EXPORT_USD = 6
EXPORT_VERTEX_COLOR = 1
FOLDER_ANIMATIONS = 8
FOLDER_BACKPLATES = 3
FOLDER_COLORS = 9
FOLDER_CONFIG_ROOT = 14
FOLDER_DOWNLOADS = 16
FOLDER_ENVIRONMENTS = 5
FOLDER_EXTERNAL_PLUGIN = 13
FOLDER_FAVORITES = 11
FOLDER_MATERIALS = 7
FOLDER_MATERIAL_TEMPLATES = 10
FOLDER_MODELS = 15
FOLDER_RESOURCE_ROOT = 1
FOLDER_SCENES = 6
FOLDER_SCREENSHOTS = 2
FOLDER_SCRIPTS = 12
FOLDER_TEXTURES = 4
META_DATA_SIMPLE = 1
META_DATA_XMP = 0
NODE_TYPE_ANIMATION = 3
NODE_TYPE_GROUP = 1
NODE_TYPE_MODEL = 5
NODE_TYPE_MODEL_SET = 4
NODE_TYPE_OBJECT = 2
PARAMETER_TYPE_ANIMATIONCURVE = 17
PARAMETER_TYPE_AXALTACOLOR = 18
PARAMETER_TYPE_BOOLEAN = 1
PARAMETER_TYPE_COLOR = 13
PARAMETER_TYPE_COLORALPHA = 14
PARAMETER_TYPE_COLORGRADIENT = 16
PARAMETER_TYPE_DOUBLE = 7
PARAMETER_TYPE_DOUBLE3 = 8
PARAMETER_TYPE_FLOAT = 4
PARAMETER_TYPE_FLOAT2 = 5
PARAMETER_TYPE_FLOAT3 = 6
PARAMETER_TYPE_FLOATARRAY = 15
PARAMETER_TYPE_INTEGER = 2
PARAMETER_TYPE_INTEGERLIST = 3
PARAMETER_TYPE_MATRIX = 12
PARAMETER_TYPE_SHADERBUMP = 65539
PARAMETER_TYPE_SHADERGEOMETRY = 65540
PARAMETER_TYPE_SHADERLABEL = 65538
PARAMETER_TYPE_SHADERSURFACE = 65537
PARAMETER_TYPE_SHADERUV = 65541
PARAMETER_TYPE_STRING = 9
PARAMETER_TYPE_STRINGLIST = 10
PARAMETER_TYPE_WEAVEPATTERN = 19
RENDER_ENGINE_INTERIOR = 1
RENDER_ENGINE_INTERIOR_GPU = 4
RENDER_ENGINE_PRODUCT = 0
RENDER_ENGINE_PRODUCT_GPU = 3
RENDER_MODE_ADVANCED = 0
RENDER_MODE_SAMPLES = 2
RENDER_MODE_TIME = 1
RENDER_OUTPUT_EXR = 2
RENDER_OUTPUT_JPEG = 0
RENDER_OUTPUT_PNG = 5
RENDER_OUTPUT_PSD16 = 8
RENDER_OUTPUT_PSD32 = 7
RENDER_OUTPUT_PSD8 = 6
RENDER_OUTPUT_TIFF32 = 3
RENDER_OUTPUT_TIFF8 = 1
SHADER_TYPE_ADVANCED = 'lux_advanced'
SHADER_TYPE_ANISOTROPIC = 'lux_anisotropic'
SHADER_TYPE_AXALTA_PAINT = 'dupont_paint'
SHADER_TYPE_BAKED_PLASTIC = 'lux_baked_plastic'
SHADER_TYPE_BRUSHED = 'lux_brushed2'
SHADER_TYPE_BRUSHED_RADIAL = 'lux_brushed_solid'
SHADER_TYPE_BUBBLES = 'lux_bubbles'
SHADER_TYPE_BUMP_ADD = 'lux_bumpmap_add'
SHADER_TYPE_BUMP_TO_ROUGHNESS = 'lux_bump2roughness'
SHADER_TYPE_CAMOUFLAGE = 'lux_camouflage'
SHADER_TYPE_CELLULAR = 'lux_worley'
SHADER_TYPE_COLOR_ADJUST = 'lux_color_adjust'
SHADER_TYPE_COLOR_COMPOSITE = 'lux_color_blend'
SHADER_TYPE_COLOR_FADE = 'animation_color'
SHADER_TYPE_COLOR_GRADIENT = 'lux_color_gradient'
SHADER_TYPE_COLOR_INVERT = 'lux_color_invert'
SHADER_TYPE_COLOR_KEY_MASK = 'lux_color_distance'
SHADER_TYPE_COLOR_TO_NUMBER = 'convert_rgba_to_float'
SHADER_TYPE_CONTOUR = 'lux_contour_tex'
SHADER_TYPE_CURVATURE = 'lux_curvature'
SHADER_TYPE_CURVE_COLOR_RANDOMIZE = 'lux_curve_randomize'
SHADER_TYPE_CURVE_FADE = 'animation_curve'
SHADER_TYPE_CUTAWAY = 'lux_cutaway'
SHADER_TYPE_DIELECTRIC = 'lux_glass'
SHADER_TYPE_DIFFUSE = 'lux_diffuse'
SHADER_TYPE_DISPLACE = 'lux_displace'
SHADER_TYPE_EMISSIVE = 'lux_emissive'
SHADER_TYPE_FIBER_WEAVE = 'lux_carbon'
SHADER_TYPE_FLAKES = 'lux_flakes'
SHADER_TYPE_FLAT = 'lux_constant'
SHADER_TYPE_FUZZ = 'lux_fuzz'
SHADER_TYPE_GEM = 'lux_gem'
SHADER_TYPE_GENERAL = 'lux_general'
SHADER_TYPE_GENERIC = 'lux_generic'
SHADER_TYPE_GLASS = 'lux_window_glass'
SHADER_TYPE_GLASS_SOLID = 'lux_glass_simple'
SHADER_TYPE_GRANITE = 'lux_granite'
SHADER_TYPE_GROUND = 'lux_ground'
SHADER_TYPE_IES_LIGHT = 'lux_ies_light'
SHADER_TYPE_LEATHER = 'lux_leather_tex'
SHADER_TYPE_LIQUID = 'lux_liquid'
SHADER_TYPE_MAPPING_2D = 'mapping2d'
SHADER_TYPE_MAPPING_WARP = 'lux_mapping_warp'
SHADER_TYPE_MARBLE = 'lux_marble'
SHADER_TYPE_MATCAP = 'matcap'
SHADER_TYPE_MEASURED = '__measured'
SHADER_TYPE_MESH = 'lux_mesh'
SHADER_TYPE_MESH_CIRCULAR = 'lux_lattice_circular'
SHADER_TYPE_MESH_LIGHT = 'lux_mesh_light'
SHADER_TYPE_MESH_POLYGON = 'lux_lattice_polygon'
SHADER_TYPE_METAL = 'lux_metal'
SHADER_TYPE_METALLIC_PAINT = 'metallic_paint'
SHADER_TYPE_MOLD_TECH_PLASTIC = 'lux_moldtech_plastic'
SHADER_TYPE_NOISE_FRACTAL = 'lux_fractal_noise'
SHADER_TYPE_NOISE_TEXTURE = 'lux_noise'
SHADER_TYPE_OBJECT_INFO = 'lux_object_info'
SHADER_TYPE_OCCLUSION = 'lux_occlusion_tex'
SHADER_TYPE_PAINT = 'lux_paint'
SHADER_TYPE_PLASTIC = 'lux_plastic_simple'
SHADER_TYPE_PLASTIC_CLOUDY = 'lux_cloudy_plastic'
SHADER_TYPE_PLASTIC_FIBER = 'lux_textile_fiber'
SHADER_TYPE_PLASTIC_TRANSPARENT = 'lux_plastic'
SHADER_TYPE_POINT_LIGHT = 'lux_point_light'
SHADER_TYPE_RAY_MASK = 'lux_ray_mask'
SHADER_TYPE_REALCLOTH = 'lux_real_cloth'
SHADER_TYPE_ROUNDED_EDGES = 'lux_rounded'
SHADER_TYPE_SCATTERING_MEDIUM = 'lux_scattering_medium'
SHADER_TYPE_SCRATCHES = 'lux_scratches_worley'
SHADER_TYPE_SPOTLIGHT = 'lux_spotlight'
SHADER_TYPE_SPOTS = 'lux_spots'
SHADER_TYPE_SURFACE_BACKSIDE_MASK = 'lux_backside_mask'
SHADER_TYPE_TEXTURE_MAP = '__texture'
SHADER_TYPE_THIN_FILM = 'lux_thinfilm'
SHADER_TYPE_TILED_UV = 'lux_tiled_texturemap'
SHADER_TYPE_TOON = 'lux_toon'
SHADER_TYPE_TRANSLUCENT = 'lux_translucent'
SHADER_TYPE_TRANSLUCENT_ADVANCED = 'lux_translucent2'
SHADER_TYPE_TRANSLUCENT_MEDIUM = 'lux_translucent_mc'
SHADER_TYPE_TRI_PLANAR = 'triplanar'
SHADER_TYPE_VELVET = 'lux_velvet'
SHADER_TYPE_VERTEX_COLOR = 'lux_vertex_color'
SHADER_TYPE_VIDEO_MAP = 'sequence_rgba'
SHADER_TYPE_VOLUME_MAP = 'lux_volume'
SHADER_TYPE_WEAVE = 'lux_weave2'
SHADER_TYPE_WIREFRAME = 'show_wireframe'
SHADER_TYPE_WOOD = 'lux_wood'
SHADER_TYPE_WOOD_ADVANCED = 'lux_wood2'
SHADER_TYPE_XRAY = 'lux_xray'
VIEW_BACK = 2
VIEW_BOTTOM = 6
VIEW_FRONT = 1
VIEW_ISOMETRIC = 7
VIEW_LEFT = 3
VIEW_RIGHT = 4
VIEW_TOP = 5
Copyright by Luxion - Generated on Mon Oct 11 11:50:14 2021 using a modified pydoc.