[Bf-blender-cvs] [74b0edce747] master: Cleanup: add missing use_nodes in default materials with nodetrees
Brecht Van Lommel
noreply at git.blender.org
Thu Feb 27 15:12:35 CET 2020
Commit: 74b0edce7476bccabc478cc2ddf6811e72187ec2
Author: Brecht Van Lommel
Date: Thu Feb 27 14:56:01 2020 +0100
Branches: master
https://developer.blender.org/rB74b0edce7476bccabc478cc2ddf6811e72187ec2
Cleanup: add missing use_nodes in default materials with nodetrees
This didn't break anything, but could in the future.
===================================================================
M source/blender/blenkernel/intern/material.c
===================================================================
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index af5e867ac38..d8d5653730b 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1608,6 +1608,7 @@ static void material_default_surface_init(Material *ma)
{
bNodeTree *ntree = ntreeAddTree(NULL, "Shader Nodetree", ntreeType_Shader->idname);
ma->nodetree = ntree;
+ ma->use_nodes = true;
bNode *principled = nodeAddStaticNode(NULL, ntree, SH_NODE_BSDF_PRINCIPLED);
bNodeSocket *base_color = nodeFindSocket(principled, SOCK_IN, "Base Color");
@@ -1633,6 +1634,7 @@ static void material_default_volume_init(Material *ma)
{
bNodeTree *ntree = ntreeAddTree(NULL, "Shader Nodetree", ntreeType_Shader->idname);
ma->nodetree = ntree;
+ ma->use_nodes = true;
bNode *principled = nodeAddStaticNode(NULL, ntree, SH_NODE_VOLUME_PRINCIPLED);
bNode *output = nodeAddStaticNode(NULL, ntree, SH_NODE_OUTPUT_MATERIAL);
More information about the Bf-blender-cvs
mailing list