diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-04-21 03:00:27 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-04-21 03:00:27 +0400 |
commit | 5725be6f08e490a6954584259d6601dae8c1e554 (patch) | |
tree | df1e732c357baa8bcb401094d2fa58a1f7eeec9f /source | |
parent | 62e6d8e757652e2057ff47b5450beb17464c933e (diff) |
Minor code clean-up & removal of unused code segments.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp | 24 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 4 |
2 files changed, 2 insertions, 26 deletions
diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 31068c9c9d6..4cb74776573 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -30,11 +30,7 @@ #include "BKE_global.h" -// XXX Are those "ifdef __cplusplus" useful here? -#ifdef __cplusplus extern "C" { -#endif - #include "MEM_guardedalloc.h" #include "DNA_camera_types.h" @@ -55,10 +51,7 @@ extern "C" { #include "BKE_scene.h" #include "RE_pipeline.h" - -#ifdef __cplusplus } -#endif namespace Freestyle { @@ -74,7 +67,6 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str _width = re->winx; _height = re->winy; - //Scene.New("FreestyleStrokes") old_scene = re->scene; char name[22]; @@ -136,9 +128,6 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str _z_delta = 0.00001f; _z = camera->clipsta + _z_delta; - // test - //_z = 999.90f; _z_delta = 0.01f; - object_camera->loc[0] = re->disprect.xmin + 0.5f * re->rectx; object_camera->loc[1] = re->disprect.ymin + 0.5f * re->recty; object_camera->loc[2] = 1.0f; @@ -197,8 +186,6 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer() // release material BKE_libblock_free(&_freestyle_bmain.mat, material); - //BKE_scene_set_background(&_freestyle_bmain, old_scene); - BKE_scene_unlink(&_freestyle_bmain, freestyle_scene, NULL); } @@ -288,21 +275,10 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const Object *object_mesh = NewMesh(); #endif Mesh *mesh = (Mesh *)object_mesh->data; -#if 0 - MEM_freeN(mesh->bb); - mesh->bb = NULL; - mesh->id.us = 0; -#endif -#if 1 - //me.materials = [mat] mesh->mat = (Material **)MEM_mallocN(1 * sizeof(Material *), "MaterialList"); mesh->mat[0] = material; mesh->totcol = 1; test_object_materials((Main *) &_freestyle_bmain, (ID *)mesh); -#else - assign_material(object_mesh, material, object_mesh->totcol + 1); - object_mesh->actcol = object_mesh->totcol; -#endif // vertices allocation mesh->totvert = visible_faces + visible_segments * 2; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 4e9d185becf..d765547296f 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1070,7 +1070,7 @@ void RE_TileProcessor(Render *re) re->stats_draw(re->sdh, &re->i); #ifdef WITH_FREESTYLE - /* Freestyle */ + /* Freestyle */ if (re->r.mode & R_EDGE_FRS) { if (!re->test_break(re->tbh)) { add_freestyle(re); @@ -1123,7 +1123,7 @@ static void do_render_3d(Render *re) threaded_tile_processor(re); #ifdef WITH_FREESTYLE - /* Freestyle */ + /* Freestyle */ if (re->r.mode & R_EDGE_FRS) if (!re->test_break(re->tbh)) add_freestyle(re); |