Save thumbnails with qt in motionbuilder?


#1

Hey Guys,

I’m making a simple pose save tool to allow network sharing, pose blending etc for animators. But I can’t figure out a good way to save thumbnails in motionbuilder. Has anyone done this, and could give me some pointers?

Thanks!


#2

what I have done is saved my pose.fbx file and then merged it into a new scene - this creates a .fbm folder. Within your .fbm folder will be a tiff thumb nail file for every pose you have. The tiff images are only 128 x 128 and the file name is numerical, but those file names are stored within you scene poses properties.

this will print out the file name each pose has stored

for pose in FBSystem().Scene.CharacterPoses:
print pose.PropertyList.Find(“ImageName”).Data

this isn’t the most elegant way of doing it, I wish I knew a way to access the actual thumbnail from the pose as the pose Control uses it.

I hope this helps


#3

cant you make your own thumbnail ? Thats what I do, You could them encode them in base64 and embed them inside your pose. That way you have 1 file per pose.


#4

Something I would try too is to
Open the fbx throught the fbxsdk ( that way you can read it in memory) and look for this:
http://download.autodesk.com/us/fbx/sdkdocs/fbx_sdk_help/files/fbxsdkref/class_k_fbx_thumbnail.html


#5

Hi,
have you tried FBVideoGrabber().RenderSnapshot ?
It allows to grab current viewport and you can save it to file by WriteToTif:

from pyfbsdk import *
image = FBVideoGrabber().RenderSnapshot(700,400, False, False, False, True, True, True, True)
image.ConvertFormat(FBImageFormat.kFBImageFormatRGB24)
image.WriteToTif(r"D:\file.tif","", True)

*checked in mobu 2017

if you won’t add ConvertFormat function (with RGB24 format) it will save it with Alpha (RGBA32), so background will be transparent


#6

Thanks guys, for all the great ideas! FBVideoGrabber is exactly what i’m after thanks. Has anyone had any success in opening a view-port window in qt or any way as a thumbnail camera?