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

kFBPT_object

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

kFBPT_object

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

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.

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

Post to forums  

Autodesk Design & Make Report