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:
Diffstat (limited to 'source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp')
-rw-r--r--source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
index c4df9c5d716..1c8df35cb3e 100644
--- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
+++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
@@ -43,6 +43,7 @@ extern "C" {
#include "DNA_camera_types.h"
#include "DNA_freestyle_types.h"
#include "DNA_group_types.h"
+#include "DNA_material_types.h"
#include "DNA_text_types.h"
#include "BKE_freestyle.h"
@@ -737,12 +738,15 @@ void FRS_move_active_lineset_down(FreestyleConfig *config)
Material *FRS_create_stroke_material(bContext *C, Main *bmain, Scene *scene)
{
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;
}
- return BlenderStrokeRenderer::GetStrokeShader(C, bmain, linestyle->nodetree);
+ ma = BlenderStrokeRenderer::GetStrokeShader(C, bmain, linestyle->nodetree, true);
+ ma->id.us = 0;
+ return ma;
}
} // extern "C"