Implemented a basic framework for node-based shaders.

Shader nodes will be used to define materials for stroke rendering, so as to
allow users to interactively configure textures.
This commit is contained in:
Tamito Kajiyama
2014-07-11 16:51:04 +09:00
parent d956a074e3
commit 87f75299e1
9 changed files with 65 additions and 3 deletions

View File

@@ -67,6 +67,16 @@ class NODE_HT_header(Header):
if snode_id:
row.prop(snode_id, "use_nodes")
if scene.render.use_shading_nodes and snode.shader_type == 'LINESTYLE':
rl = context.scene.render.layers.active
lineset = rl.freestyle_settings.linesets.active
if lineset is not None:
row = layout.row()
row.enabled = not snode.pin
row.template_ID(lineset, "linestyle", new="scene.freestyle_linestyle_new")
if snode_id:
row.prop(snode_id, "use_nodes")
elif snode.tree_type == 'TextureNodeTree':
layout.prop(snode, "texture_type", text="", expand=True)