Best Practices for 3MF Export for 3D Printing.License Server Installation (PC) - Custom.Client Error: Unsupported KeyShot Version. Server Error: Invalid Mac Address (HostID).You can for example create an edge between node1 and node2 on the surface parameter: edge = graph. Or its ID: graph.removeEdge(edge.getID()) Create an edge between two nodes You can remove an edge, either via the instance: graph.removeEdge(edge) You can for example create a metal node like this: metalNode = graph.newNode(lux.SHADER_TYPE_METAL) Remove an edge Or its ID: graph.removeNode(node.getID()) Create a new node You can remove a node, either via the instance: graph.removeNode(node) You can obtain a Python value via () to get an understanding of what’s supported or you can print a representation of the instance ( str() or repr()). tValue("Amber") # Color known by the color library in KeyShot The following would therefore be the correct input for a color parameter: tValue((0.5, 0, 0)) # Red, (0x7F, 0x00, 0x00) If, for example, the parameter was an RGB color and you applied the boolean value, it would yield the error: Color parameter only accepts values of type tuple or list of size 3 containing floats or Is the value supported as input but entered incorrectly it will be shown in a python exception. If, for example, the parameter’s type was a boolean (true or false), you could change the value via: tValue(True) Change parameter valueĪ parameter, parameter, obtained via () or (), can have its value modified via (). This will yield lux.ShaderParameter or error if unknown name. However a node instance was obtained, you can get the parameters from a Material Graph by typing: parameters = node.getParameters()Įach parameter instance is of the type lux.ShaderParameter that you can be interact with.Ī specific parameter can be obtained via: parameter = node.getParameter("parameter name") However a node instance was obtained, you can get the edges from a Material Graph by typing: edges = node.getOutputEdges()Įach edge instance is of the type lux.ShaderEdge that you can be interact with. This will yield lux.ShaderEdge or an error if the name is unknown. However a node instance was obtained, you can get the edges from a Material Graph by typing: edges = node.getInputEdges()Įach edge instance is of the type lux.ShaderEdge that you can be interact with.Ī specific edge can be obtained via: edge = node.getInputEdge("parameter name") The rootNode is an instance is of the type lux.ShaderNode which you can interact with. You can access the root node with the following: rootNode = graph.getRoot() The graph is an instance is of the type lux.MaterialGraph which you can interact with. You can access the material graph like this: graph = lux.getMaterialGraph("name") To see a full list of functions available, type help(lux) in the Scripting Console or visit the online documentation, for GUI or Headless scripting. The following will go through the basic functions to manipulate the Material Graph. Manipulating the Material Graph via Scripting is an advanced feature that has been added in KeyShot 11. Material Graph Manipulation (GUI and Headless)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |