Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Playblasting from a new modelEditor?
  RSS 2.0 ATOM  

Playblasting from a new modelEditor?
Rate this thread
 
53769
 
Permlink of this thread  
avatar
  • tmeade
  • Posted: 28 March 2011 08:31 PM
  • Total Posts: 15
  • Joined: 23 August 2006 11:53 PM

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.showWindowwindow )

# 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



Replies: 0