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/editors/space_view3d/view3d_select.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 602f790c8df..d2f2fdcaa81 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1870,7 +1870,6 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i
for (base = vc->scene->base.first; base && hits; base = base->next) {
if (BASE_SELECTABLE(vc->v3d, base)) {
while (base->selcol == (*col & 0xFFFF)) { /* we got an object */
-
if (*col & 0xFFFF0000) { /* we got a bone */
bone = get_indexed_bone(base->object, *col & ~(BONESEL_ANY));
if (bone) {
@@ -1878,16 +1877,13 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i
if ((bone->flag & BONE_UNSELECTABLE) == 0) {
bone->flag |= BONE_SELECTED;
bone_selected = 1;
-// XXX select_actionchannel_by_name(base->object->action, bone->name, 1);
}
}
else {
bArmature *arm = base->object->data;
bone->flag &= ~BONE_SELECTED;
-// XXX select_actionchannel_by_name(base->object->action, bone->name, 0);
if (arm->act_bone == bone)
arm->act_bone = NULL;
-
}
}
}
@@ -1897,7 +1893,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i
else
ED_base_object_select(base, BA_DESELECT);
}
-
+
col += 4; /* next color */
hits--;
if (hits == 0) break;
@@ -1906,13 +1902,16 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i
if (bone_selected) {
Object *ob = base->object;
- bArmature *arm = ob->data;
-
- WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
- if (arm->flag & ARM_HAS_VIZ_DEPS) {
- /* mask modifier ('armature' mode), etc. */
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ if (ob && (ob->type == OB_ARMATURE)) {
+ bArmature *arm = ob->data;
+
+ WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
+
+ if (arm && (arm->flag & ARM_HAS_VIZ_DEPS)) {
+ /* mask modifier ('armature' mode), etc. */
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ }
}
}
}