diff options
Diffstat (limited to 'source/blender/freestyle/intern')
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index ca4cbd35edc..a742a45ec12 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -149,7 +149,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count) : Str freestyle_scene->camera = object_camera; // Material - material = BKE_material_add("stroke_material"); + material = BKE_material_add(G.main, "stroke_material"); material->mode |= MA_VERTEXCOLP; material->mode |= MA_TRANSP; material->mode |= MA_SHLESS; @@ -476,9 +476,9 @@ Object *BlenderStrokeRenderer::NewMesh() const static unsigned int mesh_id = 0xffffffff; BLI_snprintf(name, MAX_ID_NAME, "0%08xOB", mesh_id); - ob = BKE_object_add_only_object(OB_MESH, name); + ob = BKE_object_add_only_object(G.main, OB_MESH, name); BLI_snprintf(name, MAX_ID_NAME, "0%08xME", mesh_id); - ob->data = BKE_mesh_add(name); + ob->data = BKE_mesh_add(G.main, name); ob->lay = 1; base = BKE_scene_base_add(freestyle_scene, ob); diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 543c47b2153..c5a3642e2c6 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -227,7 +227,7 @@ static Text *create_lineset_handler(char *layer_name, char *lineset_name) { char *s1 = escape_quotes(layer_name); char *s2 = escape_quotes(lineset_name); - Text *text = BKE_text_add(lineset_name); + Text *text = BKE_text_add(G.main, lineset_name); BKE_text_write(text, "import parameter_editor; parameter_editor.process('"); BKE_text_write(text, s1); BKE_text_write(text, "', '"); diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h index 6093b6e4dcd..3a5e45604b6 100644 --- a/source/blender/freestyle/intern/system/PythonInterpreter.h +++ b/source/blender/freestyle/intern/system/PythonInterpreter.h @@ -90,7 +90,7 @@ public: int status = BPY_filepath_exec(_context, fn, reports); #else int status; - Text *text = BKE_text_load(fn, G.main->name); + Text *text = BKE_text_load(G.main, fn, G.main->name); if (text) { status = BPY_text_exec(_context, text, reports, false); BKE_text_unlink(G.main, text); @@ -167,7 +167,7 @@ private: vector<string> pathnames; StringUtils::getPathName(_path, "", pathnames); - struct Text *text = BKE_text_add("tmp_freestyle_initpath.txt"); + struct Text *text = BKE_text_add(G.main, "tmp_freestyle_initpath.txt"); string cmd = "import sys\n"; txt_insert_buf(text, const_cast<char*>(cmd.c_str())); |