我想使用Fbx sdk从Maya导出/导入骨架信息。我可以从FbxNode
获取平移/旋转/缩放比例信息但是我不知道如何从fbx SDK获取锁定信息,锁定信息意味着平移轴自由度或旋转度自由度。
我发现FbxConstraint类具有lock属性,但是我不知道如何在FbxNode中访问它
FbxSkeleton* lSkeleton = (FbxSkeleton*)FNode->GetNodeAttribute();
auto* bone = new ZBoneMSKel();
FbxDouble3 translation = FNode->LclTranslation.Get();
bone->set_translate(Zt_Vector3D{ translation[0],translation[1],translation[2] });
FbxDouble3 joint_orientation = FNode->PreRotation.Get();
bone->set_joint_orient(Zt_Vector3D{ degree2Radian(joint_orientation[0]),degree2Radian(joint_orientation[1]),degree2Radian(joint_orientation[2]) });
FbxDouble3 rotation = FNode->LclRotation.Get();
bone->set_rotate(Zt_Vector3D{ degree2Radian(rotation[0]),degree2Radian(rotation[1]),degree2Radian(rotation[2]) });
FbxDouble3 rotation_axis = FNode->PostRotation.Get();
bone->set_axis_rotate(Zt_Vector3D{ degree2Radian(rotation_axis[0]),degree2Radian(rotation_axis[1]),degree2Radian(rotation_axis[2]) });
FbxDouble3 scaling = FNode->LclScaling.Get();
bone->set_scaling(Zt_Vector3D{ scaling[0],scaling[1],scaling[2] });
/// how to access the lock info ?
bone->set_x_trans_limit(FNode->TranslationMinX, FNode->TranslationMaxX);
bone->set_y_trans_limit(FNode->TranslationMinY, FNode->TranslationMaxY);
bone->set_z_trans_limit(FNode->TranslationMinZ, FNode->TranslationMaxZ);
bone->set_x_rotate_limit(FNode->RotationMinX, FNode->RotationMaxX);
bone->set_y_rotate_limit(FNode->RotationMinY, FNode->RotationMaxY);
bone->set_z_rotate_limit(FNode->RotationMinZ, FNode->RotationMaxZ);