I use python line (lower left )to test that code and when it works I know
it will once viewport is active. When you use script editor it is used as
active panel.
tomas

st 5. 6. 2019 o 1:06 kiteh <kiteh.0...@gmail.com> napĂ­sal(a):

> 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
> <https://groups.google.com/d/msgid/python_inside_maya/46a4a173-e0a2-41a0-bcac-038118ce7c2b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEUzAD3nJ4Bj0YCz5UrVY97QBh9ERASkbhcDJVRa--ixh%3DGQwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to