Area :: Header
Announcing Smoke 2015
Extension 1!
Now with the LUT Editor and Matchbox in the timeline.
Discussion Groups

Open Reality

Reply
Contributor
lluc_1
Posts: 16
Registered: ‎05-24-2011

kFBPT_object

29 Views, 1 Replies
02-06-2012 09:05 AM
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.
Please use plain text.
Contributor
lluc_1
Posts: 16
Registered: ‎05-24-2011

Re: kFBPT_object

02-07-2012 10:59 AM in reply to: lluc_1
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.
Please use plain text.