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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-02 23:24:30 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-02 23:24:30 +0400
commitac52c79cb19ac85e06651a7b9af2e54efcd45a97 (patch)
treec0366c96ed66c6899af093cc0194ab572b9df750 /release
parent30f1f28a8af3b393608b5869512a8823111294ad (diff)
RenderEngine/Nodes: system to check for shading nodes compatibility
* Scene.use_shading_nodes property to check if RenderEngine is using new shading nodes system, and RenderEngine.bl_use_shading_nodes to set this. * Add mechanism for tagging nodes as being compatible with the old/new system.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_node.py13
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py9
2 files changed, 14 insertions, 8 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 2b2cc505f1f..69766b54e97 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -27,6 +27,7 @@ class NODE_HT_header(Header):
def draw(self, context):
layout = self.layout
+ scene = context.scene
snode = context.space_data
snode_id = snode.id
id_from = snode.id_from
@@ -43,10 +44,14 @@ class NODE_HT_header(Header):
layout.prop(snode, "tree_type", text="", expand=True)
if snode.tree_type == 'SHADER':
- if id_from:
- layout.template_ID(id_from, "active_material", new="material.new")
- if snode_id:
- layout.prop(snode_id, "use_nodes")
+ if scene.render.use_shading_nodes:
+ layout.prop(snode, "shader_type", text="", expand=True)
+
+ if not scene.render.use_shading_nodes or snode.shader_type == 'OBJECT':
+ if id_from:
+ layout.template_ID(id_from, "active_material", new="material.new")
+ if snode_id:
+ layout.prop(snode_id, "use_nodes")
elif snode.tree_type == 'TEXTURE':
layout.prop(snode, "texture_type", text="", expand=True)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index dceab4a72e8..07c860fca31 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2143,10 +2143,11 @@ class VIEW3D_PT_view3d_display(Panel):
subsub.active = scene.unit_settings.system == 'NONE'
subsub.prop(view, "grid_subdivisions", text="Subdivisions")
- col = layout.column()
- col.label(text="Shading:")
- col.prop(gs, "material_mode", text="")
- col.prop(view, "show_textured_solid")
+ if not scene.render.use_shading_nodes:
+ col = layout.column()
+ col.label(text="Shading:")
+ col.prop(gs, "material_mode", text="")
+ col.prop(view, "show_textured_solid")
layout.separator()