|
Howdy,
It seems that Maya imports user properties but they’re locked to 0, and can’t be changed by using the middle mouse button in the view port. I’ve used KFbxProperty::SetLimits() to set the min/max limits, but it has no effect.
Even the file created by the UserProperties example that comes with the FBX SDK imports into Maya with the user properties locked to 0:
void CreateUserProperties(KFbxSdkManager*& pSdkManager, KFbxNode *pNode) {
// Now we create the user properties
KFbxProperty p1 = KFbxProperty::Create(pNode,"MyBooleanProperty", DTBool, "My Bool");
KFbxProperty p2 = KFbxProperty::Create(pNode,"MyRealProperty", DTFloat, "My floating point number");
KFbxProperty p3 = KFbxProperty::Create(pNode,"MyColorProperty", DTColor3, "My Color");
KFbxProperty p4 = KFbxProperty::Create(pNode,"MyInteger", DTInteger, "My Integer");
KFbxProperty p5 = KFbxProperty::Create(pNode,"MyVector", DTDouble4, "My Vector");
KFbxProperty p6 = KFbxProperty::Create(pNode,"MyList", DTStringList, "My List");
/*
NOTE: The properties labels exists only while the property object is in memory.
The label is not saved in the FBX file. When loading properties from the FBX file
it will take the same value as the property name.
*/
// we now fill the properties. All the properties are user properties so we set the
// correct flag
p1.ModifyFlag(KFbxUserProperty::eUSER, true);
p2.ModifyFlag(KFbxUserProperty::eUSER, true);
p3.ModifyFlag(KFbxUserProperty::eUSER, true);
p4.ModifyFlag(KFbxUserProperty::eUSER, true);
p5.ModifyFlag(KFbxUserProperty::eUSER, true);
p6.ModifyFlag(KFbxUserProperty::eUSER, true);
// let's make MyColorProperty, MyVector and MyList animatables
p3.ModifyFlag(KFbxUserProperty::eANIMATABLE, true);
p5.ModifyFlag(KFbxUserProperty::eANIMATABLE, true);
p6.ModifyFlag(KFbxUserProperty::eANIMATABLE, true);
// we set the default values
KFbxColor lRed(1.0, 0.0, 0.0);
p1.Set(false);
p2.Set(3.33);
p3.Set(lRed);
p4.Set(11);
p5.Set(fbxDouble3(-1.1, 2.2, -3.3));
p6.Set(2);
// and some limits
p4.SetLimits(-5.0, 9.0);
p5.SetLimits(0.0, 2.1);
// add elements to the list
p6.AddEnumValue("one");
p6.AddEnumValue("two");
p6.AddEnumValue("three");
p6.AddEnumValue("Four");
p6.InsertEnumValue(0, "zero"); }
Is this a Maya import bug or an FBX SDK bug? When I import the UserProperties example file into Cinema 4D with my plugin it seems to not be locked, but it’s also not seeing the limits.
What’s going on here?
Adios,
Cactus Dan
|