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:
authorClément Foucault <foucault.clem@gmail.com>2017-05-02 20:55:02 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-05-03 13:08:56 +0300
commit5570ba9c4f2cee25a1d366c754682996040d58a9 (patch)
tree3b803953d58b95f89c1d01c5ef4ab08caa62a786 /source/blender/editors/space_node
parenta7404958148f1030483c7d6238ebf48abc26cf24 (diff)
NodeTree: Add eevee default shader tree.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_edit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index fdfe316f5ed..fc3180680f8 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -397,6 +397,14 @@ void ED_node_shader_default(const bContext *C, ID *id)
Material *ma = (Material *)id;
ma->nodetree = ntree;
+ if (BKE_scene_uses_blender_eevee(scene)) {
+ out = nodeAddStaticNode(C, ntree, SH_NODE_OUTPUT_METALLIC);
+ out->locx = 300.0f; out->locy = 300.0f;
+ nodeSetActive(ntree, out);
+ ntreeUpdateTree(CTX_data_main(C), ntree);
+ return;
+ }
+
if (BKE_scene_use_new_shading_nodes(scene)) {
output_type = SH_NODE_OUTPUT_MATERIAL;
shader_type = SH_NODE_BSDF_DIFFUSE;