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:
authorGaia Clary <gaia.clary@machinimatrix.org>2016-05-28 19:41:54 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2016-05-28 20:22:06 +0300
commit8e2611102090939f90fd5414e3717866f240020b (patch)
tree05105cc4079172df91573490739b1475d8783223 /source/blender/collada/collada_utils.h
parent001ba5bdf5975906f294cc7bde258409be7444b0 (diff)
Collada: Adding support for bone roll and bone layers
Differential Revision: https://developer.blender.org/D2034
Diffstat (limited to 'source/blender/collada/collada_utils.h')
-rw-r--r--source/blender/collada/collada_utils.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/source/blender/collada/collada_utils.h b/source/blender/collada/collada_utils.h
index 7f8e93736b5..e9f84afef61 100644
--- a/source/blender/collada/collada_utils.h
+++ b/source/blender/collada/collada_utils.h
@@ -46,6 +46,7 @@ extern "C" {
#include "BLI_linklist.h"
#include "BLI_utildefines.h"
+#include "BLI_string.h"
#include "BKE_context.h"
#include "BKE_object.h"
@@ -88,6 +89,9 @@ extern void bc_match_scale(std::vector<Object *> *objects_done, UnitConverter &u
extern void bc_triangulate_mesh(Mesh *me);
extern bool bc_is_leaf_bone(Bone *bone);
+extern EditBone *bc_get_edit_bone(bArmature * armature, char *name);
+extern int bc_set_layer(int bitfield, int layer, bool enable);
+extern int bc_set_layer(int bitfield, int layer);
class BCPolygonNormalsIndices
{
@@ -105,4 +109,48 @@ class BCPolygonNormalsIndices
};
+class BoneExtended {
+
+private:
+ char name[MAXBONENAME];
+ int chain_length;
+ bool is_leaf;
+ float tail[3];
+ float roll;
+
+ int bone_layers;
+ bool use_connect;
+ bool has_custom_tail;
+ bool has_custom_roll;
+
+public:
+
+ BoneExtended(EditBone *aBone);
+
+ void set_name(char *aName);
+ char *get_name();
+
+ void set_chain_length(const int aLength);
+ int get_chain_length();
+
+ void set_leaf_bone(bool state);
+ bool is_leaf_bone();
+
+ void set_bone_layers(std::string layers);
+ int get_bone_layers();
+ static std::string get_bone_layers(int bitfield);
+
+ void set_roll(float roll);
+ bool has_roll();
+ float get_roll();
+
+ void set_tail(float *vec);
+ float *get_tail();
+ bool has_tail();
+
+ void set_use_connect(int use_connect);
+ int get_use_connect();
+};
+
+
#endif