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>2010-09-15 17:22:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-15 17:22:36 +0400
commit1e291017ca5a8831bbdc5714c54573bb6de3fcf1 (patch)
tree53ffad8aa041e4c147e53ed2d3df6c29d262cace /source/blender/editors/space_view3d/view3d_select.c
parent4828d0cba0e621d8e8b1cf3f3b3d00e8d83b861a (diff)
add missing notifiers for bone circle/border/lasso select.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 966fac1a3bd..cc1d26b136e 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -630,6 +630,7 @@ static void do_lasso_select_armature(ViewContext *vc, short mcords[][2], short m
EditBone *ebone;
float vec[3];
short sco1[2], sco2[2], didpoint;
+ int change= FALSE;
/* set editdata in vc */
@@ -645,20 +646,27 @@ static void do_lasso_select_armature(ViewContext *vc, short mcords[][2], short m
if(select) ebone->flag |= BONE_ROOTSEL;
else ebone->flag &= ~BONE_ROOTSEL;
didpoint= 1;
+ change= TRUE;
}
if(lasso_inside(mcords, moves, sco2[0], sco2[1])) {
if(select) ebone->flag |= BONE_TIPSEL;
else ebone->flag &= ~BONE_TIPSEL;
didpoint= 1;
+ change= TRUE;
}
/* if one of points selected, we skip the bone itself */
if(didpoint==0 && lasso_inside_edge(mcords, moves, sco1[0], sco1[1], sco2[0], sco2[1])) {
if(select) ebone->flag |= BONE_TIPSEL|BONE_ROOTSEL|BONE_SELECTED;
else ebone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ change= TRUE;
}
}
- ED_armature_sync_selection(arm->edbo);
- ED_armature_validate_active(arm);
+
+ if(change) {
+ ED_armature_sync_selection(arm->edbo);
+ ED_armature_validate_active(arm);
+ WM_main_add_notifier(NC_OBJECT|ND_BONE_SELECT, vc->obedit);
+ }
}
static void do_lasso_select_facemode(ViewContext *vc, short mcords[][2], short moves, short select)
@@ -1593,6 +1601,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
}
ED_armature_sync_selection(arm->edbo);
+ WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, vc.obedit);
}
else if(obedit->type==OB_LATTICE) {
do_lattice_box_select(&vc, &rect, selecting, extend);
@@ -1985,6 +1994,7 @@ static void armature_circle_select(ViewContext *vc, int selecting, short *mval,
struct {ViewContext *vc; short select, mval[2]; float radius; } data;
bArmature *arm= vc->obedit->data;
EditBone *ebone;
+ int change= FALSE;
/* set vc->edit data */
data.select = selecting;
@@ -2023,10 +2033,14 @@ static void armature_circle_select(ViewContext *vc, int selecting, short *mval,
ebone->flag |= BONE_TIPSEL|BONE_ROOTSEL|BONE_SELECTED;
else
ebone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
+ change= TRUE;
}
}
- ED_armature_validate_active(arm);
+ if(change) {
+ ED_armature_validate_active(arm);
+ WM_main_add_notifier(NC_OBJECT|ND_BONE_SELECT, vc->obedit);
+ }
}
/** Callbacks for circle selection in Editmode */