diff options
author | Thomas Dinges <blender@dingto.org> | 2012-01-06 05:31:36 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2012-01-06 05:31:36 +0400 |
commit | dd858d6cd9fb39363426a7547b36c1821d4b9c0d (patch) | |
tree | 61c64573bd73010a573aa0890afe1a0062ad7124 /release | |
parent | f983fe709d9f4ce01d02e76e689a94eb18188132 (diff) |
Cycles / Nodes:
* Make it possible to add a new material from the Node header, if no material exists in the (active) material slot.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 318ba8eab8a..4bd0b22779e 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -28,6 +28,7 @@ class NODE_HT_header(Header): layout = self.layout scene = context.scene + ob = context.object snode = context.space_data snode_id = snode.id id_from = snode.id_from @@ -50,6 +51,8 @@ class NODE_HT_header(Header): 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") + else: + layout.template_ID(ob, "active_material", new="material.new") if snode_id: layout.prop(snode_id, "use_nodes") |