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:
authorCampbell Barton <ideasman42@gmail.com>2015-03-04 06:38:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-04 07:13:10 +0300
commitcf2876b77aaf84a50922f7398f89feaeb56bad0b (patch)
tree83dc6d710a485114e5d267ced2f19e91475c2626 /source/blender/blenkernel/intern/armature.c
parentd48c3666da8600ffbf60a803cbd47f593bdf14fa (diff)
Fix for snap to cursor /w parents (object/pose)
Also don't use pose-bone transform unless the user is in pose-mode.
Diffstat (limited to 'source/blender/blenkernel/intern/armature.c')
-rw-r--r--source/blender/blenkernel/intern/armature.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 31695b05352..6b67a4e5763 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -263,6 +263,19 @@ Bone *BKE_armature_find_bone_name(bArmature *arm, const char *name)
return bone;
}
+bool BKE_armature_bone_flag_test_recursive(const Bone *bone, int flag)
+{
+ if (bone->flag & flag) {
+ return true;
+ }
+ else if (bone->parent) {
+ return BKE_armature_bone_flag_test_recursive(bone->parent, flag);
+ }
+ else {
+ return false;
+ }
+}
+
/* Finds the best possible extension to the name on a particular axis. (For renaming, check for
* unique names afterwards) strip_number: removes number extensions (TODO: not used)
* axis: the axis to name on