diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-16 08:11:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-16 08:14:07 +0300 |
commit | 946a4fe85a1717001230ab5f256cf5cf10f045cb (patch) | |
tree | 5acd245b6908bb7201d97aeb5fed2e5e12982beb /source/blender/editors/space_node | |
parent | 8bda35d2f49879ced26e9069bce14ebf368761b3 (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/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_add.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_select.c | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index dc6b06790e0..1c11ee1f98c 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -277,8 +277,6 @@ static int add_reroute_exec(bContext *C, wmOperator *op) void NODE_OT_add_reroute(wmOperatorType *ot) { - PropertyRNA *prop; - ot->name = "Add Reroute"; ot->idname = "NODE_OT_add_reroute"; ot->description = "Add a reroute node"; @@ -293,8 +291,10 @@ void NODE_OT_add_reroute(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - prop = RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); - RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); + /* properties */ + PropertyRNA *prop; + prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); /* internal */ RNA_def_int(ot->srna, "cursor", BC_CROSSCURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); } diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 3b03399a5e7..64c019d12a3 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -1007,8 +1007,6 @@ static int cut_links_exec(bContext *C, wmOperator *op) void NODE_OT_links_cut(wmOperatorType *ot) { - PropertyRNA *prop; - ot->name = "Cut Links"; ot->idname = "NODE_OT_links_cut"; ot->description = "Use the mouse to cut (remove) some links"; @@ -1023,8 +1021,11 @@ void NODE_OT_links_cut(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - prop = RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); - RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); + /* properties */ + PropertyRNA *prop; + prop = RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); + /* internal */ RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX); } diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index f7b8f53a63f..98ba46fc87a 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -725,9 +725,7 @@ void NODE_OT_select_lasso(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - RNA_def_collection_runtime(ot->srna, "path", &RNA_OperatorMousePath, "Path", ""); - RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect rather than select items"); - RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first"); + WM_operator_properties_gesture_lasso(ot); } /* ****** Select/Deselect All ****** */ |