MEL hideShow command

MEL hideShow command

joris.jehs
Explorer Explorer
362 Views
1 Reply
Message 1 of 2

MEL hideShow command

joris.jehs
Explorer
Explorer

Hello,

 

I wrote a python script containing the command 'mel.eval('ShowPolygonSurfaces')'. The script works fine in Maya.

When trying the script in maya.standalone however, I get an error saying 'can't find hideShow command' (I'm paraphrasing).

hideShow is the command used by the ShowPolygonSurfaces mel script.

 

Does anybody know why this command can't be used in maya standalone?

 

Thanks!

 

0 Likes
Accepted solutions (1)
363 Views
1 Reply
Reply (1)
Message 2 of 2

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

I can confirm that maya.standalone doesn't seem to find the hideShow procedure.

I'm not sure why it doesn't find it.

 

But I can give you code that does the same thing as "mel.eval(ShowPolygonSurfaces)" and works in maya standalone:

import maya.cmds as cmds

polySurfaces = cmds.ls(type = "mesh")

for p in polySurfaces:
    p = cmds.listRelatives(p, p= True)[0]
    cmds.setAttr("{}.visibility".format(p), 1)

 

I hope it helps!