
Pottery is another important source of script as vessels often carry either painted or inscribed writing.
#Maya colorset script how to
So (as in most cases in Maya), multiple methods to achieve a similar effect, depends on your exact needs and preferences how to handle it. Pay attention: if multiples objects share the same material, selecting one will change the color of all others. The best-preserved examples of Maya writing are often from stone monuments, most commonly altars, stelae and elements of architectural sculpture, especially around doorways and stairs. The description above iterated through each color set as. Or if you create multiple texture tiles and use those as UDIMs, you can randomise the UV tile per instance (with the color node). My script is very specific to what Im currently working on and it uses hard-coded values to save time. Or you can use a texture in the base color weight slot and assign the aiUserDataColor directly to the base color. What I wrote earlier: use the aiUserDataColor as input to a texture, you can even do this multiple times and user other color manipulation nodes or texture nodes to change the color and effect. Though I think there are different methods to get a similar result as you are looking for. The color node will never give you more than one color per instance. Once we reach the reproMesh node, this color attribute is written as color per vertex information to the vertices of the repro mesh. The color node creates one color (based on the settings it can be randomised per instance in hue, saturation and value) and passes this color on to the MASH points. In addition to using guide channels you can use Mayas mesh vertex color sets to define parameter values which vary along the surface. Note that a texture can be used here.The way you expect the color node to work is not how it works as I understand it. Default vertex color is 'none' not black, you can't change this (you need to create a vertex first before you can apply a color).

So if you extrude a face with white vertices also the new vertices will be white. cmds. open Maya, open the script editor and in a python tab (right click -> new tab -> python), paste those two lines : import colorKey as cK. Note that this index is 0-based.ĭefault color – Specifies the color to use for vertices/faces that don't have color information. If you edit a mesh you should not loose vertex color information and edits should preserve the color of nearby vertices. import maya.cmds as cmds To set the current color set to be 'color2'. In that case, the user will need to set the value of this parameter to the exact index of the corresponding set when it was exported from 3ds Max. V-Ray proxies exported from 3ds Max that may be used in Maya may not have color/UV set names information. Set Index – Used when Type is set to Set Index (V-Ray proxies only). The values of the UV coordinates will be directly used as colors. Use UV set – When enabled, the Set name will be searched in the list of UV sets instead of the list of color sets. This allows the ability to create a single VRayVertexColors texture to be used by many meshes as long as their color/UV sets share the same name. Starting with Maya 2016, Maya introduced a new multi-threaded evaluation model. def vertexColorFloodMaya(colorSet, value, channelsFalse, False, False, False, replaceTrue): Assigns vertex colors to a specific colorSet of all. To learn more about this model, read the paper linked here. color preference overrides the key color set by the Curve Color attribute. The rest of this page describes the older pre-Maya 2016 evaluation model with dirty propagation. In the Command Line or Script Editor, enter the keyframe MEL command with the. history cmds.listHistory (obj) Get a list of the object's history nodes, which may include a color set. The appropriate color/UV information will be found based on the objects that have this vertex color texture assigned as part of their shading network(s). When writing most Maya plug-ins, knowledge of the Maya Dependency Graph architecture is necessary. You can use cmds.listHistory to get all the inputs from an object, then cmds.ls to filter that result to find any color sets: import maya.cmds as cmds for obj in cmds.ls (slTrue): Loop through the selection. Enter the color or UV set name as specified in the rest of Maya's UI. Set name – Used when Type is set to Set name. Type – Specifies how the vertex color texture will detect the color or UV set to use.

Use the Connection editor to connect a mesh's lorName plug to the colorSet plug of the vertex color texture. This connection is only used if the Type parameter is set to Color Set connection. Color set – Connects the color set name of a mesh. I'm using the MASH module to apply vertex colors to my meshes but I want to connect the color data from the MASH vertex color module to the color output on basic maya materials like blinn and lambert as I can't achieve the effects I want using the Arnold renderer OR the maya hardware renderer.
