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 /release
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 'release')
-rw-r--r--release/scripts/startup/bl_operators/node.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index 8217c401ede..7d09e1e759e 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -100,7 +100,7 @@ class NodeAddOperator():
def poll(cls, context):
space = context.space_data
# needs active node editor and a tree to add nodes to
- return (space.type == 'NODE_EDITOR' and space.edit_tree)
+ return (space.type == 'NODE_EDITOR' and space.edit_tree and not space.edit_tree.library)
# Default execute simply adds a node
def execute(self, context):
@@ -231,7 +231,7 @@ class NODE_OT_collapse_hide_unused_toggle(Operator):
def poll(cls, context):
space = context.space_data
# needs active node editor and a tree
- return (space.type == 'NODE_EDITOR' and space.edit_tree)
+ return (space.type == 'NODE_EDITOR' and space.edit_tree and not space.edit_tree.library)
def execute(self, context):
space = context.space_data