Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

maya playblast command not working right in maya 2024

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Craig_Lamorte
880 Views, 2 Replies

maya playblast command not working right in maya 2024

I have a script that creates a thumbnail for our scene.  It uses playblast to create the screenshot, and it used to work in 2022 but having issues in 2024.

 

cmds.playblast(format="iff", filename=os.path.splitext(thumbPath)[0], st=1, et=1, clearCache=1, viewer=0, fo=True,
                       showOrnaments=False, fp=2, percent=100, compression=fileFormat, quality=100, widthHeight=[resolution, resolution])

the command works if i run it in the script editor in an open scene but if its run through our script (which we do move the camera to get the model in the picture) it will come up with this error 

# Error: Unable to allocate offscreen buffer for playblast.
Tags (2)
Labels (2)
2 REPLIES 2
Message 2 of 3

I have found the piece of code that is causing the playblast capture to error and not allocate offscreen buffer.  its when the newly created camera is put into a group and positioned.  Unsure why this code is causing this error, and it worked fine in maya 2022

 

cmds.select(thumbnail_cam[0])
newGrp = mel.eval('group;')
mel.eval('xform -os -piv 0 0 0;')
mel.eval('setAttr "%s.rotateX" -15;' % (newGrp))
cmds.refresh()
cmds.select(newGrp)
newGrp2 = mel.eval('group;')
mel.eval('xform -os -piv 0 0 0;')
mel.eval('setAttr "%s.rotateY" -38.5;' % (newGrp2))
pm.viewFit(thumbnail_cam, all=True)

 

Message 3 of 3

Apparently playblast will error out when the camera is in a group

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report