diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-28 09:45:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-28 09:45:19 +0400 |
commit | ee15754e318f4d9a1a3136ae0cf3475e42dee590 (patch) | |
tree | f5bba9aba25605211eb8f560f702dd1816c025f0 | |
parent | 492d7ace57fbb405a4881ebce01d2f0358fe2e64 (diff) |
move mouse select options into their own property function - more operators should use these eventually
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 5 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 18c7e975356..bef9219f44c 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2152,9 +2152,8 @@ void VIEW3D_OT_select(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first"); - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Remove from selection"); - RNA_def_boolean(ot->srna, "toggle", 0, "Toggle Selection", "Toggles selection"); + WM_operator_properties_mouse_select(ot); + RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting, in editmode used to extend object selection"); RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)"); RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (editmode only)"); diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 3bbd5583aa5..bfea3f3c40b 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -209,6 +209,7 @@ void WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperato void WM_operator_properties_free(struct PointerRNA *ptr); void WM_operator_properties_filesel(struct wmOperatorType *ot, int filter, short type, short action, short flag, short display); void WM_operator_properties_gesture_border(struct wmOperatorType *ot, int extend); +void WM_operator_properties_mouse_select(struct wmOperatorType *ot); void WM_operator_properties_gesture_straightline(struct wmOperatorType *ot, int cursor); void WM_operator_properties_select_all(struct wmOperatorType *ot); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 2cd955e9ee9..0d1d9a7a552 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -918,6 +918,13 @@ void WM_operator_properties_gesture_border(wmOperatorType *ot, int extend) RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first"); } +void WM_operator_properties_mouse_select(wmOperatorType *ot) +{ + RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Remove from selection"); + RNA_def_boolean(ot->srna, "toggle", 0, "Toggle Selection", "Toggles selection"); +} + void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor) { RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX); |