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:
authorHans Goudey <h.goudey@me.com>2022-09-06 19:53:46 +0300
committerHans Goudey <h.goudey@me.com>2022-09-06 20:14:03 +0300
commit1d24586a900daa4ea24bce8acc3708237b3c2a87 (patch)
tree588b6c369dfcb80b43b04101557ecbdfb8029e71 /source/blender/editors/space_node/node_edit.cc
parent2d38768f89d12a142ece7da325fadbf0e6df8d02 (diff)
Cleanup: Move select all nodes code to operator
This more specific high level functionality isn't needed elsewhere. Move it to the operator and clean it up a bit.
Diffstat (limited to 'source/blender/editors/space_node/node_edit.cc')
-rw-r--r--source/blender/editors/space_node/node_edit.cc37
1 files changed, 0 insertions, 37 deletions
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc
index 984eecc229c..f07a1205c6b 100644
--- a/source/blender/editors/space_node/node_edit.cc
+++ b/source/blender/editors/space_node/node_edit.cc
@@ -1473,43 +1473,6 @@ void NODE_OT_duplicate(wmOperatorType *ot)
ot->srna, "keep_inputs", false, "Keep Inputs", "Keep the input links to duplicated nodes");
}
-static bool node_select_check(const ListBase *lb)
-{
- LISTBASE_FOREACH (const bNode *, node, lb) {
- if (node->flag & NODE_SELECT) {
- return true;
- }
- }
-
- return false;
-}
-
-void node_select_all(ListBase *lb, int action)
-{
- if (action == SEL_TOGGLE) {
- if (node_select_check(lb)) {
- action = SEL_DESELECT;
- }
- else {
- action = SEL_SELECT;
- }
- }
-
- LISTBASE_FOREACH (bNode *, node, lb) {
- switch (action) {
- case SEL_SELECT:
- nodeSetSelected(node, true);
- break;
- case SEL_DESELECT:
- nodeSetSelected(node, false);
- break;
- case SEL_INVERT:
- nodeSetSelected(node, !(node->flag & SELECT));
- break;
- }
- }
-}
-
/* XXX: some code needing updating to operators. */
/* goes over all scenes, reads render layers */