Notifications
Clear all

[Closed] Renderware OpenExport and 3dStudioMax9: problems

Hi all!

I’m trying to port Renderware openexport to 3dstudio max 9 (and visual studio 2005). It seems to be a terrible task: it doesn’t work at all

It crashes in this code (it’s a snippet):

 

static ParamBlockDesc2 RwMaxAssetParamBlock (RwMaxAsset::assetnode_params, _T("params"),

0, &RwMaxAssetDesc, 0, 

// params

RwMaxAsset::name, _T("name"), TYPE_STRING, 0, IDS_SPIN, 

p_default, _T("RenderWareAsset"), 

end,

RwMaxAsset::scope, _T("scope"), TYPE_INT, 0, IDS_SPIN,

p_default, RwCommAsset::ASSET,

end,

RwMaxAsset::num_refs, _T("num_refs"), TYPE_INT, 0, IDS_SPIN, 

p_default, 0, 

end,

RwMaxAsset::export_path, _T("export_path"), TYPE_STRING, 0, IDS_SPIN,

p_default, _T("c:\\"),

end,

RwMaxAsset::template_name, _T("template_name"), TYPE_STRING, 0, IDS_SPIN,

p_default, _T("Generic.rwt"),

end,

RwMaxAsset::options, _T("options"), TYPE_STRING_TAB,0, P_VARIABLE_SIZE, IDS_SPIN,

end,

RwMaxAsset::enable, _T("enable"), TYPE_BOOL, 0, IDS_SPIN,

p_default, TRUE,

end,

RwMaxAsset::guid, _T("guid"), TYPE_STRING, 0, IDS_SPIN,

p_default, _T(""),

end,

RwMaxAsset::custom_export_file, _T("custom_export_file"), TYPE_STRING, 0, IDS_SPIN,

p_default, _T(""),

end,

end

);

// =============================================================================

// ---------------------------- RwMaxAsset CLASS -----------------------------

// =============================================================================

RwMaxAsset::RwMaxAsset()

{

m_iNode = NULL;

IParamBlock2 *pb = CreateParameterBlock2(&RwMaxAssetParamBlock, this);
//It crashes here, at the MakeRefById. 
//I've done a fix to support Max9:
//#define MakeRefByID(refInterval, which, htarget) ReplaceReference(which, htarget, TRUE)
MakeRefByID(FOREVER, RwMaxAsset_PBLOCK_REF, pb);

// SetAFlag(A_OBJ_CREATING);

// Since this is a 3ds max object, it's not ours to delete.

AddRef();

};


Do you have any idea of why?? Maybe the parameter block is not “Max9” compliant?
Please let me know!