From 2843aa1501c5aabebe1701c88cd30b501e6b4aa5 Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Sun, 20 Jul 2014 20:09:46 +0900 Subject: Freestyle: Fix for error handling in SCENE_OT_freestyle_stroke_material_create. --- .../freestyle/intern/blender_interface/FRS_freestyle.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'source/blender/freestyle/intern') diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 1c8df35cb3e..bba4f58b922 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -735,16 +735,9 @@ void FRS_move_active_lineset_down(FreestyleConfig *config) // Testing -Material *FRS_create_stroke_material(bContext *C, Main *bmain, Scene *scene) +Material *FRS_create_stroke_material(bContext *C, Main *bmain, struct FreestyleLineStyle *linestyle) { - FreestyleLineStyle *linestyle = BKE_linestyle_active_from_scene(scene); - Material *ma; - - if (!linestyle) { - cout << "FRS_create_stroke_material: No active line style in the current scene" << endl; - return NULL; - } - ma = BlenderStrokeRenderer::GetStrokeShader(C, bmain, linestyle->nodetree, true); + Material *ma = BlenderStrokeRenderer::GetStrokeShader(C, bmain, linestyle->nodetree, true); ma->id.us = 0; return ma; } -- cgit v1.2.3