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>2017-10-16 08:11:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-16 08:14:07 +0300
commit946a4fe85a1717001230ab5f256cf5cf10f045cb (patch)
tree5acd245b6908bb7201d97aeb5fed2e5e12982beb /source/blender/windowmanager/intern/wm_operator_props.c
parent8bda35d2f49879ced26e9069bce14ebf368761b3 (diff)
WM: Don't save mouse-paths to operator history
In preparation for modal operators storing their properties, no need to keep mouse-paths around. Also use generic function for lasso properties.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operator_props.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operator_props.c22
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)