AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / Maya Import User Property Issue
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

Maya Import User Property Issue
Rate this thread
 
63703
 
Permlink of this thread  
avatar
  • Location: Midvale, UT
  • Total Posts: 144
  • Joined: 25 March 2010 10:49 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::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*& pSdkManagerKFbxNode *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::eUSERtrue);
    
p2.ModifyFlag(KFbxUserProperty::eUSERtrue);
    
p3.ModifyFlag(KFbxUserProperty::eUSERtrue);
    
p4.ModifyFlag(KFbxUserProperty::eUSERtrue);
    
p5.ModifyFlag(KFbxUserProperty::eUSERtrue);
    
p6.ModifyFlag(KFbxUserProperty::eUSERtrue);

    
// let's make MyColorProperty, MyVector and MyList animatables
    
p3.ModifyFlag(KFbxUserProperty::eANIMATABLEtrue);
    
p5.ModifyFlag(KFbxUserProperty::eANIMATABLEtrue);
    
p6.ModifyFlag(KFbxUserProperty::eANIMATABLEtrue);

    
// we set the default values
    
KFbxColor lRed(1.00.00.0);
    
p1.Set(false);
    
p2.Set(3.33);
    
p3.Set(lRed);
    
p4.Set(11);
    
p5.Set(fbxDouble3(-1.12.2, -3.3));
    
p6.Set(2);

    
// and some limits
    
p4.SetLimits(-5.09.0);
    
p5.SetLimits(0.02.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



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

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?

Author: Jiayang Xu

Replied: 29 January 2012 01:43 PM