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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r--source/blender/makesrna/intern/rna_armature.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 61f6176fb25..3dc52a5c4e2 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -66,12 +66,16 @@ static void rna_Armature_act_bone_set(PointerRNA *ptr, PointerRNA value)
}
else {
if(value.id.data != arm) {
- /* raise an error! */
- }
- else {
- arm->act_bone= value.data;
- arm->act_bone->flag |= BONE_SELECTED;
+ Object *ob = (Object *)value.id.data;
+
+ if(GS(ob->id.name)!=ID_OB || (ob->data != arm)) {
+ printf("ERROR: armature set active bone - new active doesn't come from this armature\n");
+ return;
+ }
}
+
+ arm->act_bone= value.data;
+ arm->act_bone->flag |= BONE_SELECTED;
}
}