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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-07-14 11:20:40 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-08-12 05:10:17 +0400
commit846ec6e00ce9b959d0813ea3530186ab9ecdfb94 (patch)
treed6a28a9efd43e1fcb1374ef8c5575ed685cae91b /source/blender/editors/space_node/node_edit.c
parent60cdf97c3d9ce6cd1b65aa2faa9bfb33a284a9ef (diff)
Added new Output Line Style shader node for defining a node-based line material.
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r--source/blender/editors/space_node/node_edit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 9616d01efb0..7643c9c07b6 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -439,9 +439,8 @@ void ED_node_shader_default(const bContext *C, ID *id)
FreestyleLineStyle *linestyle = (FreestyleLineStyle *)id;
linestyle->nodetree = ntree;
- /* TODO use appropriate output_type & shader_type */
- output_type = SH_NODE_OUTPUT_MATERIAL;
- shader_type = SH_NODE_BSDF_DIFFUSE;
+ output_type = SH_NODE_OUTPUT_LINESTYLE;
+ shader_type = SH_NODE_TEX_IMAGE;
copy_v3_v3(color, &linestyle->r);
strength = 1.0f;
@@ -656,8 +655,8 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
if (node->id && ELEM(GS(node->id->name), ID_MA, ID_LA, ID_WO))
nodeClearActiveID(ntree, ID_TE);
- if (ELEM(node->type, SH_NODE_OUTPUT, SH_NODE_OUTPUT_MATERIAL,
- SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP))
+ if (ELEM5(node->type, SH_NODE_OUTPUT, SH_NODE_OUTPUT_MATERIAL,
+ SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP, SH_NODE_OUTPUT_LINESTYLE))
{
bNode *tnode;