Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How do I get "last focused" modelPanel like playblast does?

How do I get "last focused" modelPanel like playblast does?

Anonymous
Not applicable
1,218 Views
2 Replies
Message 1 of 3

How do I get "last focused" modelPanel like playblast does?

Anonymous
Not applicable

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!

0 Likes
Accepted solutions (2)
1,219 Views
2 Replies
Replies (2)
Message 2 of 3

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

 

playblast -ae command should be good enough for it.

 

Yours,

Li

 

 

Message 3 of 3

Anonymous
Not applicable
Accepted solution

Doh! I didnt' see that flag, thanks!

0 Likes