Made temporary changes to use G.main rather than Freestyle-local Main for debugging.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 19 Jul 2014 06:37:13 +0000 (15:37 +0900)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Tue, 12 Aug 2014 01:10:34 +0000 (10:10 +0900)
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/render/intern/source/pipeline.c

index 0537caf9869705fe2480a218c5ae90c38e99530e..b119b10b9cb7b8f86e1708e227f9e9cd0a73b7c1 100644 (file)
@@ -145,6 +145,8 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(bContext *C, Render *re, int render
 
 BlenderStrokeRenderer::~BlenderStrokeRenderer()
 {
+       return; //XXX
+
        // The freestyle_scene object is not released here.  Instead,
        // the scene is released in free_all_freestyle_renders() in
        // source/blender/render/intern/source/pipeline.c, after the
index aaaa53bd54c5e489e25d9516a10a97b712c76a0a..89b64e287bbf9fd656214cf4d4a1273a25a0eb70 100644 (file)
@@ -1940,6 +1940,7 @@ static void add_freestyle(Render *re, int render)
 
        actsrl = BLI_findlink(&re->r.layers, re->r.actlay);
 
+#if 0
        re->freestyle_bmain = BKE_main_new();
 
        /* We use the same window manager for freestyle bmain as
@@ -1950,6 +1951,9 @@ static void add_freestyle(Render *re, int render)
         * to present (sergey)
         */
        re->freestyle_bmain->wm = re->main->wm;
+#else
+       re->freestyle_bmain = G.main;
+#endif
 
        FRS_init_stroke_rendering(re);
 
@@ -2016,18 +2020,22 @@ static void free_all_freestyle_renders(void)
                        if (freestyle_render) {
                                freestyle_scene = freestyle_render->scene;
                                RE_FreeRender(freestyle_render);
+#if 0
                                BKE_scene_unlink(re1->freestyle_bmain, freestyle_scene, NULL);
+#endif
                        }
                }
                BLI_freelistN(&re1->freestyle_renders);
 
                if (re1->freestyle_bmain) {
+#if 0
                        /* detach the window manager from freestyle bmain (see comments
                         * in add_freestyle() for more detail)
                         */
                        re1->freestyle_bmain->wm.first = re1->freestyle_bmain->wm.last = NULL;
 
                        BKE_main_free(re1->freestyle_bmain);
+#endif
                        re1->freestyle_bmain = NULL;
                }
        }