What is the best way to check if the current panel is a viewport type?
i am trying to set the 'Image Plane' option (under Show > Image Planes) and 
currently I am doing it as follows:

panel = cmds.getPanel(withFocus=True)
cmds.modelEditor(panel, edit=True, imagePlane=True)

with the assumption that the current panel is a 'valid' viewport.

But this will fails, eg. if I am running the above code in my scriptEditor 
as that is my current focus panel.

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/46a4a173-e0a2-41a0-bcac-038118ce7c2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to