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