diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-05-12 02:48:41 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-05-12 02:48:41 +0400 |
commit | 8925ed1420ea2557abc7867cf12f89730ef77718 (patch) | |
tree | 67a95fd12253de438e1bdb30bf6c90af2ff12d7f /source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp | |
parent | bf2fac79d407a1d8c0e5727cc644d98eef60a965 (diff) | |
parent | 1c0c2f4d0bd6556a3dd7293ddbd419a066e745f4 (diff) |
Merged changes in the trunk up to revision 46557.
Conflicts resolved:
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/makesrna/intern/rna_scene.c
Additional changes:
* Fix for recent changes of BKE_* function renaming.
* Fix for an "attempt to free NULL pointer" in BlenderStrokeRenderer::RenderStrokeRepBasic().
Diffstat (limited to 'source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp')
-rw-r--r-- | source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index adb46d857ba..f8c87fd0029 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -47,7 +47,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count) char name[22]; snprintf(name, sizeof(name), "FRS%d_%s", render_count, re->scene->id.name+2); - freestyle_scene = add_scene(name); + freestyle_scene = BKE_scene_add(name); freestyle_scene->r.cfra = old_scene->r.cfra; freestyle_scene->r.mode= old_scene->r.mode & ~( R_EDGE_FRS | R_SHADOW | R_SSS | R_PANORAMA | R_ENVMAP | R_MBLUR | R_BORDER ); @@ -80,10 +80,10 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count) BLI_strncpy(freestyle_scene->r.engine, old_scene->r.engine, sizeof(freestyle_scene->r.engine)); freestyle_scene->r.im_format.planes = R_IMF_PLANES_RGBA; freestyle_scene->r.im_format.imtype = R_IMF_IMTYPE_PNG; - set_scene_bg( G.main, freestyle_scene ); + BKE_scene_set_background( G.main, freestyle_scene ); // Camera - Object* object_camera = add_object(freestyle_scene, OB_CAMERA); + Object* object_camera = BKE_object_add(freestyle_scene, OB_CAMERA); Camera* camera = (Camera *) object_camera->data; camera->type = CAM_ORTHO; @@ -104,7 +104,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render* re, int render_count) freestyle_scene->camera = object_camera; // Material - material = add_material("stroke_material"); + material = BKE_material_add("stroke_material"); material->mode |= MA_VERTEXCOLP; material->mode |= MA_TRANSP; material->mode |= MA_SHLESS; @@ -134,12 +134,12 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer(){ //cout << "removing " << name[0] << name[1] << ":" << (name+2) << endl; switch (ob->type) { case OB_MESH: - free_libblock( &G.main->object, ob ); - free_libblock( &G.main->mesh, data ); + BKE_libblock_free( &G.main->object, ob ); + BKE_libblock_free( &G.main->mesh, data ); break; case OB_CAMERA: - free_libblock( &G.main->object, ob ); - free_libblock( &G.main->camera, data ); + BKE_libblock_free( &G.main->object, ob ); + BKE_libblock_free( &G.main->camera, data ); freestyle_scene->camera = NULL; break; default: @@ -150,9 +150,9 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer(){ BLI_freelistN( &freestyle_scene->base ); // release material - free_libblock( &G.main->mat, material ); + BKE_libblock_free( &G.main->mat, material ); - set_scene_bg( G.main, old_scene ); + BKE_scene_set_background( G.main, old_scene ); } float BlenderStrokeRenderer::get_stroke_vertex_z(void) const { @@ -223,11 +223,11 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const{ continue; // me = Mesh.New() - Object* object_mesh = add_object(freestyle_scene, OB_MESH); + Object* object_mesh = BKE_object_add(freestyle_scene, OB_MESH); Mesh* mesh = (Mesh *) object_mesh->data; - MEM_freeN(mesh->bb); - mesh->bb= NULL; - mesh->id.us = 0; + // MEM_freeN(mesh->bb); + // mesh->bb= NULL; + // mesh->id.us = 0; #if 1 // me.materials = [mat] |