Help with FBX SDK (FbxProperty)

278 views
Skip to first unread message

Christian Gotzinger

unread,
Aug 25, 2014, 10:27:27 AM8/25/14
to soft...@listproc.autodesk.com
Hi list,

Does anybody have some experience with the FBX SDK? I'm writing an external Python application to analyze FBX files.
Everything has worked well so far, but here's where I'm stuck: I need to read shader information, such as diffuse color or specular color.

The core code inside my loop looks like this:
prop_new = node.GetNextProperty(prop)
if prop_new.GetName() == "DiffuseColor":
  castProperty = fbx.FbxPropertyDouble3(prop_new)

But now I can't figure out how to extract the three float values from castProperty.
print castProperty.Get() tells me "<fbx.FbxDouble3 object at 0x000....>"
print castProperty.Get().mData[0] tells me "FbxDouble3 object has no attribute mdata"

Maybe I'm unable to read the documentation correctly.
FbxProperty:
http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/index.html?url=cpp_ref/class_fbx_property.html,topicNumber=cpp_ref_class_fbx_property_htmlb0f98359-b7ce-427b-b82e-dff4d47ce167

Christian Gotzinger

unread,
Aug 25, 2014, 10:37:50 AM8/25/14
to soft...@listproc.autodesk.com
Well, of course I figure it out 3 minutes after I sent the question. castProperty.Get()[0] gives me the first of the three values. Problem solved.
Reply all
Reply to author
Forward
0 new messages