Hey guys,
i have this method to produce a screenshot for a pose Library tool. In Maya 2013 it works flawless and produces an image in the specified directory,
in Maya 2012 it doesnt produce a screenshot at all (probably in the temp folder, but not in the path specified).
I dont think its a PyMel issue, the MEL and maya.cmds calls dont give the expected result in 2012 as well.
Any ideas anybody?
Here is the function:
#takeScreenshotForPoseBtn
def takeScreenshotForPoseBtn(filepath, filename, filesizeW, filesizeH):defaultRenderGlobalsNode = pm.PyNode(‘defaultRenderGlobals’)
#Get Current imageFormat from renderglobals
currentImageFormat = pm.getAttr(defaultRenderGlobalsNode.name()+‘.imageFormat’)#Set new imageFormat to jpg
defaultRenderGlobalsNode.setAttr(‘imageFormat’, 8)#Create Playblast image
#create playblast image path
playblastImagePath = filepath +filename + ‘.jpg’
pm.playblast(cf = playblastImagePath, fr = [pm.currentTime()],wh = (filesizeW, filesizeH), fmt = ‘image’,o = False, orn = False, v = False, p = 100)#Reset imageFormat to old one
defaultRenderGlobalsNode.setAttr(‘imageFormat’, currentImageFormat)
…sry, i dont seem to find the code tag right now…