Compositor: remove scene.node_tree from Python API
Since we are removing `scene.use_nodes` in #143578, most developers will have to update their python script by replacing `scene.node_tree` by `scene.compositing_node_group` in order to create a new compositing node tree anyways. So we remove `scene.node_tree`. Note: `scene->nodetree` in `scene_blend_write()` is still being written to the blend file, so forward compatibility is not affected by this PR. Pull Request: https://projects.blender.org/blender/blender/pulls/143619
This commit is contained in:
@@ -217,7 +217,7 @@ class NodeGroupVersioning36Test(AbstractNodeGroupInterfaceTest):
|
||||
def test_load_compositor_nodes(self):
|
||||
self.open_file()
|
||||
|
||||
tree = bpy.data.scenes['Scene'].node_tree
|
||||
tree = bpy.data.scenes['Scene'].compositing_node_group
|
||||
group = bpy.data.node_groups.get('NodeGroup')
|
||||
self.assertIsNotNone(group, "Compositor node group not found")
|
||||
node = tree.nodes['Group']
|
||||
@@ -306,7 +306,7 @@ class NodeGroupVersioning25Test(AbstractNodeGroupInterfaceTest):
|
||||
def test_load_compositor_nodes(self):
|
||||
self.open_file()
|
||||
|
||||
tree = bpy.data.scenes['Scene'].node_tree
|
||||
tree = bpy.data.scenes['Scene'].compositing_node_group
|
||||
group = bpy.data.node_groups.get('NodeGroup.002')
|
||||
self.assertIsNotNone(group, "Compositor node group not found")
|
||||
node = tree.nodes['NodeGroup.002']
|
||||
|
||||
Reference in New Issue
Block a user