nuclear@0: /* nuclear@0: Open Asset Import Library (ASSIMP) nuclear@0: ---------------------------------------------------------------------- nuclear@0: nuclear@0: Copyright (c) 2006-2010, ASSIMP Development Team nuclear@0: All rights reserved. nuclear@0: nuclear@0: Redistribution and use of this software in source and binary forms, nuclear@0: with or without modification, are permitted provided that the nuclear@0: following conditions are met: nuclear@0: nuclear@0: * Redistributions of source code must retain the above nuclear@0: copyright notice, this list of conditions and the nuclear@0: following disclaimer. nuclear@0: nuclear@0: * Redistributions in binary form must reproduce the above nuclear@0: copyright notice, this list of conditions and the nuclear@0: following disclaimer in the documentation and/or other nuclear@0: materials provided with the distribution. nuclear@0: nuclear@0: * Neither the name of the ASSIMP team, nor the names of its nuclear@0: contributors may be used to endorse or promote products nuclear@0: derived from this software without specific prior nuclear@0: written permission of the ASSIMP Development Team. nuclear@0: nuclear@0: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS nuclear@0: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT nuclear@0: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR nuclear@0: A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT nuclear@0: OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, nuclear@0: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT nuclear@0: LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, nuclear@0: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY nuclear@0: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT nuclear@0: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE nuclear@0: OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nuclear@0: nuclear@0: ---------------------------------------------------------------------- nuclear@0: */ nuclear@0: nuclear@0: /** @file BlenderScene.cpp nuclear@0: * @brief MACHINE GENERATED BY ./scripts/BlenderImporter/genblenddna.py nuclear@0: */ nuclear@0: #include "AssimpPCH.h" nuclear@0: #ifndef AI_BUILD_NO_BLEND_IMPORTER nuclear@0: nuclear@0: #include "BlenderDNA.h" nuclear@0: #include "BlenderScene.h" nuclear@0: #include "BlenderSceneGen.h" nuclear@0: nuclear@0: using namespace Assimp; nuclear@0: using namespace Assimp::Blender; nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Object& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadField((int&)dest.type,"type",db); nuclear@0: ReadFieldArray2(dest.obmat,"obmat",db); nuclear@0: ReadFieldArray2(dest.parentinv,"parentinv",db); nuclear@0: ReadFieldArray(dest.parsubstr,"parsubstr",db); nuclear@0: { nuclear@0: boost::shared_ptr parent; nuclear@0: ReadFieldPtr(parent,"*parent",db); nuclear@0: dest.parent = parent.get(); nuclear@0: } nuclear@0: ReadFieldPtr(dest.track,"*track",db); nuclear@0: ReadFieldPtr(dest.proxy,"*proxy",db); nuclear@0: ReadFieldPtr(dest.proxy_from,"*proxy_from",db); nuclear@0: ReadFieldPtr(dest.proxy_group,"*proxy_group",db); nuclear@0: ReadFieldPtr(dest.dup_group,"*dup_group",db); nuclear@0: ReadFieldPtr(dest.data,"*data",db); nuclear@0: ReadField(dest.modifiers,"modifiers",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Group& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadField(dest.layer,"layer",db); nuclear@0: ReadFieldPtr(dest.gobject,"*gobject",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MTex& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField((int&)dest.blendtype,"blendtype",db); nuclear@0: ReadFieldPtr(dest.object,"*object",db); nuclear@0: ReadFieldPtr(dest.tex,"*tex",db); nuclear@0: ReadFieldArray(dest.uvname,"uvname",db); nuclear@0: ReadField((int&)dest.projx,"projx",db); nuclear@0: ReadField((int&)dest.projy,"projy",db); nuclear@0: ReadField((int&)dest.projz,"projz",db); nuclear@0: ReadField(dest.mapping,"mapping",db); nuclear@0: ReadFieldArray(dest.ofs,"ofs",db); nuclear@0: ReadFieldArray(dest.size,"size",db); nuclear@0: ReadField(dest.rot,"rot",db); nuclear@0: ReadField(dest.texflag,"texflag",db); nuclear@0: ReadField(dest.colormodel,"colormodel",db); nuclear@0: ReadField(dest.pmapto,"pmapto",db); nuclear@0: ReadField(dest.pmaptoneg,"pmaptoneg",db); nuclear@0: ReadField(dest.r,"r",db); nuclear@0: ReadField(dest.g,"g",db); nuclear@0: ReadField(dest.b,"b",db); nuclear@0: ReadField(dest.k,"k",db); nuclear@0: ReadField(dest.colspecfac,"colspecfac",db); nuclear@0: ReadField(dest.mirrfac,"mirrfac",db); nuclear@0: ReadField(dest.alphafac,"alphafac",db); nuclear@0: ReadField(dest.difffac,"difffac",db); nuclear@0: ReadField(dest.specfac,"specfac",db); nuclear@0: ReadField(dest.emitfac,"emitfac",db); nuclear@0: ReadField(dest.hardfac,"hardfac",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: TFace& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldArray2(dest.uv,"uv",db); nuclear@0: ReadFieldArray(dest.col,"col",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: ReadField(dest.mode,"mode",db); nuclear@0: ReadField(dest.tile,"tile",db); nuclear@0: ReadField(dest.unwrap,"unwrap",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: SubsurfModifierData& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.modifier,"modifier",db); nuclear@0: ReadField(dest.subdivType,"subdivType",db); nuclear@0: ReadField(dest.levels,"levels",db); nuclear@0: ReadField(dest.renderLevels,"renderLevels",db); nuclear@0: ReadField(dest.flags,"flags",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MFace& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.v1,"v1",db); nuclear@0: ReadField(dest.v2,"v2",db); nuclear@0: ReadField(dest.v3,"v3",db); nuclear@0: ReadField(dest.v4,"v4",db); nuclear@0: ReadField(dest.mat_nr,"mat_nr",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Lamp& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadField((int&)dest.type,"type",db); nuclear@0: ReadField(dest.flags,"flags",db); nuclear@0: ReadField(dest.colormodel,"colormodel",db); nuclear@0: ReadField(dest.totex,"totex",db); nuclear@0: ReadField(dest.r,"r",db); nuclear@0: ReadField(dest.g,"g",db); nuclear@0: ReadField(dest.b,"b",db); nuclear@0: ReadField(dest.k,"k",db); nuclear@0: ReadField(dest.energy,"energy",db); nuclear@0: ReadField(dest.dist,"dist",db); nuclear@0: ReadField(dest.spotsize,"spotsize",db); nuclear@0: ReadField(dest.spotblend,"spotblend",db); nuclear@0: ReadField(dest.att1,"att1",db); nuclear@0: ReadField(dest.att2,"att2",db); nuclear@0: ReadField((int&)dest.falloff_type,"falloff_type",db); nuclear@0: ReadField(dest.sun_brightness,"sun_brightness",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MDeformWeight& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.def_nr,"def_nr",db); nuclear@0: ReadField(dest.weight,"weight",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: PackedFile& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.size,"size",db); nuclear@0: ReadField(dest.seek,"seek",db); nuclear@0: ReadFieldPtr(dest.data,"*data",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Base& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: { nuclear@0: boost::shared_ptr prev; nuclear@0: ReadFieldPtr(prev,"*prev",db); nuclear@0: dest.prev = prev.get(); nuclear@0: } nuclear@0: ReadFieldPtr(dest.next,"*next",db); nuclear@0: ReadFieldPtr(dest.object,"*object",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MTFace& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldArray2(dest.uv,"uv",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: ReadField(dest.mode,"mode",db); nuclear@0: ReadField(dest.tile,"tile",db); nuclear@0: ReadField(dest.unwrap,"unwrap",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Material& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadField(dest.r,"r",db); nuclear@0: ReadField(dest.g,"g",db); nuclear@0: ReadField(dest.b,"b",db); nuclear@0: ReadField(dest.specr,"specr",db); nuclear@0: ReadField(dest.specg,"specg",db); nuclear@0: ReadField(dest.specb,"specb",db); nuclear@0: ReadField(dest.har,"har",db); nuclear@0: ReadField(dest.ambr,"ambr",db); nuclear@0: ReadField(dest.ambg,"ambg",db); nuclear@0: ReadField(dest.ambb,"ambb",db); nuclear@0: ReadField(dest.mirr,"mirr",db); nuclear@0: ReadField(dest.mirg,"mirg",db); nuclear@0: ReadField(dest.mirb,"mirb",db); nuclear@0: ReadField(dest.emit,"emit",db); nuclear@0: ReadField(dest.alpha,"alpha",db); nuclear@0: ReadField(dest.ref,"ref",db); nuclear@0: ReadField(dest.translucency,"translucency",db); nuclear@0: ReadField(dest.roughness,"roughness",db); nuclear@0: ReadField(dest.darkness,"darkness",db); nuclear@0: ReadField(dest.refrac,"refrac",db); nuclear@0: ReadFieldPtr(dest.group,"*group",db); nuclear@0: ReadField(dest.diff_shader,"diff_shader",db); nuclear@0: ReadField(dest.spec_shader,"spec_shader",db); nuclear@0: ReadFieldPtr(dest.mtex,"*mtex",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MTexPoly& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: { nuclear@0: boost::shared_ptr tpage; nuclear@0: ReadFieldPtr(tpage,"*tpage",db); nuclear@0: dest.tpage = tpage.get(); nuclear@0: } nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: ReadField(dest.transp,"transp",db); nuclear@0: ReadField(dest.mode,"mode",db); nuclear@0: ReadField(dest.tile,"tile",db); nuclear@0: ReadField(dest.pad,"pad",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Mesh& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadField(dest.totface,"totface",db); nuclear@0: ReadField(dest.totedge,"totedge",db); nuclear@0: ReadField(dest.totvert,"totvert",db); nuclear@0: ReadField(dest.totloop,"totloop",db); nuclear@0: ReadField(dest.totpoly,"totpoly",db); nuclear@0: ReadField(dest.subdiv,"subdiv",db); nuclear@0: ReadField(dest.subdivr,"subdivr",db); nuclear@0: ReadField(dest.subsurftype,"subsurftype",db); nuclear@0: ReadField(dest.smoothresh,"smoothresh",db); nuclear@0: ReadFieldPtr(dest.mface,"*mface",db); nuclear@0: ReadFieldPtr(dest.mtface,"*mtface",db); nuclear@0: ReadFieldPtr(dest.tface,"*tface",db); nuclear@0: ReadFieldPtr(dest.mvert,"*mvert",db); nuclear@0: ReadFieldPtr(dest.medge,"*medge",db); nuclear@0: ReadFieldPtr(dest.mloop,"*mloop",db); nuclear@0: ReadFieldPtr(dest.mloopuv,"*mloopuv",db); nuclear@0: ReadFieldPtr(dest.mloopcol,"*mloopcol",db); nuclear@0: ReadFieldPtr(dest.mpoly,"*mpoly",db); nuclear@0: ReadFieldPtr(dest.mtpoly,"*mtpoly",db); nuclear@0: ReadFieldPtr(dest.dvert,"*dvert",db); nuclear@0: ReadFieldPtr(dest.mcol,"*mcol",db); nuclear@0: ReadFieldPtr(dest.mat,"**mat",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MDeformVert& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldPtr(dest.dw,"*dw",db); nuclear@0: ReadField(dest.totweight,"totweight",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: World& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MLoopCol& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.r,"r",db); nuclear@0: ReadField(dest.g,"g",db); nuclear@0: ReadField(dest.b,"b",db); nuclear@0: ReadField(dest.a,"a",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MVert& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldArray(dest.co,"co",db); nuclear@0: ReadFieldArray(dest.no,"no",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: ReadField(dest.mat_nr,"mat_nr",db); nuclear@0: ReadField(dest.bweight,"bweight",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MEdge& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.v1,"v1",db); nuclear@0: ReadField(dest.v2,"v2",db); nuclear@0: ReadField(dest.crease,"crease",db); nuclear@0: ReadField(dest.bweight,"bweight",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MLoopUV& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldArray(dest.uv,"uv",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: GroupObject& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldPtr(dest.prev,"*prev",db); nuclear@0: ReadFieldPtr(dest.next,"*next",db); nuclear@0: ReadFieldPtr(dest.ob,"*ob",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: ListBase& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldPtr(dest.first,"*first",db); nuclear@0: ReadFieldPtr(dest.last,"*last",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MLoop& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.v,"v",db); nuclear@0: ReadField(dest.e,"e",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: ModifierData& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldPtr(dest.next,"*next",db); nuclear@0: ReadFieldPtr(dest.prev,"*prev",db); nuclear@0: ReadField(dest.type,"type",db); nuclear@0: ReadField(dest.mode,"mode",db); nuclear@0: ReadFieldArray(dest.name,"name",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: ID& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadFieldArray(dest.name,"name",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MCol& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.r,"r",db); nuclear@0: ReadField(dest.g,"g",db); nuclear@0: ReadField(dest.b,"b",db); nuclear@0: ReadField(dest.a,"a",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MPoly& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.loopstart,"loopstart",db); nuclear@0: ReadField(dest.totloop,"totloop",db); nuclear@0: ReadField(dest.mat_nr,"mat_nr",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Scene& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadFieldPtr(dest.camera,"*camera",db); nuclear@0: ReadFieldPtr(dest.world,"*world",db); nuclear@0: ReadFieldPtr(dest.basact,"*basact",db); nuclear@0: ReadField(dest.base,"base",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Library& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadFieldArray(dest.name,"name",db); nuclear@0: ReadFieldArray(dest.filename,"filename",db); nuclear@0: ReadFieldPtr(dest.parent,"*parent",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Tex& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField((int&)dest.type,"type",db); nuclear@0: ReadFieldPtr(dest.ima,"*ima",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Camera& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadField((int&)dest.type,"type",db); nuclear@0: ReadField((int&)dest.flag,"flag",db); nuclear@0: ReadField(dest.angle,"angle",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: MirrorModifierData& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.modifier,"modifier",db); nuclear@0: ReadField(dest.axis,"axis",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: ReadField(dest.tolerance,"tolerance",db); nuclear@0: ReadFieldPtr(dest.mirror_ob,"*mirror_ob",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: template <> void Structure :: Convert ( nuclear@0: Image& dest, nuclear@0: const FileDatabase& db nuclear@0: ) const nuclear@0: { nuclear@0: nuclear@0: ReadField(dest.id,"id",db); nuclear@0: ReadFieldArray(dest.name,"name",db); nuclear@0: ReadField(dest.ok,"ok",db); nuclear@0: ReadField(dest.flag,"flag",db); nuclear@0: ReadField(dest.source,"source",db); nuclear@0: ReadField(dest.type,"type",db); nuclear@0: ReadField(dest.pad,"pad",db); nuclear@0: ReadField(dest.pad1,"pad1",db); nuclear@0: ReadField(dest.lastframe,"lastframe",db); nuclear@0: ReadField(dest.tpageflag,"tpageflag",db); nuclear@0: ReadField(dest.totbind,"totbind",db); nuclear@0: ReadField(dest.xrep,"xrep",db); nuclear@0: ReadField(dest.yrep,"yrep",db); nuclear@0: ReadField(dest.twsta,"twsta",db); nuclear@0: ReadField(dest.twend,"twend",db); nuclear@0: ReadFieldPtr(dest.packedfile,"*packedfile",db); nuclear@0: ReadField(dest.lastupdate,"lastupdate",db); nuclear@0: ReadField(dest.lastused,"lastused",db); nuclear@0: ReadField(dest.animspeed,"animspeed",db); nuclear@0: ReadField(dest.gen_x,"gen_x",db); nuclear@0: ReadField(dest.gen_y,"gen_y",db); nuclear@0: ReadField(dest.gen_type,"gen_type",db); nuclear@0: nuclear@0: db.reader->IncPtr(size); nuclear@0: } nuclear@0: nuclear@0: //-------------------------------------------------------------------------------- nuclear@0: void DNA::RegisterConverters() { nuclear@0: nuclear@0: converters["Object"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Group"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MTex"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["TFace"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["SubsurfModifierData"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MFace"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Lamp"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MDeformWeight"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["PackedFile"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Base"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MTFace"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Material"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MTexPoly"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Mesh"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MDeformVert"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["World"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MLoopCol"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MVert"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MEdge"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MLoopUV"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["GroupObject"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["ListBase"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MLoop"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["ModifierData"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["ID"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MCol"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MPoly"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Scene"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Library"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Tex"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Camera"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["MirrorModifierData"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: converters["Image"] = DNA::FactoryPair( &Structure::Allocate, &Structure::Convert ); nuclear@0: } nuclear@0: nuclear@0: nuclear@0: #endif