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:
authorDiego Borghetti <bdiego@gmail.com>2010-05-12 17:55:09 +0400
committerDiego Borghetti <bdiego@gmail.com>2010-05-12 17:55:09 +0400
commit3c3502fda40959f75453f4bc40d4c09e26f5b2ec (patch)
treeb8b0bb6973588dddcf5c5986108937780336694d /source/blender/editors/space_node/node_select.c
parent9a4ba57ee9fc8005f734c961b73b99398880b37f (diff)
Small change to Node Space and two new function.
"Select all of the same type" now is binding to Shift + GKEY Two new function, select next and prev node of the same type. Select a node and press Shift + [ or Shift + ] go to the previous and next node of the same type (of the active node).
Diffstat (limited to 'source/blender/editors/space_node/node_select.c')
-rw-r--r--source/blender/editors/space_node/node_select.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 07e259cd0bb..32e57e29ab0 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -388,3 +388,53 @@ void NODE_OT_select_same_type(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
+
+/* ****** Select The Next/Prev Node Of The Same Type ****** */
+
+static int node_select_same_type_next_exec(bContext *C, wmOperator *op)
+{
+ SpaceNode *snode = CTX_wm_space_node(C);
+
+ node_select_same_type_np(snode, 0);
+ WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL);
+ return OPERATOR_FINISHED;
+}
+
+void NODE_OT_select_same_type_next(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Select Same Type Next";
+ ot->description = "Select the next node of the same type.";
+ ot->idname = "NODE_OT_select_same_type_next";
+
+ /* api callbacks */
+ ot->exec = node_select_same_type_next_exec;
+ ot->poll = ED_operator_node_active;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int node_select_same_type_prev_exec(bContext *C, wmOperator *op)
+{
+ SpaceNode *snode = CTX_wm_space_node(C);
+
+ node_select_same_type_np(snode, 1);
+ WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL);
+ return OPERATOR_FINISHED;
+}
+
+void NODE_OT_select_same_type_prev(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Select Same Type Prev";
+ ot->description = "Select the prev node of the same type.";
+ ot->idname = "NODE_OT_select_same_type_prev";
+
+ /* api callbacks */
+ ot->exec = node_select_same_type_prev_exec;
+ ot->poll = ED_operator_node_active;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+}