|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|