Is it possible to get the associated FbxNode with enum ENodeId? for example, if I want to get FbxNode from Character::eLeftHand
I tried using Character::GetCharacterLink(ENodeId, FbxCharacterLink) then extracting FbxNode from FbxCharacterLink just by calling FbxCharacterLink::mNode
However, this function returns False for most ENodeIds, so no FbxCharacterLink is created.
character = myScene.GetCharacter(0) lefthand = character.eLeftHand lefthand_node = FbxCharacterLink() character.GetCharacterLink(lefthand, lefthand_node) # False lefthand_node = lefthand_node.mNode
when I wrote scripts inside Motionbuilder using Python and Pyfbxsdk , it was very simple, no matter what the skeleton objects are called, I can get FBXObject from it
m = character.GetModel(self.BodyNodeObject[o])
and BodyNodeObject generated using
def BodyNodes(self): for i in dir(FBBodyNodeId): if i[0] == 'k': try: self.BodyNodeObject[BodyNodesId[i]] = getattr(FBBodyNodeId, i) except: pass
BodyNodesId is just a dictionary
BodyNodesId = OrderedDict({ 'kFBChestNodeId':'Spine1', 'kFBHeadNodeId':'Head', 'kFBHipsNodeId':'Hips', 'kFBLeftAnkleNodeId':'LeftFoot', 'kFBLeftCollarNodeId':'LeftShoulder', 'kFBLeftElbowNodeId':'LeftForeArm', ... })