Area :: Header
Sweat, Swearing & Tears
Meet the team behind Cupcakes & Critters in the latest chapter of Autodesk’s documentary series on indie game makers.
Discussion Groups

FBX SDK

Reply
Distinguished Contributor
Cactus Dan
Posts: 144
Registered: ‎03-25-2010

Maya Import User Property Issue

50 Views, 1 Replies
01-20-2012 09:06 AM
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::smileyfrustrated:etLimits() 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
Please use plain text.
Distinguished Contributor
jiayang.xu
Posts: 504
Registered: ‎04-21-2008

Re: Maya Import User Property Issue

01-29-2012 06:43 PM in reply to: Cactus Dan
Hello, I cannot reproduce the issue, and what do you mean exactly "can’t be changed by using the middle mouse button in the view port"?

I used the UserProperties sample in FBX SDK 2012.2 and Maya 2012.
Import the FBX file from UserProperties sample to Maya, then check the Channel Box or the "Extra Attributes" of Cube in Attribute Editor, I can see all the user properties, they are not locked to 0, and can be changed freely on channel box or Attribute Editor.

Did I miss anything?
Please use plain text.