diff --git a/code/nel/tools/pipeline/max/builtin/animatable.cpp b/code/nel/tools/pipeline/max/builtin/animatable.cpp index 11211ed78..af860395c 100644 --- a/code/nel/tools/pipeline/max/builtin/animatable.cpp +++ b/code/nel/tools/pipeline/max/builtin/animatable.cpp @@ -43,7 +43,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CAnimatable::CAnimatable() : m_AppData(NULL) +CAnimatable::CAnimatable(CScene *scene) : CSceneClass(scene), m_AppData(NULL) { } @@ -57,7 +57,7 @@ CAnimatable::~CAnimatable() } } -const ucchar *CAnimatable::DisplayName = ucstring("Animatable").c_str(); +const ucstring CAnimatable::DisplayName = ucstring("Animatable"); const char *CAnimatable::InternalName = "Animatable"; const char *CAnimatable::InternalNameUnknown = "AnimatableUnknown"; const NLMISC::CClassId CAnimatable::ClassId = NLMISC::CClassId(0x3101497b, 0x24af711b); /* Not official, please correct */ diff --git a/code/nel/tools/pipeline/max/builtin/animatable.h b/code/nel/tools/pipeline/max/builtin/animatable.h index 7072b519c..d31d2e59e 100644 --- a/code/nel/tools/pipeline/max/builtin/animatable.h +++ b/code/nel/tools/pipeline/max/builtin/animatable.h @@ -55,11 +55,11 @@ class CAppData; class CAnimatable : public CSceneClass { public: - CAnimatable(); + CAnimatable(CScene *scene); virtual ~CAnimatable(); // class desc - static const ucchar *DisplayName; + static const ucstring DisplayName; static const char *InternalName; static const char *InternalNameUnknown; static const NLMISC::CClassId ClassId; diff --git a/code/nel/tools/pipeline/max/builtin/base_object.cpp b/code/nel/tools/pipeline/max/builtin/base_object.cpp index 0f5e42af0..34f03479c 100644 --- a/code/nel/tools/pipeline/max/builtin/base_object.cpp +++ b/code/nel/tools/pipeline/max/builtin/base_object.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CBaseObject::CBaseObject() +CBaseObject::CBaseObject(CScene *scene) : CReferenceTarget(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/base_object.h b/code/nel/tools/pipeline/max/builtin/base_object.h index 549c8bfc9..f959642ec 100644 --- a/code/nel/tools/pipeline/max/builtin/base_object.h +++ b/code/nel/tools/pipeline/max/builtin/base_object.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CBaseObject : public CReferenceTarget { public: - CBaseObject(); + CBaseObject(CScene *scene); virtual ~CBaseObject(); }; /* class CBaseObject */ diff --git a/code/nel/tools/pipeline/max/builtin/bitmap_tex.cpp b/code/nel/tools/pipeline/max/builtin/bitmap_tex.cpp index a891305cc..2a451279b 100644 --- a/code/nel/tools/pipeline/max/builtin/bitmap_tex.cpp +++ b/code/nel/tools/pipeline/max/builtin/bitmap_tex.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CBitmapTex::CBitmapTex() +CBitmapTex::CBitmapTex(CScene *scene) : CTexmap(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/bitmap_tex.h b/code/nel/tools/pipeline/max/builtin/bitmap_tex.h index 32fdfbec7..559d46a3a 100644 --- a/code/nel/tools/pipeline/max/builtin/bitmap_tex.h +++ b/code/nel/tools/pipeline/max/builtin/bitmap_tex.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CBitmapTex : public CTexmap { public: - CBitmapTex(); + CBitmapTex(CScene *scene); virtual ~CBitmapTex(); }; /* class CBitmapTex */ diff --git a/code/nel/tools/pipeline/max/builtin/builtin.cpp b/code/nel/tools/pipeline/max/builtin/builtin.cpp index 262061a85..663a1687f 100644 --- a/code/nel/tools/pipeline/max/builtin/builtin.cpp +++ b/code/nel/tools/pipeline/max/builtin/builtin.cpp @@ -35,10 +35,13 @@ // Project includes #include "../scene_class_registry.h" + #include "animatable.h" #include "reference_maker.h" #include "reference_target.h" + #include "i_node.h" +#include "node_impl.h" // using namespace std; // using namespace NLMISC; @@ -204,6 +207,9 @@ CBuiltin::~CBuiltin() void CBuiltin::registerClasses(CSceneClassRegistry *registry) { + // invalid + registry->add(&NullSuperClassDesc); + // available registry->add(&AnimatableClassDesc); registry->add(&AnimatableSuperClassDesc); @@ -212,11 +218,12 @@ void CBuiltin::registerClasses(CSceneClassRegistry *registry) registry->add(&ReferenceTargetClassDesc); registry->add(&ReferenceTargetSuperClassDesc); - registry->add(&NodeClassDesc); + // node registry->add(&NodeSuperClassDesc); - - // invalid - registry->add(&NullSuperClassDesc); + { + registry->add(&NodeClassDesc); + registry->add(&NodeImplClassDesc); + } // unimplemented registry->add(&ControlFloatSuperClassDesc); diff --git a/code/nel/tools/pipeline/max/builtin/i_node.cpp b/code/nel/tools/pipeline/max/builtin/i_node.cpp index 6859884b3..944fb8b56 100644 --- a/code/nel/tools/pipeline/max/builtin/i_node.cpp +++ b/code/nel/tools/pipeline/max/builtin/i_node.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -INode::INode() +INode::INode(CScene *scene) : CReferenceTarget(scene) { } @@ -52,7 +52,7 @@ INode::~INode() } -const ucchar *INode::DisplayName = ucstring("Node").c_str(); +const ucstring INode::DisplayName = ucstring("Node Interface"); const char *INode::InternalName = "Node"; const char *INode::InternalNameUnknown = "NodeUnknown"; const NLMISC::CClassId INode::ClassId = NLMISC::CClassId(0x8f5b13, 0x624d477d); /* Not official, please correct */ diff --git a/code/nel/tools/pipeline/max/builtin/i_node.h b/code/nel/tools/pipeline/max/builtin/i_node.h index 10024d758..fbf83adde 100644 --- a/code/nel/tools/pipeline/max/builtin/i_node.h +++ b/code/nel/tools/pipeline/max/builtin/i_node.h @@ -49,11 +49,11 @@ namespace BUILTIN { class INode : public CReferenceTarget { public: - INode(); + INode(CScene *scene); virtual ~INode(); // class desc - static const ucchar *DisplayName; + static const ucstring DisplayName; static const char *InternalName; static const char *InternalNameUnknown; static const NLMISC::CClassId ClassId; diff --git a/code/nel/tools/pipeline/max/builtin/modifier.cpp b/code/nel/tools/pipeline/max/builtin/modifier.cpp index 77a4d9f0b..d21db02da 100644 --- a/code/nel/tools/pipeline/max/builtin/modifier.cpp +++ b/code/nel/tools/pipeline/max/builtin/modifier.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CModifier::CModifier() +CModifier::CModifier(CScene *scene) : CBaseObject(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/modifier.h b/code/nel/tools/pipeline/max/builtin/modifier.h index 3b25abdeb..4e7ab45b3 100644 --- a/code/nel/tools/pipeline/max/builtin/modifier.h +++ b/code/nel/tools/pipeline/max/builtin/modifier.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CModifier : public CBaseObject { public: - CModifier(); + CModifier(CScene *scene); virtual ~CModifier(); }; /* class CModifier */ diff --git a/code/nel/tools/pipeline/max/builtin/mtl.cpp b/code/nel/tools/pipeline/max/builtin/mtl.cpp index d27fe59b8..431b978f5 100644 --- a/code/nel/tools/pipeline/max/builtin/mtl.cpp +++ b/code/nel/tools/pipeline/max/builtin/mtl.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CMtl::CMtl() +CMtl::CMtl(CScene *scene) : CMtlBase(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/mtl.h b/code/nel/tools/pipeline/max/builtin/mtl.h index 1b6726f05..ec7e927fa 100644 --- a/code/nel/tools/pipeline/max/builtin/mtl.h +++ b/code/nel/tools/pipeline/max/builtin/mtl.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CMtl : public CMtlBase { public: - CMtl(); + CMtl(CScene *scene); virtual ~CMtl(); }; /* class CMtl */ diff --git a/code/nel/tools/pipeline/max/builtin/mtl_base.cpp b/code/nel/tools/pipeline/max/builtin/mtl_base.cpp index fb2c5de66..6cbb25319 100644 --- a/code/nel/tools/pipeline/max/builtin/mtl_base.cpp +++ b/code/nel/tools/pipeline/max/builtin/mtl_base.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CMtlBase::CMtlBase() +CMtlBase::CMtlBase(CScene *scene) : CReferenceTarget(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/mtl_base.h b/code/nel/tools/pipeline/max/builtin/mtl_base.h index 72b311473..f5fd0e646 100644 --- a/code/nel/tools/pipeline/max/builtin/mtl_base.h +++ b/code/nel/tools/pipeline/max/builtin/mtl_base.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CMtlBase : public CReferenceTarget { public: - CMtlBase(); + CMtlBase(CScene *scene); virtual ~CMtlBase(); }; /* class CMtlBase */ diff --git a/code/nel/tools/pipeline/max/builtin/node.cpp b/code/nel/tools/pipeline/max/builtin/node.cpp deleted file mode 100644 index 73bd9d09c..000000000 --- a/code/nel/tools/pipeline/max/builtin/node.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * \file node.cpp - * \brief CNode - * \date 2012-08-22 08:57GMT - * \author Jan Boon (Kaetemi) - * CNode - */ - -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE PIPELINE. - * RYZOM CORE PIPELINE is free software: you can redistribute it - * and/or modify it under the terms of the GNU Affero General Public - * License as published by the Free Software Foundation, either - * version 3 of the License, or (at your option) any later version. - * - * RYZOM CORE PIPELINE is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE PIPELINE. If not, see - * . - */ - -#include -#include "node.h" - -// STL includes - -// NeL includes -// #include - -// Project includes - -using namespace std; -// using namespace NLMISC; - -namespace PIPELINE { -namespace MAX { -namespace BUILTIN { - -CNode::CNode() -{ - -} - -CNode::~CNode() -{ - -} - -} /* namespace BUILTIN */ -} /* namespace MAX */ -} /* namespace PIPELINE */ - -/* end of file */ diff --git a/code/nel/tools/pipeline/max/builtin/node.h b/code/nel/tools/pipeline/max/builtin/node.h deleted file mode 100644 index d44779fc4..000000000 --- a/code/nel/tools/pipeline/max/builtin/node.h +++ /dev/null @@ -1,63 +0,0 @@ -/** - * \file node.h - * \brief CNode - * \date 2012-08-22 08:57GMT - * \author Jan Boon (Kaetemi) - * CNode - */ - -/* - * Copyright (C) 2012 by authors - * - * This file is part of RYZOM CORE PIPELINE. - * RYZOM CORE PIPELINE is free software: you can redistribute it - * and/or modify it under the terms of the GNU Affero General Public - * License as published by the Free Software Foundation, either - * version 3 of the License, or (at your option) any later version. - * - * RYZOM CORE PIPELINE is distributed in the hope that it will be - * useful, but WITHOUT ANY WARRANTY; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with RYZOM CORE PIPELINE. If not, see - * . - */ - -#ifndef PIPELINE_NODE_H -#define PIPELINE_NODE_H -#include - -// STL includes - -// NeL includes - -// Project includes -#include "reference_target.h" - -namespace PIPELINE { -namespace MAX { -namespace BUILTIN { - -/** - * \brief CNode - * \date 2012-08-22 08:57GMT - * \author Jan Boon (Kaetemi) - * CNode - */ -class CNode : public CReferenceTarget -{ -public: - CNode(); - virtual ~CNode(); - -}; /* class CNode */ - -} /* namespace BUILTIN */ -} /* namespace MAX */ -} /* namespace PIPELINE */ - -#endif /* #ifndef PIPELINE_NODE_H */ - -/* end of file */ diff --git a/code/nel/tools/pipeline/max/builtin/node_impl.cpp b/code/nel/tools/pipeline/max/builtin/node_impl.cpp new file mode 100644 index 000000000..a16a65a08 --- /dev/null +++ b/code/nel/tools/pipeline/max/builtin/node_impl.cpp @@ -0,0 +1,111 @@ +/** + * \file node_impl.cpp + * \brief CNodeImpl + * \date 2012-08-22 20:01GMT + * \author Jan Boon (Kaetemi) + * CNodeImpl + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU Affero General Public + * License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with RYZOM CORE PIPELINE. If not, see + * . + */ + +#include +#include "node_impl.h" + +// STL includes + +// NeL includes +// #include + +// Project includes + +using namespace std; +// using namespace NLMISC; + +namespace PIPELINE { +namespace MAX { +namespace BUILTIN { + +CNodeImpl::CNodeImpl(CScene *scene) : INode(scene) +{ + +} + +CNodeImpl::~CNodeImpl() +{ + +} + +const ucstring CNodeImpl::DisplayName = ucstring("Node"); +const char *CNodeImpl::InternalName = "NodeImpl"; +const NLMISC::CClassId CNodeImpl::ClassId = NLMISC::CClassId(0x00000001, 0x00000000); +const TSClassId CNodeImpl::SuperClassId = INode::SuperClassId; +const CNodeImplClassDesc NodeImplClassDesc(&DllPluginDescBuiltin); + +void CNodeImpl::parse(uint16 version, TParseLevel level) +{ + INode::parse(version, level); +} + +void CNodeImpl::clean() +{ + INode::clean(); +} + +void CNodeImpl::build(uint16 version) +{ + INode::build(version); +} + +void CNodeImpl::disown() +{ + INode::disown(); +} + +void CNodeImpl::init() +{ + INode::init(); +} + +bool CNodeImpl::inherits(const NLMISC::CClassId classId) const +{ + if (classId == classDesc()->classId()) return true; + return INode::inherits(classId); +} + +const ISceneClassDesc *CNodeImpl::classDesc() const +{ + return &NodeImplClassDesc; +} + +void CNodeImpl::toStringLocal(std::ostream &ostream, const std::string &pad) const +{ + INode::toStringLocal(ostream, pad); +} + +IStorageObject *CNodeImpl::createChunkById(uint16 id, bool container) +{ + return INode::createChunkById(id, container); +} + +} /* namespace BUILTIN */ +} /* namespace MAX */ +} /* namespace PIPELINE */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/max/builtin/node_impl.h b/code/nel/tools/pipeline/max/builtin/node_impl.h new file mode 100644 index 000000000..bf7184f18 --- /dev/null +++ b/code/nel/tools/pipeline/max/builtin/node_impl.h @@ -0,0 +1,86 @@ +/** + * \file node_impl.h + * \brief CNodeImpl + * \date 2012-08-22 20:01GMT + * \author Jan Boon (Kaetemi) + * CNodeImpl + */ + +/* + * Copyright (C) 2012 by authors + * + * This file is part of RYZOM CORE PIPELINE. + * RYZOM CORE PIPELINE is free software: you can redistribute it + * and/or modify it under the terms of the GNU Affero General Public + * License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * RYZOM CORE PIPELINE is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with RYZOM CORE PIPELINE. If not, see + * . + */ + +#ifndef PIPELINE_NODE_IMPL_H +#define PIPELINE_NODE_IMPL_H +#include + +// STL includes + +// NeL includes + +// Project includes +#include "i_node.h" + +namespace PIPELINE { +namespace MAX { +namespace BUILTIN { + +/** + * \brief CNodeImpl + * \date 2012-08-22 20:01GMT + * \author Jan Boon (Kaetemi) + * CNodeImpl + */ +class CNodeImpl : public INode +{ +public: + CNodeImpl(CScene *scene); + virtual ~CNodeImpl(); + + // class desc + static const ucstring DisplayName; + static const char *InternalName; + static const NLMISC::CClassId ClassId; + static const TSClassId SuperClassId; + + // inherited + virtual void parse(uint16 version, TParseLevel level); + virtual void clean(); + virtual void build(uint16 version); + virtual void disown(); + virtual void init(); + virtual bool inherits(const NLMISC::CClassId classId) const; + virtual const ISceneClassDesc *classDesc() const; + virtual void toStringLocal(std::ostream &ostream, const std::string &pad = "") const; + +protected: + // inherited + virtual IStorageObject *createChunkById(uint16 id, bool container); + +}; /* class CNodeImpl */ + +typedef CSceneClassDesc CNodeImplClassDesc; +extern const CNodeImplClassDesc NodeImplClassDesc; + +} /* namespace BUILTIN */ +} /* namespace MAX */ +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_NODE_IMPL_H */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/max/builtin/object.cpp b/code/nel/tools/pipeline/max/builtin/object.cpp index d9c79e823..745b49888 100644 --- a/code/nel/tools/pipeline/max/builtin/object.cpp +++ b/code/nel/tools/pipeline/max/builtin/object.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CObject::CObject() +CObject::CObject(CScene *scene) : CBaseObject(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/object.h b/code/nel/tools/pipeline/max/builtin/object.h index 0ca7e3db2..f2a6e4724 100644 --- a/code/nel/tools/pipeline/max/builtin/object.h +++ b/code/nel/tools/pipeline/max/builtin/object.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CObject : public CBaseObject { public: - CObject(); + CObject(CScene *scene); virtual ~CObject(); }; /* class CObject */ diff --git a/code/nel/tools/pipeline/max/builtin/param_block.cpp b/code/nel/tools/pipeline/max/builtin/param_block.cpp index 9552cb8be..a6321f716 100644 --- a/code/nel/tools/pipeline/max/builtin/param_block.cpp +++ b/code/nel/tools/pipeline/max/builtin/param_block.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CParamBlock::CParamBlock() +CParamBlock::CParamBlock(CScene *scene) : CReferenceTarget(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/param_block.h b/code/nel/tools/pipeline/max/builtin/param_block.h index c368d0627..76cfa0e76 100644 --- a/code/nel/tools/pipeline/max/builtin/param_block.h +++ b/code/nel/tools/pipeline/max/builtin/param_block.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CParamBlock : public CReferenceTarget { public: - CParamBlock(); + CParamBlock(CScene *scene); virtual ~CParamBlock(); }; /* class CParamBlock */ diff --git a/code/nel/tools/pipeline/max/builtin/param_block_2.cpp b/code/nel/tools/pipeline/max/builtin/param_block_2.cpp index 273931ecb..e450c1aa4 100644 --- a/code/nel/tools/pipeline/max/builtin/param_block_2.cpp +++ b/code/nel/tools/pipeline/max/builtin/param_block_2.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CParamBlock2::CParamBlock2() +CParamBlock2::CParamBlock2(CScene *scene) : CReferenceTarget(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/param_block_2.h b/code/nel/tools/pipeline/max/builtin/param_block_2.h index ab26263be..f70506b8e 100644 --- a/code/nel/tools/pipeline/max/builtin/param_block_2.h +++ b/code/nel/tools/pipeline/max/builtin/param_block_2.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CParamBlock2 : public CReferenceTarget { public: - CParamBlock2(); + CParamBlock2(CScene *scene); virtual ~CParamBlock2(); }; /* class CParamBlock2 */ diff --git a/code/nel/tools/pipeline/max/builtin/patch_object.cpp b/code/nel/tools/pipeline/max/builtin/patch_object.cpp index 8f9163457..9ef811e9e 100644 --- a/code/nel/tools/pipeline/max/builtin/patch_object.cpp +++ b/code/nel/tools/pipeline/max/builtin/patch_object.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CPatchObject::CPatchObject() +CPatchObject::CPatchObject(CScene *scene) : CObject(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/patch_object.h b/code/nel/tools/pipeline/max/builtin/patch_object.h index 4c158e20d..ee4f0f984 100644 --- a/code/nel/tools/pipeline/max/builtin/patch_object.h +++ b/code/nel/tools/pipeline/max/builtin/patch_object.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CPatchObject : public CObject { public: - CPatchObject(); + CPatchObject(CScene *scene); virtual ~CPatchObject(); }; /* class CPatchObject */ diff --git a/code/nel/tools/pipeline/max/builtin/poly_object.cpp b/code/nel/tools/pipeline/max/builtin/poly_object.cpp index 0c22d16ff..414dd0637 100644 --- a/code/nel/tools/pipeline/max/builtin/poly_object.cpp +++ b/code/nel/tools/pipeline/max/builtin/poly_object.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CPolyObject::CPolyObject() +CPolyObject::CPolyObject(CScene *scene) : CObject(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/poly_object.h b/code/nel/tools/pipeline/max/builtin/poly_object.h index 52df5b44c..13d250376 100644 --- a/code/nel/tools/pipeline/max/builtin/poly_object.h +++ b/code/nel/tools/pipeline/max/builtin/poly_object.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CPolyObject : public CObject { public: - CPolyObject(); + CPolyObject(CScene *scene); virtual ~CPolyObject(); }; /* class CPolyObject */ diff --git a/code/nel/tools/pipeline/max/builtin/reference_maker.cpp b/code/nel/tools/pipeline/max/builtin/reference_maker.cpp index 663fd8d13..42a6eee7b 100644 --- a/code/nel/tools/pipeline/max/builtin/reference_maker.cpp +++ b/code/nel/tools/pipeline/max/builtin/reference_maker.cpp @@ -63,7 +63,7 @@ namespace BUILTIN { //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -CReferenceMaker::CReferenceMaker() +CReferenceMaker::CReferenceMaker(CScene *scene) : CAnimatable(scene) { } @@ -81,7 +81,7 @@ CReferenceMaker::~CReferenceMaker() } } -const ucchar *CReferenceMaker::DisplayName = ucstring("ReferenceMaker").c_str(); +const ucstring CReferenceMaker::DisplayName = ucstring("ReferenceMaker"); const char *CReferenceMaker::InternalName = "ReferenceMaker"; const char *CReferenceMaker::InternalNameUnknown = "ReferenceMakerUnknown"; const NLMISC::CClassId CReferenceMaker::ClassId = NLMISC::CClassId(0x2ec43d15, 0x10a270ad); /* Not official, please correct */ diff --git a/code/nel/tools/pipeline/max/builtin/reference_maker.h b/code/nel/tools/pipeline/max/builtin/reference_maker.h index c4a570f1b..81c9e3909 100644 --- a/code/nel/tools/pipeline/max/builtin/reference_maker.h +++ b/code/nel/tools/pipeline/max/builtin/reference_maker.h @@ -50,11 +50,11 @@ namespace BUILTIN { class CReferenceMaker : public CAnimatable { public: - CReferenceMaker(); + CReferenceMaker(CScene *scene); virtual ~CReferenceMaker(); // class desc - static const ucchar *DisplayName; + static const ucstring DisplayName; static const char *InternalName; static const char *InternalNameUnknown; static const NLMISC::CClassId ClassId; diff --git a/code/nel/tools/pipeline/max/builtin/reference_target.cpp b/code/nel/tools/pipeline/max/builtin/reference_target.cpp index 5dc4d147b..e19a10710 100644 --- a/code/nel/tools/pipeline/max/builtin/reference_target.cpp +++ b/code/nel/tools/pipeline/max/builtin/reference_target.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CReferenceTarget::CReferenceTarget() +CReferenceTarget::CReferenceTarget(CScene *scene) : CReferenceMaker(scene) { } @@ -52,7 +52,7 @@ CReferenceTarget::~CReferenceTarget() } -const ucchar *CReferenceTarget::DisplayName = ucstring("ReferenceTarget").c_str(); +const ucstring CReferenceTarget::DisplayName = ucstring("ReferenceTarget"); const char *CReferenceTarget::InternalName = "ReferenceTarget"; const char *CReferenceTarget::InternalNameUnknown = "ReferenceTargetUnknown"; const NLMISC::CClassId CReferenceTarget::ClassId = NLMISC::CClassId(0x5d545dd9, 0xa422e4); /* Not official, please correct */ diff --git a/code/nel/tools/pipeline/max/builtin/reference_target.h b/code/nel/tools/pipeline/max/builtin/reference_target.h index a6a4b10e5..b6daa94de 100644 --- a/code/nel/tools/pipeline/max/builtin/reference_target.h +++ b/code/nel/tools/pipeline/max/builtin/reference_target.h @@ -45,15 +45,16 @@ namespace BUILTIN { * \date 2012-08-22 08:53GMT * \author Jan Boon (Kaetemi) * Dummy class, supposed to send or receive events or something. + * Nice for copy pasting the basic class layout. */ class CReferenceTarget : public CReferenceMaker { public: - CReferenceTarget(); + CReferenceTarget(CScene *scene); virtual ~CReferenceTarget(); // class desc - static const ucchar *DisplayName; + static const ucstring DisplayName; static const char *InternalName; static const char *InternalNameUnknown; static const NLMISC::CClassId ClassId; diff --git a/code/nel/tools/pipeline/max/builtin/std_mat.cpp b/code/nel/tools/pipeline/max/builtin/std_mat.cpp index 5903f7777..dae98c4c9 100644 --- a/code/nel/tools/pipeline/max/builtin/std_mat.cpp +++ b/code/nel/tools/pipeline/max/builtin/std_mat.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CStdMat::CStdMat() +CStdMat::CStdMat(CScene *scene) : CMtl(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/std_mat.h b/code/nel/tools/pipeline/max/builtin/std_mat.h index 61dbfb099..f3d9e7b69 100644 --- a/code/nel/tools/pipeline/max/builtin/std_mat.h +++ b/code/nel/tools/pipeline/max/builtin/std_mat.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CStdMat : public CMtl { public: - CStdMat(); + CStdMat(CScene *scene); virtual ~CStdMat(); }; /* class CStdMat */ diff --git a/code/nel/tools/pipeline/max/builtin/std_mat_2.cpp b/code/nel/tools/pipeline/max/builtin/std_mat_2.cpp index c568f01fa..45e17d868 100644 --- a/code/nel/tools/pipeline/max/builtin/std_mat_2.cpp +++ b/code/nel/tools/pipeline/max/builtin/std_mat_2.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CStdMat2::CStdMat2() +CStdMat2::CStdMat2(CScene *scene) : CStdMat(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/std_mat_2.h b/code/nel/tools/pipeline/max/builtin/std_mat_2.h index 3576eed90..331ca7978 100644 --- a/code/nel/tools/pipeline/max/builtin/std_mat_2.h +++ b/code/nel/tools/pipeline/max/builtin/std_mat_2.h @@ -55,7 +55,7 @@ protected: // instances // ... public: - CStdMat2(); + CStdMat2(CScene *scene); virtual ~CStdMat2(); }; /* class CStdMat2 */ diff --git a/code/nel/tools/pipeline/max/builtin/texmap.cpp b/code/nel/tools/pipeline/max/builtin/texmap.cpp index 95da4ba9c..600542bb7 100644 --- a/code/nel/tools/pipeline/max/builtin/texmap.cpp +++ b/code/nel/tools/pipeline/max/builtin/texmap.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CTexmap::CTexmap() +CTexmap::CTexmap(CScene *scene) : CMtlBase(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/texmap.h b/code/nel/tools/pipeline/max/builtin/texmap.h index 903255e44..da2fc376a 100644 --- a/code/nel/tools/pipeline/max/builtin/texmap.h +++ b/code/nel/tools/pipeline/max/builtin/texmap.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CTexmap : public CMtlBase { public: - CTexmap(); + CTexmap(CScene *scene); virtual ~CTexmap(); }; /* class CTexmap */ diff --git a/code/nel/tools/pipeline/max/builtin/tri_object.cpp b/code/nel/tools/pipeline/max/builtin/tri_object.cpp index 3a53b7f62..0a355446e 100644 --- a/code/nel/tools/pipeline/max/builtin/tri_object.cpp +++ b/code/nel/tools/pipeline/max/builtin/tri_object.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CTriObject::CTriObject() +CTriObject::CTriObject(CScene *scene) : CObject(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/tri_object.h b/code/nel/tools/pipeline/max/builtin/tri_object.h index 4dda7794a..9f979cd3b 100644 --- a/code/nel/tools/pipeline/max/builtin/tri_object.h +++ b/code/nel/tools/pipeline/max/builtin/tri_object.h @@ -50,7 +50,7 @@ class CTriObject : public CObject { public: - CTriObject(); + CTriObject(CScene *scene); virtual ~CTriObject(); }; /* class CTriObject */ diff --git a/code/nel/tools/pipeline/max/scene.cpp b/code/nel/tools/pipeline/max/scene.cpp index 377c4485d..ef1b4716d 100644 --- a/code/nel/tools/pipeline/max/scene.cpp +++ b/code/nel/tools/pipeline/max/scene.cpp @@ -110,7 +110,7 @@ IStorageObject *CScene::createChunkById(uint16 id, bool container) if (container) { // Return the scene class container. There can be only one. - return new CSceneClassContainer(m_SceneClassRegistry, m_DllDirectory, m_ClassDirectory3); + return new CSceneClassContainer(this, m_SceneClassRegistry, m_DllDirectory, m_ClassDirectory3); } return CStorageContainer::createChunkById(id, container); } @@ -119,7 +119,7 @@ IStorageObject *CScene::createChunkById(uint16 id, bool container) //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -CSceneClassContainer::CSceneClassContainer(const CSceneClassRegistry *sceneClassRegistry, CDllDirectory *dllDirectory, CClassDirectory3 *classDirectory3) : m_SceneClassRegistry(sceneClassRegistry), m_DllDirectory(dllDirectory), m_ClassDirectory3(classDirectory3) +CSceneClassContainer::CSceneClassContainer(CScene *scene, const CSceneClassRegistry *sceneClassRegistry, CDllDirectory *dllDirectory, CClassDirectory3 *classDirectory3) : m_Scene(scene), m_SceneClassRegistry(sceneClassRegistry), m_DllDirectory(dllDirectory), m_ClassDirectory3(classDirectory3) { } @@ -167,11 +167,11 @@ IStorageObject *CSceneClassContainer::createChunkById(uint16 id, bool container) // Known unknown special identifiers... case 0x2032: case 0x2033: - return new CSceneClass(); // TODO: Make dummy dllentry and classentry for these... + return new CSceneClass(m_Scene); // TODO: Make dummy dllentry and classentry for these... // return static_cast(new CSceneClassUnknown(dllEntry, classEntry)); } const CClassEntry *classEntry = m_ClassDirectory3->get(id); - CSceneClass *sceneClass = m_SceneClassRegistry->create(classEntry->superClassId(), classEntry->classId()); + CSceneClass *sceneClass = m_SceneClassRegistry->create(m_Scene, classEntry->superClassId(), classEntry->classId()); if (sceneClass) { return static_cast(sceneClass); @@ -179,7 +179,7 @@ IStorageObject *CSceneClassContainer::createChunkById(uint16 id, bool container) else { const CDllEntry *dllEntry = m_DllDirectory->get(classEntry->dllIndex()); - sceneClass = m_SceneClassRegistry->createUnknown(classEntry->superClassId(), classEntry->classId(), classEntry->displayName(), dllEntry->dllFilename(), dllEntry->dllDescription()); + sceneClass = m_SceneClassRegistry->createUnknown(m_Scene, classEntry->superClassId(), classEntry->classId(), classEntry->displayName(), dllEntry->dllFilename(), dllEntry->dllDescription()); if (sceneClass) { return static_cast(sceneClass); @@ -187,7 +187,7 @@ IStorageObject *CSceneClassContainer::createChunkById(uint16 id, bool container) else { // Create an invalid unknown scene class - return static_cast(new CSceneClassUnknown(classEntry->classId(), classEntry->superClassId(), classEntry->displayName(), "SceneClassUnknown", dllEntry->dllFilename(), dllEntry->dllDescription())); + return static_cast(new CSceneClassUnknown(m_Scene,classEntry->classId(), classEntry->superClassId(), classEntry->displayName(), "SceneClassUnknown", dllEntry->dllFilename(), dllEntry->dllDescription())); } } } diff --git a/code/nel/tools/pipeline/max/scene.h b/code/nel/tools/pipeline/max/scene.h index 893a7fc4a..21011860c 100644 --- a/code/nel/tools/pipeline/max/scene.h +++ b/code/nel/tools/pipeline/max/scene.h @@ -93,7 +93,7 @@ private: class CSceneClassContainer : public CStorageContainer { public: - CSceneClassContainer(const CSceneClassRegistry *sceneClassRegistry, CDllDirectory *dllDirectory, CClassDirectory3 *classDirectory3); + CSceneClassContainer(CScene *scene, const CSceneClassRegistry *sceneClassRegistry, CDllDirectory *dllDirectory, CClassDirectory3 *classDirectory3); virtual ~CSceneClassContainer(); // inherited @@ -104,14 +104,26 @@ public: virtual void build(uint16 version); virtual void disown(); + /// Use while parsing to get an object by it's index + CSceneClass *getByStorageIndex(uint32 index) const; + /// Use while building to get an index for an object + uint32 getOrCreateStorageIndex(CSceneClass *storageObject); + + /// TODO: Evaluate the references tree to build new indexes. + protected: virtual IStorageObject *createChunkById(uint16 id, bool container); private: + CScene *m_Scene; + const CSceneClassRegistry *m_SceneClassRegistry; CDllDirectory *m_DllDirectory; CClassDirectory3 *m_ClassDirectory3; + std::vector m_StorageObjectByIndex; + std::map m_StorageObjectToIndex; + }; /* class CSceneClassContainer */ } /* namespace MAX */ diff --git a/code/nel/tools/pipeline/max/scene_class.cpp b/code/nel/tools/pipeline/max/scene_class.cpp index 144f8f2bb..49e2c6c67 100644 --- a/code/nel/tools/pipeline/max/scene_class.cpp +++ b/code/nel/tools/pipeline/max/scene_class.cpp @@ -61,7 +61,7 @@ namespace MAX { //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -CSceneClass::CSceneClass() +CSceneClass::CSceneClass(CScene *scene) : m_Scene(scene) { } @@ -184,7 +184,7 @@ IStorageObject *CSceneClass::createChunkById(uint16 id, bool container) return CStorageContainer::createChunkById(id, container); } -const ucchar *CSceneClass::DisplayName = ucstring("Invalid Scene Class").c_str(); +const ucstring CSceneClass::DisplayName = ucstring("Invalid Scene Class"); const char *CSceneClass::InternalName = "SceneClass"; const NLMISC::CClassId CSceneClass::ClassId = NLMISC::CClassId::Null; // This class is invalid const TSClassId CSceneClass::SuperClassId = 0x0000; // This class is invalid diff --git a/code/nel/tools/pipeline/max/scene_class.h b/code/nel/tools/pipeline/max/scene_class.h index 177005f06..7fe9b1d9b 100644 --- a/code/nel/tools/pipeline/max/scene_class.h +++ b/code/nel/tools/pipeline/max/scene_class.h @@ -44,6 +44,7 @@ namespace PIPELINE { namespace MAX { +class CScene; class ISceneClassDesc; /** @@ -64,7 +65,7 @@ class ISceneClassDesc; class CSceneClass : public CStorageContainer, public NLMISC::CRefCount { public: - CSceneClass(); + CSceneClass(CScene *scene); virtual ~CSceneClass(); //! \name Inherited functions that are implemented by wrapping around other virtual functions in this class @@ -93,7 +94,7 @@ public: //! \name Static const variables for the class description //@{ - static const ucchar *DisplayName; + static const ucstring DisplayName; static const char *InternalName; static const NLMISC::CClassId ClassId; static const TSClassId SuperClassId; @@ -131,6 +132,8 @@ private: TStorageObjectContainer m_OrphanedChunks; TStorageObjectIterator m_PutChunkInsert; + CScene *m_Scene; + }; /* class CSceneClass */ /** @@ -142,7 +145,7 @@ private: class ISceneClassDesc { public: - virtual CSceneClass *create() const = 0; + virtual CSceneClass *create(CScene *scene) const = 0; virtual void destroy(CSceneClass *sc) const = 0; virtual const ucchar *displayName() const = 0; virtual const char *internalName() const = 0; @@ -164,9 +167,9 @@ class CSceneClassDesc : public ISceneClassDesc { public: CSceneClassDesc(const IDllPluginDescInternal *dllPluginDesc) : m_DllPluginDesc(dllPluginDesc) { } - virtual CSceneClass *create() const { return static_cast(new T()); } + virtual CSceneClass *create(CScene *scene) const { return static_cast(new T(scene)); } virtual void destroy(CSceneClass *sc) const { delete static_cast(sc); } - virtual const ucchar *displayName() const { return T::DisplayName; } + virtual const ucchar *displayName() const { return T::DisplayName.c_str(); } virtual const char *internalName() const { return T::InternalName; } virtual NLMISC::CClassId classId() const { return T::ClassId; } virtual TSClassId superClassId() const { return T::SuperClassId; } diff --git a/code/nel/tools/pipeline/max/scene_class_registry.cpp b/code/nel/tools/pipeline/max/scene_class_registry.cpp index 8f0bb31b1..d5b63bd78 100644 --- a/code/nel/tools/pipeline/max/scene_class_registry.cpp +++ b/code/nel/tools/pipeline/max/scene_class_registry.cpp @@ -98,18 +98,18 @@ void CSceneClassRegistry::remove(const TSClassId superClassId) } /// Create a class by class id -CSceneClass *CSceneClassRegistry::create(const TSClassId superClassId, const NLMISC::CClassId classId) const +CSceneClass *CSceneClassRegistry::create(CScene *scene, const TSClassId superClassId, const NLMISC::CClassId classId) const { TKey key(superClassId, classId); if (m_ClassDescriptions.find(key) == m_ClassDescriptions.end()) { /* nldebug("Try to create class that does not exist"); */ return NULL; } - return m_ClassDescriptions.find(key)->second->create(); + return m_ClassDescriptions.find(key)->second->create(scene); } /// Create an unknown class by superclass id -CSceneClass *CSceneClassRegistry::createUnknown(TSClassId superClassId, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const +CSceneClass *CSceneClassRegistry::createUnknown(CScene *scene, TSClassId superClassId, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const { if (m_SuperClassDescriptions.find(superClassId) == m_SuperClassDescriptions.end()) { nlwarning("Creating superclass 0x%x (%s) %s that does not exist", superClassId, displayName.toUtf8().c_str(), classId.toString().c_str()); return NULL; } - return m_SuperClassDescriptions.find(superClassId)->second->createUnknown(classId, displayName, dllFilename, dllDescription); + return m_SuperClassDescriptions.find(superClassId)->second->createUnknown(scene, classId, displayName, dllFilename, dllDescription); } /// Destroy a class by pointer diff --git a/code/nel/tools/pipeline/max/scene_class_registry.h b/code/nel/tools/pipeline/max/scene_class_registry.h index bff8b658e..af954c533 100644 --- a/code/nel/tools/pipeline/max/scene_class_registry.h +++ b/code/nel/tools/pipeline/max/scene_class_registry.h @@ -63,10 +63,10 @@ public: void remove(const TSClassId superClassId); /// Create a class by class id - CSceneClass *create(TSClassId superClassId, const NLMISC::CClassId classId) const; + CSceneClass *create(CScene *scene, TSClassId superClassId, const NLMISC::CClassId classId) const; /// Create an unknown class by superclass id - CSceneClass *createUnknown(TSClassId superClassId, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const; + CSceneClass *createUnknown(CScene *scene, TSClassId superClassId, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const; /// Destroy a class by pointer void destroy(CSceneClass *sceneClass) const; diff --git a/code/nel/tools/pipeline/max/scene_class_unknown.cpp b/code/nel/tools/pipeline/max/scene_class_unknown.cpp index 048b5cc7f..1e68c302f 100644 --- a/code/nel/tools/pipeline/max/scene_class_unknown.cpp +++ b/code/nel/tools/pipeline/max/scene_class_unknown.cpp @@ -69,7 +69,7 @@ CSceneClassUnknownDesc::CSceneClassUnknownDesc(const NLMISC::CClassId classId, c } -CSceneClass *CSceneClassUnknownDesc::create() const +CSceneClass *CSceneClassUnknownDesc::create(CScene *scene) const { nlassert(false); } diff --git a/code/nel/tools/pipeline/max/scene_class_unknown.h b/code/nel/tools/pipeline/max/scene_class_unknown.h index b6c47a3d4..7034ba00c 100644 --- a/code/nel/tools/pipeline/max/scene_class_unknown.h +++ b/code/nel/tools/pipeline/max/scene_class_unknown.h @@ -68,7 +68,7 @@ class CSceneClassUnknownDesc : public ISceneClassDesc { public: CSceneClassUnknownDesc(const NLMISC::CClassId classId, const TSClassId superClassId, const ucstring &displayName, const std::string &internalName, const ucstring &dllFilename, const ucstring &dllDescription); - virtual CSceneClass *create() const; + virtual CSceneClass *create(CScene *scene) const; virtual void destroy(CSceneClass *sc) const; virtual const ucchar *displayName() const; virtual const char *internalName() const; @@ -96,7 +96,7 @@ template class CSceneClassUnknown : public TSuperClass { public: - CSceneClassUnknown(const NLMISC::CClassId classId, const TSClassId superClassId, const ucstring &displayName, const std::string &internalName, const ucstring &dllFilename, const ucstring &dllDescription) : m_Desc(classId, superClassId, displayName, internalName, dllFilename, dllDescription) { } + CSceneClassUnknown(CScene *scene, const NLMISC::CClassId classId, const TSClassId superClassId, const ucstring &displayName, const std::string &internalName, const ucstring &dllFilename, const ucstring &dllDescription) : TSuperClass(scene), m_Desc(classId, superClassId, displayName, internalName, dllFilename, dllDescription) { } virtual ~CSceneClassUnknown() { } // inherited diff --git a/code/nel/tools/pipeline/max/super_class_desc.h b/code/nel/tools/pipeline/max/super_class_desc.h index abfdc2b52..f4df5e857 100644 --- a/code/nel/tools/pipeline/max/super_class_desc.h +++ b/code/nel/tools/pipeline/max/super_class_desc.h @@ -49,7 +49,7 @@ class ISuperClassDesc { public: /// Create an unknown class that inherits from this superclass - virtual CSceneClass *createUnknown(const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const = 0; + virtual CSceneClass *createUnknown(CScene *scene, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const = 0; /// Get an internal name associated with unknown classes of this superclass virtual const char *internalNameUnknown() const = 0; /// Gets the associated super class id, may be different from classDesc()->superClassId() for non-implemented superclasses @@ -70,7 +70,7 @@ class CSuperClassDesc : public ISuperClassDesc { public: CSuperClassDesc(const ISceneClassDesc *classDesc) : m_ClassDesc(classDesc) { } - virtual CSceneClass *createUnknown(const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const { return static_cast(new CSceneClassUnknown(classId, m_ClassDesc->superClassId(), displayName,internalNameUnknown(), dllFilename, dllDescription)); } + virtual CSceneClass *createUnknown(CScene *scene, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const { return static_cast(new CSceneClassUnknown(scene, classId, m_ClassDesc->superClassId(), displayName,internalNameUnknown(), dllFilename, dllDescription)); } virtual const char *internalNameUnknown() const { return T::InternalNameUnknown; } virtual TSClassId superClassId() const { return m_ClassDesc->superClassId(); } virtual const ISceneClassDesc *classDesc() const { return m_ClassDesc; } @@ -89,7 +89,7 @@ class CSuperClassDescUnknown : public ISuperClassDesc { public: CSuperClassDescUnknown(const ISceneClassDesc *classDesc, const char *internalNameUnknown) : m_ClassDesc(classDesc), m_InternalNameUnknown(internalNameUnknown) { } - virtual CSceneClass *createUnknown(const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const { return static_cast(new CSceneClassUnknown(classId, SuperClassId, displayName,internalNameUnknown(), dllFilename, dllDescription)); } + virtual CSceneClass *createUnknown(CScene *scene, const NLMISC::CClassId classId, const ucstring &displayName, const ucstring &dllFilename, const ucstring &dllDescription) const { return static_cast(new CSceneClassUnknown(scene, classId, SuperClassId, displayName,internalNameUnknown(), dllFilename, dllDescription)); } virtual const char *internalNameUnknown() const { return m_InternalNameUnknown; } virtual TSClassId superClassId() const { return SuperClassId; } virtual const ISceneClassDesc *classDesc() const { return m_ClassDesc; } diff --git a/code/nel/tools/pipeline/max_dump/main.cpp b/code/nel/tools/pipeline/max_dump/main.cpp index ed774e697..3fcc02e35 100644 --- a/code/nel/tools/pipeline/max_dump/main.cpp +++ b/code/nel/tools/pipeline/max_dump/main.cpp @@ -31,9 +31,9 @@ #include "../max/builtin/storage/app_data.h" #include "../max/builtin/builtin.h" -//static const char *filename = "/srv/work/database/interfaces/anims_max/cp_fy_hof_species.max"; +static const char *filename = "/srv/work/database/interfaces/anims_max/cp_fy_hof_species.max"; //static const char *filename = "/home/kaetemi/source/minimax/GE_Acc_MikotoBaniere.max"; -static const char *filename = "/home/kaetemi/3dsMax/scenes/test2008.max"; +//static const char *filename = "/home/kaetemi/3dsMax/scenes/test2008.max"; //static const char *filename = "/home/kaetemi/3dsMax/scenes/teapot_test_scene.max"; static const char *streamname = "Scene";