Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuha Mäki-Kanto <ih5235252@gmail.com>2012-02-18 20:55:41 +0400
committerJuha Mäki-Kanto <ih5235252@gmail.com>2012-02-18 20:55:41 +0400
commitf75bf20c817d9e09b23513d007bc8cc69ff00d48 (patch)
tree7fc3a9ea0327a0ab22c9a65d3d77d2f8cf0e095d /source/blender/collada/ArmatureExporter.h
parent7beddb750610982ebccfd64d87759baa91e011a5 (diff)
Fix rest of #27022, collada export: add bone parenting of objects
- SceneExporter collects a list of child-objects for armature-object and passes it onto ArmatureExporter - SceneExporter's writeNodes is then called from ArmatureExporter for matching child-objects for bone. - ArmatureExporter removes written child-objects from list, objects not exported as being bone parented are exported as direct children of the armature-node. - Should play nice with current Second Life-compatibility. A nicer implementation would require some design changes, will have to wait.
Diffstat (limited to 'source/blender/collada/ArmatureExporter.h')
-rw-r--r--source/blender/collada/ArmatureExporter.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/collada/ArmatureExporter.h b/source/blender/collada/ArmatureExporter.h
index 9d64664fa63..e9ee38d36cf 100644
--- a/source/blender/collada/ArmatureExporter.h
+++ b/source/blender/collada/ArmatureExporter.h
@@ -28,6 +28,7 @@
#ifndef __ARMATUREEXPORTER_H__
#define __ARMATUREEXPORTER_H__
+#include <list>
#include <string>
//#include <vector>
@@ -47,6 +48,8 @@
#include "ExportSettings.h"
+class SceneExporter;
+
// XXX exporter writes wrong data for shared armatures. A separate
// controller should be written for each armature-mesh binding how do
// we make controller ids then?
@@ -56,7 +59,8 @@ public:
ArmatureExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
// write bone nodes
- void add_armature_bones(Object *ob_arm, Scene *sce);
+ void add_armature_bones(Object *ob_arm, Scene* sce, SceneExporter* se,
+ std::list<Object*>& child_objects);
bool is_skinned_mesh(Object *ob);
@@ -85,8 +89,10 @@ private:
std::string get_joint_sid(Bone *bone, Object *ob_arm);
- // parent_mat is armature-space
- void add_bone_node(Bone *bone, Object *ob_arm);
+ // Scene, SceneExporter and the list of child_objects
+ // are required for writing bone parented objects
+ void add_bone_node(Bone *bone, Object *ob_arm, Scene* sce, SceneExporter* se,
+ std::list<Object*>& child_objects);
void add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW::Node& node);