mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Nodes: remove "Use Nodes" in Shader Editor for Object Materials
"Use Nodes" was removed in the compositor to simplify the compositing workflow. This introduced a slight inconsistency with the Shader Node Editor. This PR removes "Use Nodes" for object materials. For Line Style, no changes are planned (not sure how to preserve compatibility yet). This simplifies the state of objects; either they have a material or they don't. Backward compatibility: - If Use Nodes is turned Off, new nodes are added to the node tree to simulate the same material: - DNA: Only `use_nodes` is marked deprecated - Python API: - `material.use_nodes` is marked deprecated and will be removed in 6.0. Reading it always returns `True` and setting it has no effect. - `material.diffuse_color`, `material.specular` etc.. Are not used by EEVEE anymore but are kept because they are used by Workbench. Forward compatibility: Always enable 'Use Nodes' when writing blend files. Known Issues: Some UI tests are failing on macOS Pull Request: https://projects.blender.org/blender/blender/pulls/141278
This commit is contained in:
parent
62d791c8d6
commit
1b4daf9d2e
44 changed files with 363 additions and 297 deletions
|
|
@ -384,7 +384,6 @@ class ShaderNodeGroupInterfaceTest(AbstractNodeGroupInterfaceTest, NodeGroupInte
|
|||
def setUp(self):
|
||||
super().setUp()
|
||||
self.material = bpy.data.materials.new("test")
|
||||
self.material.use_nodes = True
|
||||
self.main_tree = self.material.node_tree
|
||||
|
||||
def test_invalid_socket_type(self):
|
||||
|
|
@ -476,7 +475,6 @@ class NodeTreeItemsIteratorTest(AbstractNodeGroupInterfaceTest, NodeGroupInterfa
|
|||
def setUp(self):
|
||||
super().setUp()
|
||||
self.material = bpy.data.materials.new("test")
|
||||
self.material.use_nodes = True
|
||||
self.main_tree = self.material.node_tree
|
||||
|
||||
# Regression test for changes while iterating over tree interface items (#143551).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue