Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Open Reality / Accessing Constraint Properties
  RSS 2.0 ATOM  

Accessing Constraint Properties
Rate this thread
 
26114
 
Permlink of this thread  
avatar
  • depsch
  • Posted: 24 April 2009 06:18 AM
  • Total Posts: 6
  • Joined: 26 August 2006 04:35 PM

Hi, I have a Parent/Child constraint which has several models assigned as Sources. I need to be able to access the Offset values and weights for each of the sources in the constraint. Whats the best way to do that?

Thanks



Replies: 0
avatar
  • John McC
  • Posted: 11 August 2009 06:43 PM

If you have a handle to the constraint, you can access the weights by searching on the propertylist for a prop with the name “Weight”:

double weight 0.0;
HFBProperty weightProp constraint->PropertyList.Find( "Weight" )
if ( weightProp )
{
    weightProp
->GetValue( &weightsizeof( double ) )
}

In fact there are a lot of undocumented properties about. Knowing this will open up access to almost everything in MB.

A good way to find properties on items is to either save out an ascii version of the fbx file and browse the object properties section, or to simply print the contents of the propertylist out.



Replies: 0