Blender V2.61 - r43446

GroupExporter.h

Go to the documentation of this file.
00001 /*
00002  * $Id: GroupExporter.h 40019 2011-09-07 18:23:30Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * Contributor(s): Chingiz Dyussenov, Arystanbek Dyussenov.
00021  *
00022  * ***** END GPL LICENSE BLOCK *****
00023  */
00024 
00029 #ifndef __GROUPEXPORTER_H__
00030 #define __GROUPEXPORTER_H__
00031 
00032 #include <stdlib.h>
00033 #include <stdio.h>
00034 #include <math.h>
00035 
00036 extern "C" {
00037 #include "DNA_scene_types.h"
00038 #include "DNA_object_types.h"
00039 #include "DNA_group_types.h"
00040 #include "DNA_meshdata_types.h"
00041 #include "DNA_mesh_types.h"
00042 #include "DNA_image_types.h"
00043 #include "DNA_material_types.h"
00044 #include "DNA_texture_types.h"
00045 #include "DNA_anim_types.h"
00046 #include "DNA_action_types.h"
00047 #include "DNA_curve_types.h"
00048 #include "DNA_armature_types.h"
00049 #include "DNA_modifier_types.h"
00050 #include "DNA_userdef_types.h"
00051 
00052 #include "BKE_DerivedMesh.h"
00053 #include "BKE_fcurve.h"
00054 #include "BKE_animsys.h"
00055 #include "BLI_path_util.h"
00056 #include "BLI_fileops.h"
00057 #include "ED_keyframing.h"
00058 }
00059 
00060 #include "COLLADASWAsset.h"
00061 #include "COLLADASWLibraryVisualScenes.h"
00062 #include "COLLADASWNode.h"
00063 #include "COLLADASWSource.h"
00064 #include "COLLADASWInstanceGeometry.h"
00065 #include "COLLADASWInputList.h"
00066 #include "COLLADASWPrimitves.h"
00067 #include "COLLADASWVertices.h"
00068 #include "COLLADASWLibraryAnimations.h"
00069 #include "COLLADASWLibraryImages.h"
00070 #include "COLLADASWLibraryEffects.h"
00071 #include "COLLADASWImage.h"
00072 #include "COLLADASWEffectProfile.h"
00073 #include "COLLADASWColorOrTexture.h"
00074 #include "COLLADASWParamTemplate.h"
00075 #include "COLLADASWParamBase.h"
00076 #include "COLLADASWSurfaceInitOption.h"
00077 #include "COLLADASWSampler.h"
00078 #include "COLLADASWScene.h"
00079 #include "COLLADASWTechnique.h"
00080 #include "COLLADASWTexture.h"
00081 #include "COLLADASWLibraryMaterials.h"
00082 #include "COLLADASWBindMaterial.h"
00083 #include "COLLADASWInstanceCamera.h"
00084 #include "COLLADASWInstanceLight.h"
00085 #include "COLLADASWConstants.h"
00086 #include "COLLADASWLibraryControllers.h"
00087 #include "COLLADASWInstanceController.h"
00088 #include "COLLADASWInstanceNode.h"
00089 #include "COLLADASWBaseInputElement.h"
00090 
00091 #include "ArmatureExporter.h"
00092 
00093 #include "LibraryNodes.h" // Note: patch sent upstream to implement this, but have this
00094               // here until applied upstream.
00095 
00096 #include "ExportSettings.h"
00097 
00098 class GroupExporter: LibraryNodes, protected TransformWriter, protected InstanceWriter
00099 {
00100 public:
00101     GroupExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm, const ExportSettings *export_settings);
00102     void exportScene(Scene *sce);
00103 
00104 private:
00105     void exportGroups();
00106     void createGroupsList();
00107     void addGroupToList(Object *ob);
00108     void writeGroups(Object *ob);
00109     
00110     Scene *scene;
00111     
00112     ArmatureExporter *arm_exporter;
00113     const ExportSettings *export_settings;
00114     
00115     std::vector<Group *> groups;
00116 };
00117 
00118 #endif