3D View: move particle circle select out of object mode loop
This doesn't support multi-object editing, no reason to check others.
This commit is contained in:
parent
e795dd4a20
commit
cbbdb5249f
@ -3258,8 +3258,9 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
|
|||||||
Object *obact = vc.obact;
|
Object *obact = vc.obact;
|
||||||
Object *obedit = vc.obedit;
|
Object *obedit = vc.obedit;
|
||||||
|
|
||||||
if (obedit || BKE_paint_select_elem_test(obact) ||
|
if ((obedit != NULL) ||
|
||||||
(obact && (obact->mode & (OB_MODE_PARTICLE_EDIT | OB_MODE_POSE))) )
|
BKE_paint_select_elem_test(obact) ||
|
||||||
|
(obact && (obact->mode & OB_MODE_POSE)))
|
||||||
{
|
{
|
||||||
view3d_operator_needs_opengl(C);
|
view3d_operator_needs_opengl(C);
|
||||||
|
|
||||||
@ -3269,7 +3270,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
|
|||||||
obact = vc.obact;
|
obact = vc.obact;
|
||||||
obedit = vc.obedit;
|
obedit = vc.obedit;
|
||||||
|
|
||||||
if (CTX_data_edit_object(C)) {
|
if (obedit) {
|
||||||
obedit_circle_select(&vc, select, mval, (float)radius);
|
obedit_circle_select(&vc, select, mval, (float)radius);
|
||||||
DEG_id_tag_update(obact->data, ID_RECALC_SELECT);
|
DEG_id_tag_update(obact->data, ID_RECALC_SELECT);
|
||||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obact->data);
|
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obact->data);
|
||||||
@ -3284,11 +3285,14 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
|
|||||||
pose_circle_select(&vc, select, mval, (float)radius);
|
pose_circle_select(&vc, select, mval, (float)radius);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return PE_circle_select(C, select, mval, (float)radius);
|
BLI_assert(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FOREACH_OBJECT_IN_MODE_END;
|
FOREACH_OBJECT_IN_MODE_END;
|
||||||
}
|
}
|
||||||
|
else if (obact && (obact->mode & OB_MODE_PARTICLE_EDIT)) {
|
||||||
|
return PE_circle_select(C, select, mval, (float)radius);
|
||||||
|
}
|
||||||
else if (obact && obact->mode & OB_MODE_SCULPT) {
|
else if (obact && obact->mode & OB_MODE_SCULPT) {
|
||||||
return OPERATOR_CANCELLED;
|
return OPERATOR_CANCELLED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user