3ds max fbx extension sdk question

HI all,

I am currently creating FBX extension plugin to export custom data form max. but it doesn’t work. I think I made mistake but I’m not sure what it is.
Does anyone have any experience with this?

blow are tools and sdk that I am using

  • visual studio 2019
  • 3ds max 2022
    -3ds max 2022 sdk
    -fbx extension sdk (2020.2.1)

image

#include <fbxsdk.h>
#include <max.h>
#include "extension.h"
#include "maxscript/maxscript.h"
class CharFbxExporterPlugin : public FbxPlugin
{
    FBXSDK_PLUGIN_DECLARE(CharFbxExporterPlugin);

protected:
    explicit CharFbxExporterPlugin(const FbxPluginDef& pDefinition, FbxModule pFbxModule) : FbxPlugin(pDefinition, pFbxModule)
    {
    }

    // Implement kfbxmodules::FbxPlugin
    bool SpecificInitialize() override
    {
        return true;
    }

    bool SpecificTerminate() override
    {
        return true;
    }
};

FBXSDK_PLUGIN_IMPLEMENT(CharFbxExporterPlugin);

// FBX Interface
extern "C"
{
    //The DLL is owner of the plug-in
    static CharFbxExporterPlugin* sPlugin = NULL;

    //This function will be called when an application will request the plug-in
    FBXSDK_DLLEXPORT void FBXPluginRegistration(FbxPluginContainer& pContainer, FbxModule pFbxModule)
    {
        if (sPlugin == NULL)
        {
            //Create the plug-in definition which contains the information about the plug-in
            FbxPluginDef sPluginDef;
            sPluginDef.mName = "CharFbxExporterPlugin";
            sPluginDef.mVersion = "1.0";

            //Create an instance of the plug-in.  The DLL has the ownership of the plug-in
            sPlugin = CharFbxExporterPlugin::Create(sPluginDef, pFbxModule);

            //Register the plug-in
            pContainer.Register(*sPlugin);
        }
    }
        FBXSDK_DLLEXPORT bool MaxExt_IsExtension() { return true; }\
        \
        FBXSDK_DLLEXPORT bool MaxExt_ExportHandled(INode* pMaxObject); \
        FBXSDK_DLLEXPORT void MaxExt_ExportBegin(FbxScene* pFbxScene, INode* pMaxRootNode); \
        FBXSDK_DLLEXPORT bool MaxExt_ExportProcess(FbxObject** pOutputFbxObject, ReferenceTarget* pMaxObject, FbxScene* pFbxScene); \
        FBXSDK_DLLEXPORT void MaxExt_ExportTranslated(FbxObject* pFbxObject, INode* pMaxObject); \
        FBXSDK_DLLEXPORT void MaxExt_ExportEnd(FbxScene* pFbxScene, INode* pMaxRootNode); \
        \
        FBXSDK_DLLEXPORT bool MaxExt_ImportHandled(FbxObject* pFbxObject); \
        FBXSDK_DLLEXPORT void MaxExt_ImportBegin(FbxScene* pFbxScene, INode* pMaxRootNode); \
        FBXSDK_DLLEXPORT bool MaxExt_ImportProcess(ReferenceTarget** pOutputObject, FbxObject* pInputFbxObject, bool pIsAnInstance, bool pMerge); \
        FBXSDK_DLLEXPORT void MaxExt_ImportTranslated(FbxObject* pFbxObject, INode* pMaxObject); \
        FBXSDK_DLLEXPORT void MaxExt_ImportEnd(FbxScene* pFbxScene, INode* pMaxRootNode); \
        \
        FBXSDK_DLLEXPORT const char* MaxExt_Arguments(const char*);

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Max Extension Export Functions
bool MaxExt_ExportHandled(INode* pMaxObject)
{
    FBXSDK_printf("in MaxExt_ExportHandled\n");
    return true;
}

I resolved this, it was just sdk version.

1 Like