
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm writing a wrapper around playblast to set some parameters the way we want them.
I want to set some attributes on the camera before playblasting, which I should be able to find with this:
panel = cmds.getPanel(withFocus=True)
camera = cmds.modelPanel(panel, query=True, camera=True)
But if I click on the script editor and then on my button to fire off the playblast, often the panel with focus turns out to be the script editor. Somehow, the playblast command still always seems to use the correct panel. How can I accurately get the same panel/camera that the playblast command will use?
I can kludge it by defaulting to the first visible modelPanel, or even just to modelPanel4, but I hate to do that.
Thanks!
Solved! Go to Solution.