Hello everyone,

I’m trying to develop a hide/show functionality using python in Maya.

I was able to develop a functionality that assigns colors to selected 
meshes using the polyColorPerVertex command.

```
cmds.polyColorPerVertex(self.select, rgb=(1,0.5,0), cdo=1) 
#I fetch self.select using the cmds.ls (sl-True) command, which I have 
declared previously
```

coming to the problem now , I need to develop a Hide/Show functionality , 
so far , I’ve tried to turn off the visibility mode , using cdo=0 and it 
did not work 

```
cmds.polyColorPerVertex(self.select, cdo = 0) 
```

I have also tried to set it as a attribute using
```
for obj in self.select: 
      cmds.setAttr('obj.displayColors',False) 
```

and I’m gettng the following error
RuntimeError: setAttr: No object matches name: obj.displayColors 

Can someone help me on where I could be going wrong or help me with any 
python command which could enable me to design the Hide/Show functionality.

Thank you! Good day.


-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/d3cf8e67-4c27-43fa-ab89-fcd011acbeb1n%40googlegroups.com.

Reply via email to