diff --git a/code/nel/tools/pipeline/max/builtin/animatable.cpp b/code/nel/tools/pipeline/max/builtin/animatable.cpp index 5fac3e450..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(PIPELINE::MAX::CScene *scene) : CSceneClass(scene), m_AppData(NULL) +CAnimatable::CAnimatable(CScene *scene) : CSceneClass(scene), m_AppData(NULL) { } diff --git a/code/nel/tools/pipeline/max/builtin/animatable.h b/code/nel/tools/pipeline/max/builtin/animatable.h index 15c7879d3..6ac27ad2e 100644 --- a/code/nel/tools/pipeline/max/builtin/animatable.h +++ b/code/nel/tools/pipeline/max/builtin/animatable.h @@ -56,7 +56,7 @@ class CAppData; class CAnimatable : public CSceneClass { public: - CAnimatable(PIPELINE::MAX::CScene *scene); + CAnimatable(CScene *scene); virtual ~CAnimatable(); // class desc diff --git a/code/nel/tools/pipeline/max/builtin/base_object.cpp b/code/nel/tools/pipeline/max/builtin/base_object.cpp index f84346795..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(PIPELINE::MAX::CScene *scene) : CReferenceTarget(scene) +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 12c186714..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(PIPELINE::MAX::CScene *scene); + 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 1cff5b8fa..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(PIPELINE::MAX::CScene *scene) : CTexmap(scene) +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 c9bde8985..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(PIPELINE::MAX::CScene *scene); + 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 663a1687f..4cc483739 100644 --- a/code/nel/tools/pipeline/max/builtin/builtin.cpp +++ b/code/nel/tools/pipeline/max/builtin/builtin.cpp @@ -40,6 +40,8 @@ #include "reference_maker.h" #include "reference_target.h" +#include "scene_impl.h" + #include "i_node.h" #include "node_impl.h" @@ -218,7 +220,10 @@ void CBuiltin::registerClasses(CSceneClassRegistry *registry) registry->add(&ReferenceTargetClassDesc); registry->add(&ReferenceTargetSuperClassDesc); - // node + // scene (inh ReferenceMaker) + registry->add(&SceneImplClassDesc); + + // node (inh ReferenceTarget) registry->add(&NodeSuperClassDesc); { registry->add(&NodeClassDesc); diff --git a/code/nel/tools/pipeline/max/builtin/i_node.cpp b/code/nel/tools/pipeline/max/builtin/i_node.cpp index 13f330cc3..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(PIPELINE::MAX::CScene *scene) : CReferenceTarget(scene) +INode::INode(CScene *scene) : CReferenceTarget(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/i_node.h b/code/nel/tools/pipeline/max/builtin/i_node.h index 1b2b88394..fbf83adde 100644 --- a/code/nel/tools/pipeline/max/builtin/i_node.h +++ b/code/nel/tools/pipeline/max/builtin/i_node.h @@ -49,7 +49,7 @@ namespace BUILTIN { class INode : public CReferenceTarget { public: - INode(PIPELINE::MAX::CScene *scene); + INode(CScene *scene); virtual ~INode(); // class desc diff --git a/code/nel/tools/pipeline/max/builtin/modifier.cpp b/code/nel/tools/pipeline/max/builtin/modifier.cpp index 65f2ec4dc..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(PIPELINE::MAX::CScene *scene) : CBaseObject(scene) +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 024eb4da5..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(PIPELINE::MAX::CScene *scene); + 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 fb20973ab..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(PIPELINE::MAX::CScene *scene) : CMtlBase(scene) +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 c75cc5ca0..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(PIPELINE::MAX::CScene *scene); + 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 7ff894ef9..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(PIPELINE::MAX::CScene *scene) : CReferenceTarget(scene) +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 21a602b63..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(PIPELINE::MAX::CScene *scene); + CMtlBase(CScene *scene); virtual ~CMtlBase(); }; /* class CMtlBase */ diff --git a/code/nel/tools/pipeline/max/builtin/node_impl.cpp b/code/nel/tools/pipeline/max/builtin/node_impl.cpp index a64b3e401..a16a65a08 100644 --- a/code/nel/tools/pipeline/max/builtin/node_impl.cpp +++ b/code/nel/tools/pipeline/max/builtin/node_impl.cpp @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -CNodeImpl::CNodeImpl(PIPELINE::MAX::CScene *scene) : INode(scene) +CNodeImpl::CNodeImpl(CScene *scene) : INode(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/node_impl.h b/code/nel/tools/pipeline/max/builtin/node_impl.h index 3ba43ac94..bf7184f18 100644 --- a/code/nel/tools/pipeline/max/builtin/node_impl.h +++ b/code/nel/tools/pipeline/max/builtin/node_impl.h @@ -49,7 +49,7 @@ namespace BUILTIN { class CNodeImpl : public INode { public: - CNodeImpl(PIPELINE::MAX::CScene *scene); + CNodeImpl(CScene *scene); virtual ~CNodeImpl(); // class desc diff --git a/code/nel/tools/pipeline/max/builtin/object.cpp b/code/nel/tools/pipeline/max/builtin/object.cpp index 4fa944a0d..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(PIPELINE::MAX::CScene *scene) : CBaseObject(scene) +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 3830b4bca..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(PIPELINE::MAX::CScene *scene); + 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 793c21048..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(PIPELINE::MAX::CScene *scene) : CReferenceTarget(scene) +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 3f4db5922..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(PIPELINE::MAX::CScene *scene); + 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 1de6489a4..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(PIPELINE::MAX::CScene *scene) : CReferenceTarget(scene) +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 18eca113a..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(PIPELINE::MAX::CScene *scene); + 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 807979a80..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(PIPELINE::MAX::CScene *scene) : CObject(scene) +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 3a4b64eda..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(PIPELINE::MAX::CScene *scene); + 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 9c7b78c9c..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(PIPELINE::MAX::CScene *scene) : CObject(scene) +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 1ede2aa84..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(PIPELINE::MAX::CScene *scene); + 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 2ec47999a..7a97b291a 100644 --- a/code/nel/tools/pipeline/max/builtin/reference_maker.cpp +++ b/code/nel/tools/pipeline/max/builtin/reference_maker.cpp @@ -64,7 +64,7 @@ namespace BUILTIN { //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -CReferenceMaker::CReferenceMaker(PIPELINE::MAX::CScene *scene) : CAnimatable(scene), m_ReferenceMap(false), m_References2035Value0(0) +CReferenceMaker::CReferenceMaker(CScene *scene) : CAnimatable(scene), m_ReferenceMap(false), m_References2035Value0(0) { } diff --git a/code/nel/tools/pipeline/max/builtin/reference_maker.h b/code/nel/tools/pipeline/max/builtin/reference_maker.h index 8163c8d2f..e56f38a61 100644 --- a/code/nel/tools/pipeline/max/builtin/reference_maker.h +++ b/code/nel/tools/pipeline/max/builtin/reference_maker.h @@ -50,7 +50,7 @@ namespace BUILTIN { class CReferenceMaker : public CAnimatable { public: - CReferenceMaker(PIPELINE::MAX::CScene *scene); + CReferenceMaker(CScene *scene); virtual ~CReferenceMaker(); // class desc diff --git a/code/nel/tools/pipeline/max/builtin/reference_target.cpp b/code/nel/tools/pipeline/max/builtin/reference_target.cpp index 2b84efbc6..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(PIPELINE::MAX::CScene *scene) : CReferenceMaker(scene) +CReferenceTarget::CReferenceTarget(CScene *scene) : CReferenceMaker(scene) { } diff --git a/code/nel/tools/pipeline/max/builtin/reference_target.h b/code/nel/tools/pipeline/max/builtin/reference_target.h index 3e45ab87f..b6daa94de 100644 --- a/code/nel/tools/pipeline/max/builtin/reference_target.h +++ b/code/nel/tools/pipeline/max/builtin/reference_target.h @@ -50,7 +50,7 @@ namespace BUILTIN { class CReferenceTarget : public CReferenceMaker { public: - CReferenceTarget(PIPELINE::MAX::CScene *scene); + CReferenceTarget(CScene *scene); virtual ~CReferenceTarget(); // class desc diff --git a/code/nel/tools/pipeline/max/builtin/scene_impl.cpp b/code/nel/tools/pipeline/max/builtin/scene_impl.cpp new file mode 100644 index 000000000..8efa76247 --- /dev/null +++ b/code/nel/tools/pipeline/max/builtin/scene_impl.cpp @@ -0,0 +1,111 @@ +/** + * \file scene_impl.cpp + * \brief CSceneImpl + * \date 2012-08-24 12:33GMT + * \author Jan Boon (Kaetemi) + * CSceneImpl + */ + +/* + * 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 "scene_impl.h" + +// STL includes + +// NeL includes +// #include + +// Project includes + +using namespace std; +// using namespace NLMISC; + +namespace PIPELINE { +namespace MAX { +namespace BUILTIN { + +CSceneImpl::CSceneImpl(CScene *scene) : CReferenceMaker(scene) +{ + +} + +CSceneImpl::~CSceneImpl() +{ + +} + +const ucstring CSceneImpl::DisplayName = ucstring("Scene"); +const char *CSceneImpl::InternalName = "SceneImpl"; +const NLMISC::CClassId CSceneImpl::ClassId = NLMISC::CClassId(0x00002222, 0x00000000); +const TSClassId CSceneImpl::SuperClassId = CReferenceMaker::SuperClassId; +const CSceneImplClassDesc SceneImplClassDesc(&DllPluginDescBuiltin); + +void CSceneImpl::parse(uint16 version, TParseLevel level) +{ + CReferenceMaker::parse(version, level); +} + +void CSceneImpl::clean() +{ + CReferenceMaker::clean(); +} + +void CSceneImpl::build(uint16 version) +{ + CReferenceMaker::build(version); +} + +void CSceneImpl::disown() +{ + CReferenceMaker::disown(); +} + +void CSceneImpl::init() +{ + CReferenceMaker::init(); +} + +bool CSceneImpl::inherits(const NLMISC::CClassId classId) const +{ + if (classId == classDesc()->classId()) return true; + return CReferenceMaker::inherits(classId); +} + +const ISceneClassDesc *CSceneImpl::classDesc() const +{ + return &SceneImplClassDesc; +} + +void CSceneImpl::toStringLocal(std::ostream &ostream, const std::string &pad) const +{ + CReferenceMaker::toStringLocal(ostream, pad); +} + +IStorageObject *CSceneImpl::createChunkById(uint16 id, bool container) +{ + return CReferenceMaker::createChunkById(id, container); +} + +} /* namespace BUILTIN */ +} /* namespace MAX */ +} /* namespace PIPELINE */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/max/builtin/scene_impl.h b/code/nel/tools/pipeline/max/builtin/scene_impl.h new file mode 100644 index 000000000..fd1450f91 --- /dev/null +++ b/code/nel/tools/pipeline/max/builtin/scene_impl.h @@ -0,0 +1,86 @@ +/** + * \file scene_impl.h + * \brief CSceneImpl + * \date 2012-08-24 12:33GMT + * \author Jan Boon (Kaetemi) + * CSceneImpl + */ + +/* + * 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_SCENE_IMPL_H +#define PIPELINE_SCENE_IMPL_H +#include + +// STL includes + +// NeL includes + +// Project includes +#include "reference_maker.h" + +namespace PIPELINE { +namespace MAX { +namespace BUILTIN { + +/** + * \brief CSceneImpl + * \date 2012-08-22 08:53GMT + * \author Jan Boon (Kaetemi) + * Scene implementation + */ +class CSceneImpl : public CReferenceMaker +{ +public: + CSceneImpl(CScene *scene); + virtual ~CSceneImpl(); + + // 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 CSceneImpl */ + +typedef CSceneClassDesc CSceneImplClassDesc; +extern const CSceneImplClassDesc SceneImplClassDesc; + +} /* namespace BUILTIN */ +} /* namespace MAX */ +} /* namespace PIPELINE */ + +#endif /* #ifndef PIPELINE_SCENE_IMPL_H */ + +/* end of file */ diff --git a/code/nel/tools/pipeline/max/builtin/std_mat.cpp b/code/nel/tools/pipeline/max/builtin/std_mat.cpp index b0173fc8b..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(PIPELINE::MAX::CScene *scene) : CMtl(scene) +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 fbaba1b8a..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(PIPELINE::MAX::CScene *scene); + 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 146056290..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(PIPELINE::MAX::CScene *scene) : CStdMat(scene) +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 889cacfe8..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(PIPELINE::MAX::CScene *scene); + 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 089d0110b..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(PIPELINE::MAX::CScene *scene) : CMtlBase(scene) +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 43db10d20..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(PIPELINE::MAX::CScene *scene); + 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 99d28f7f6..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(PIPELINE::MAX::CScene *scene) : CObject(scene) +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 cd0b9d427..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(PIPELINE::MAX::CScene *scene); + 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 3660a3912..a7b7a20fd 100644 --- a/code/nel/tools/pipeline/max/scene.cpp +++ b/code/nel/tools/pipeline/max/scene.cpp @@ -40,6 +40,7 @@ #include "class_directory_3.h" #include "scene_class_registry.h" #include "scene_class_unknown.h" +#include "builtin/scene_impl.h" using namespace std; // using namespace NLMISC; @@ -119,7 +120,7 @@ IStorageObject *CScene::createChunkById(uint16 id, bool container) //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// -CSceneClassContainer::CSceneClassContainer(CScene *scene, const CSceneClassRegistry *sceneClassRegistry, CDllDirectory *dllDirectory, CClassDirectory3 *classDirectory3) : m_Scene(scene), 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), m_BuiltinScene(NULL) { } @@ -149,6 +150,10 @@ void CSceneClassContainer::parse(uint16 version, TParseLevel level) m_StorageObjectByIndex[i] = static_cast(it->second); ++it; } + CSceneClass *builtinScene = m_StorageObjectByIndex[m_StorageObjectByIndex.size() - 1]; + nlassert(builtinScene); + m_BuiltinScene = dynamic_cast(builtinScene); + nlassert(m_BuiltinScene); CStorageContainer::parse(version, level); } diff --git a/code/nel/tools/pipeline/max/scene.h b/code/nel/tools/pipeline/max/scene.h index 23fe163d9..faf27ef47 100644 --- a/code/nel/tools/pipeline/max/scene.h +++ b/code/nel/tools/pipeline/max/scene.h @@ -42,7 +42,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -class CScene; +class CSceneImpl; } @@ -122,7 +122,7 @@ protected: public: /// Return the single instance of the builtin scene class - inline BUILTIN::CScene *scene() { return NULL; } + inline BUILTIN::CSceneImpl *scene() const { return m_BuiltinScene; } private: CScene *m_Scene; @@ -134,6 +134,8 @@ private: std::vector m_StorageObjectByIndex; std::map m_StorageObjectToIndex; + BUILTIN::CSceneImpl *m_BuiltinScene; + }; /* class CSceneClassContainer */ } /* namespace MAX */ diff --git a/code/nel/tools/pipeline/max/scene_class.h b/code/nel/tools/pipeline/max/scene_class.h index a2add12e0..9a5ff2f2d 100644 --- a/code/nel/tools/pipeline/max/scene_class.h +++ b/code/nel/tools/pipeline/max/scene_class.h @@ -46,7 +46,7 @@ namespace PIPELINE { namespace MAX { namespace BUILTIN { -class CScene; +class CSceneImpl; } @@ -124,7 +124,7 @@ public: //! \name Scene utility access //@{ /// Return the scene scene class - inline BUILTIN::CScene *scene() const { return m_Scene->container()->scene(); } + inline BUILTIN::CSceneImpl *scene() const { return m_Scene->container()->scene(); } /// Return the scene version inline uint16 version() const { return m_Scene->version(); } /// Return the scene container diff --git a/code/nel/tools/pipeline/max_dump/main.cpp b/code/nel/tools/pipeline/max_dump/main.cpp index 3fcc02e35..9e7f7a4cc 100644 --- a/code/nel/tools/pipeline/max_dump/main.cpp +++ b/code/nel/tools/pipeline/max_dump/main.cpp @@ -31,8 +31,8 @@ #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 = "/home/kaetemi/source/minimax/GE_Acc_MikotoBaniere.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/teapot_test_scene.max"; static const char *streamname = "Scene";