Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / GetIOSettings in KFbxPlugin derived extension
  RSS 2.0 ATOM  

GetIOSettings in KFbxPlugin derived extension
Rate this thread
 
49009
 
Permlink of this thread  
avatar
  • Total Posts: 1
  • Joined: 02 November 2010 12:51 PM

I’m having some problems with 2011.2 with code that used to work in 2010 versions. I have a KFbxPlugin based extension which among other things offered the artists the option of automatically collapsing all Scene XREFs prior to export.

It used the following code:

virtual bool SpecificInitialize() {
 odprintf
("Specific Initalise.");
 
//Register CustomObject class with the plug-in's manager
 
gSdkManager GetData().mSDKManager;
 if (!
gSdkManager{
 odprintf
("Failed to get SDK Manager");
 return 
false;
 
}
 gUserNotification 
gSdkManager->GetUserNotification();
 
gSdkManager->RegisterFbxClass(PLAYBOX_CLASS_NAMEFBX_TYPE(PlayboxCustomSpline), FBX_TYPE(KFbxGenericNode), PLAYBOX_CLASS_TYPEPLAYBOX_CLASS_SUBTYPE);
 
// get plugin registry
 
KFbxIOSettingspIOSettings gSdkManager->GetIOSettings();
 if (!
pIOSettings{
 odprintf
("Failed to get IO Settings");
 return 
false;
 
}

Wheras before in 2010 this used to work and I could add custom properties to the IOSettings, now the GetIOSettings() call returns NULL? Is this intended? Am I doing this the right way? What do I do in order to offer my artists custom options? Would upgrading to 2011.3 solve this?



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

Hi, johnfredcee,
With your code I can not see how the gSdkManager is initialized before your SpecificInitialize().
So maybe you did not initialize the gSdkManager with a proper IOSettings.
Please take a look at Common.cxx of any FBX SDK sample, the function InitializeSdkObjects, it might be helpful:
// create an IOSettings object
KFbxIOSettings * ios = KFbxIOSettings::Create(pSdkManager, IOSROOT );
pSdkManager->SetIOSettings(ios);

Author: Jiayang Xu

Replied: 15 November 2010 06:47 PM