• Advertisement
Sign in to follow this  

Motionbuilder SDK change

This topic is 725 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

 

I got a custom plugin for MoBu written in cpp for MoBu 2010/2013 and 2016.

Since I'd like to use my plugin in 2010 there is no problem. In 2013 and 2016 problem exists and it's connected to SDK changes.

I saw in version 2013 Autodesk changed FBCluster ctor from public to protected as follows:

 

new one :

class FBSDK_DLL FBCluster : public FBComponent {
    __FBClassDeclare( FBCluster,FBComponent );
 
protected:
    /** Constructor. protected access, call FBModel::Cluster instead.
    *    \param    pModel    Parent model in question.
    */
    FBCluster(HFBModel pModel);
 
old one:
class FBSDK_DLL FBCluster : public FBComponent {
__FBClassDeclare( FBCluster,FBComponent );
public:
/** Constructor.
* \param pModel Parent model in question.
*/
FBCluster(HFBModel pModel);
 
 
I used this old one in plugin for MoBu 2010 without any problems, but I cannot port my plugin to newer versions because of this ctor.
Regarding this one information from Autodesk in documentation:
/** Constructor. protected access, call FBModel::Cluster instead.
 
I have no clue how to fix this issue. I tried few weird conversions as:
 
FBProperty* prop = (FBProperty*)model->Cluster.GetInternal();
if( prop == nullptr )
{
FBTrace( "cannot cast GetInternal to FBProperty in tools.\n" );
fclose(f);
return;
}
if( (FBCluster*)prop->GetValuePtr() == nullptr )
{
FBTrace( "cannot cast GetValuePtr to FBCluster in tools.\n" );
fclose(f);
return;
}
 
or
 
FBCluster& mes = *((FBCluster)model->Cluster.GetValuePtr());
 
but with no result.
Any ideas game developers?
 
cheers,
Lukasz
Edited by horzel

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement