Blender 2.8 - 4.5 Support
This commit is contained in:
@ -66,7 +66,10 @@ class LnxGroupTree(bpy.types.NodeTree):
|
||||
"""Try to avoid creating loops of group trees with each other"""
|
||||
# upstream trees of tested treed should nad share trees with downstream trees of current tree
|
||||
tested_tree_upstream_trees = {t.name for t in self.upstream_trees()}
|
||||
current_tree_downstream_trees = {p.node_tree.name for p in bpy.context.space_data.path}
|
||||
if bpy.context.space_data is not None:
|
||||
current_tree_downstream_trees = {p.node_tree.name for p in bpy.context.space_data.path}
|
||||
else:
|
||||
current_tree_downstream_trees = set()
|
||||
shared_trees = tested_tree_upstream_trees & current_tree_downstream_trees
|
||||
return not shared_trees
|
||||
|
||||
|
Reference in New Issue
Block a user