|
Hi,
I am writing a playblasting tool that needs to create a new tearoff window and playblast from that. However, even after setting the focus to the new editor, Maya still playblasts from the one I had selected before. Check it out:
import maya.cmds as cmds
# Build the UI window = cmds.window() form = cmds.formLayout() editor = cmds.modelEditor()
cmds.showWindow( window )
# Set the focus to the new editor cmds.setFocus(editor)
# Verify that the new editor is active print 'activeView: ', cmds.playblast(activeEditor=1)
# And Playblast cmds.playblast(format='image')
It is as if Maya doesn’t have time to draw the new editor before it starts. I have tried several schemes and checks to make sure I have the correct editor active. Also, running this in the script editor line by line works fine.
Anyone have any ideas?
Thanks,
-TOM
|
|
|