Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maya Import User Property Issue

1 REPLY 1
Reply
Message 1 of 2
Anonymous
268 Views, 1 Reply

Maya Import User Property Issue

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
1 REPLY 1
Message 2 of 2
jiayang.xu
in reply to: Anonymous

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?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report