[Bf-blender-cvs] [7dd605e] master: Fix for SCENE_OT_freestyle_stroke_material_create not respecting "use_nodes" line style prop.

Tamito Kajiyama noreply at git.blender.org
Tue Aug 12 03:18:21 CEST 2014


Commit: 7dd605e3612b2ce454fb9deec2529a6432190494
Author: Tamito Kajiyama
Date:   Mon Jul 21 18:45:39 2014 +0900
Branches: master
https://developer.blender.org/rB7dd605e3612b2ce454fb9deec2529a6432190494

Fix for SCENE_OT_freestyle_stroke_material_create not respecting "use_nodes" line style prop.

===================================================================

M	source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index bba4f58..3c24bb7 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -737,7 +737,8 @@ void FRS_move_active_lineset_down(FreestyleConfig *config)
 
 Material *FRS_create_stroke_material(bContext *C, Main *bmain, struct FreestyleLineStyle *linestyle)
 {
-	Material *ma = BlenderStrokeRenderer::GetStrokeShader(C, bmain, linestyle->nodetree, true);
+	bNodeTree *nt = (linestyle->use_nodes) ? linestyle->nodetree : NULL;
+	Material *ma = BlenderStrokeRenderer::GetStrokeShader(C, bmain, nt, true);
 	ma->id.us = 0;
 	return ma;
 }




More information about the Bf-blender-cvs mailing list