Compositor: Remove scene.use_nodes from Python API

Use Nodes were removed in d88d4cc8 from the UI, but marked deprecated
in Python API. Since we decided to remove `world.use_nodes` and
`material.use_nodes` for the shader editor (instead of deprecating
them), we also remove `scene.use_nodes`.

This PR only replaces the deprecated `scene.node_tree` with
`scene.compositing_node_group` where necessary. #143619 will fully
remove `node_tree`

Pull Request: https://projects.blender.org/blender/blender/pulls/143578
This commit is contained in:
Habib Gahbiche
2025-07-31 12:28:00 +02:00
parent 481c524734
commit c499adf3b8
3 changed files with 6 additions and 35 deletions

View File

@@ -430,8 +430,8 @@ class CompositorNodeGroupInterfaceTest(AbstractNodeGroupInterfaceTest, NodeGroup
def setUp(self):
super().setUp()
self.scene = bpy.data.scenes.new("test")
self.scene.use_nodes = True
self.main_tree = self.scene.node_tree
self.main_tree = bpy.data.node_groups.new("test node tree", "CompositorNodeTree")
self.scene.compositing_node_group = self.main_tree
def test_invalid_socket_type(self):
self.do_test_invalid_socket_type("INVALID_SOCKET_TYPE_11!1")