diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operator_props.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operator_props.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c index 2a44b4997a2..569cd43a524 100644 --- a/source/blender/windowmanager/intern/wm_operator_props.c +++ b/source/blender/windowmanager/intern/wm_operator_props.c @@ -239,6 +239,28 @@ void WM_operator_properties_gesture_border(wmOperatorType *ot, bool extend) } /** + * Use with #WM_gesture_lasso_invoke + */ +void WM_operator_properties_gesture_lasso_ex(wmOperatorType *ot, bool deselect, bool extend) +{ + PropertyRNA *prop; + prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + + if (deselect) { + RNA_def_boolean(ot->srna, "deselect", false, "Deselect", "Deselect rather than select items"); + } + if (extend) { + RNA_def_boolean(ot->srna, "extend", true, "Extend", "Extend selection instead of deselecting everything first"); + } +} + +void WM_operator_properties_gesture_lasso(wmOperatorType *ot) +{ + WM_operator_properties_gesture_lasso_ex(ot, true, true); +} + +/** * Use with #WM_gesture_straightline_invoke */ void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor) |