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:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-06-05 23:06:33 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-06-05 23:06:33 +0400
commitf681ce08c43b838f0141e8b4875bb10d0d6b1a69 (patch)
tree8a225340dea7c8a0e8cdb3a6a6109a01b88096fa /source/blender/editors/space_node/node_relationships.c
parent4c2a51e1f9691522d083d035b8d6b707bf1e4450 (diff)
Fix #35640, part 2. Check id.lib in poll functions for operators which do critical modification of node trees (create nodes, link, etc.). Transform operators and hide/show type operators are still
allowed, this does not modify actual behavior of the nodes and can be useful for inspecting linked nodes.
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r--source/blender/editors/space_node/node_relationships.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 30f85c07e65..beea4dc3183 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -386,7 +386,7 @@ void NODE_OT_link_viewer(wmOperatorType *ot)
/* api callbacks */
ot->exec = node_active_link_viewer;
- ot->poll = composite_node_active;
+ ot->poll = composite_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -690,7 +690,7 @@ void NODE_OT_link(wmOperatorType *ot)
ot->invoke = node_link_invoke;
ot->modal = node_link_modal;
// ot->exec = node_link_exec;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
ot->cancel = node_link_cancel;
/* flags */
@@ -731,7 +731,7 @@ void NODE_OT_link_make(wmOperatorType *ot)
/* callbacks */
ot->exec = node_make_link_exec;
- ot->poll = ED_operator_node_active; // XXX we need a special poll which checks that there are selected input/output sockets
+ ot->poll = ED_operator_node_editable; // XXX we need a special poll which checks that there are selected input/output sockets
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -826,7 +826,7 @@ void NODE_OT_links_cut(wmOperatorType *ot)
ot->exec = cut_links_exec;
ot->cancel = WM_gesture_lines_cancel;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -868,7 +868,7 @@ void NODE_OT_links_detach(wmOperatorType *ot)
ot->description = "Remove all links to selected nodes, and try to connect neighbor nodes together";
ot->exec = detach_links_exec;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -937,7 +937,7 @@ void NODE_OT_parent_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = node_parent_set_exec;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -971,7 +971,7 @@ void NODE_OT_parent_clear(wmOperatorType *ot)
/* api callbacks */
ot->exec = node_parent_clear_exec;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -1057,7 +1057,7 @@ void NODE_OT_join(wmOperatorType *ot)
/* api callbacks */
ot->exec = node_join_exec;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -1137,7 +1137,7 @@ void NODE_OT_attach(wmOperatorType *ot)
/* api callbacks */
ot->exec = node_attach_exec;
ot->invoke = node_attach_invoke;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -1206,7 +1206,7 @@ void NODE_OT_detach(wmOperatorType *ot)
/* api callbacks */
ot->exec = node_detach_exec;
- ot->poll = ED_operator_node_active;
+ ot->poll = ED_operator_node_editable;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;