Hi there.
Probably I am looking for something evident for technical artists.
But I can't figure out how to switch vertex color in the viewport using mel.
I tried to use the command I found in the ColorSet Editor.
colorSetDisplay 1"-colorShadedDisplay" 1;
But it causes the following assertions.
// Error: line 1: Cannot find procedure "colorSetDisplay". //
Probably the problem is the ColorSet Editor has to be run somehow before calling a command placed in it. But I have no idea how to do that.
I would appreciate any help or explanation.
Thank you.
Solved! Go to Solution.
Solved by Kahylan. Go to Solution.
Hi!
vertexColor isn't a viewport attribute, it's a per object attribute that can be turned on by setting the "displayColors" attriubte on a mesh shapenod to 1.
This Mel command will turn this command on for all meshes in the scene:
proc switchOnColorDisplay(){
string $geo[] = `ls -type "mesh"`;
for ($g in $geo){
setAttr ($g + ".displayColors") 1;
}
}
switchOnColorDisplay()
This will turn it off for all the meshes in the scene:
proc switchOffColorDisplay(){
string $geo[] = `ls -type "mesh"`;
for ($g in $geo){
setAttr ($g + ".displayColors") 0;
}
}
switchOffColorDisplay()
I hope it helps!
Can't find what you're looking for? Ask the community or share your knowledge.