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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-22 22:51:45 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-22 22:51:45 +0400
commit586c631c88d7a4ea24810bf18ab96ed7ec542d37 (patch)
treef82477dc819aede374c68f509b964929ff07f05a /intern
parent9adfa289e800a52a7c4a47ea3ee8dcdf5b50f9c2 (diff)
Cycles: when creating nodes from a blender material, set the diffuse color in
the diffuse node, similar for lamps and world.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/addon/ui.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 94a48e6c42d..d894f66c32e 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -348,7 +348,7 @@ def find_node_input(node, name):
def panel_node_draw(layout, id, output_type, input_name):
if not id.node_tree:
- layout.prop(id, "use_nodes")
+ layout.prop(id, "use_nodes", icon='NODETREE')
return
ntree = id.node_tree
@@ -435,7 +435,8 @@ class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- return context.world and CyclesButtonsPanel.poll(context)
+ world = context.world
+ return world and world.node_tree and CyclesButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout
@@ -465,7 +466,8 @@ class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- return context.material and CyclesButtonsPanel.poll(context)
+ mat = context.material
+ return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout
@@ -484,7 +486,8 @@ class CyclesMaterial_PT_displacement(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- return context.material and CyclesButtonsPanel.poll(context)
+ mat = context.material
+ return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
def draw(self, context):
layout = self.layout