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 / kFBPT_object
  RSS 2.0 ATOM  

kFBPT_object
Rate this thread
 
64198
 
Permlink of this thread  
avatar
  • lluc
  • Posted: 06 February 2012 04:05 AM
  • Location: Montréal
  • Total Posts: 6
  • Joined: 24 May 2011 03:26 PM

Hi,

i wouls like to know how to get and set data or value from an kFBPT_object property

i add this property type to an custom FBConstraint using c++ ORSDK

exemple:
PropertyCreate("Constrained Object”, kFBPT_object, ANIMATIONNODE_TYPE_OBJECT, false, false );
or also like this, with an predifine member:
.h
HFBProperty mConstrainedProperty;
.cpp
mConstrainedProperty = PropertyCreate("Constrained Object”, kFBPT_object, ANIMATIONNODE_TYPE_OBJECT, false, false );

i am nor able to get and set data or valur from this property.

anny help ?

thx.



Replies: 0
avatar
  • lluc
  • Posted: 07 February 2012 05:59 AM

Ok i find one way to do that.

maybe not an academic way, but it work
i share for who can be interested.

my example it is base on custom c++ FBConstraint
i wished to have this kFBPT_object property add to the custom constraint
to acces this property by c++ and python without boost something

cpp file:
// add the property in the FBCreate() function
PropertyCreate("Constrained Object”, kFBPT_object, ANIMATIONNODE_TYPE_OBJECT, false, false );
PropertyCreate("Source Object”, kFBPT_object, ANIMATIONNODE_TYPE_OBJECT, false, false );

// example with the ReferenceAddNotify function with only one object
bool Custom_Constraint::ReferenceAddNotify( int pGroupIndex, HFBModel pModel )
{
HFBPropertyListObject lProperty;
if ( pGroupIndex == mConstrainedGroup )
{
lProperty = (HFBPropertyListObject)PropertyList.Find( “Constrained Object” );
lProperty->RemoveAll();
lProperty->Add( pModel );
}
if ( pGroupIndex == mSourceGroup )
{
lProperty = (HFBPropertyListObject)PropertyList.Find( “Source Object” );
lProperty->RemoveAll();
lProperty->Add( pModel );
}
return true;
}

sorry for my english.



Replies: 0