I have a couple of tear off panels in which my tool create an image plane towards some of the camera.
However, these image planes have the Display set to ‘looking through camera’.
While the specified camera is correct, in one or more of the tear off panels or the main viewport, the created image plane are not displayed with the image files in these panels unless I either hover my mouse cursor to do a zoom/pan, or if I re-tear off the panels or I set an active focus onto one of the panel and hit ‘F’ on the keyboard to frame all.
Even so, is there a command (cmds/ mel) that will allows me to iterate all panels/viewports and refresh them so that the created image plane (with images of course) will be displayed with image?
I tried the following:
viewports = cmds.getPanel( all = True)
for view in viewports:
if 'modelPanel' in view:
cmds.modelEditor( view, edit = True)
cmds.setFocus(view)
mel.eval('fitAllPanels all')
But I keep getting an error - There is no active view