Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / blender / blenkernel / intern / scene.c
index 6f9ed3e..2a8fd76 100644 (file)
@@ -155,7 +155,6 @@ Scene *copy_scene(Main *bmain, Scene *sce, int type)
                scen->theDag= NULL;
                scen->obedit= NULL;
                scen->toolsettings= MEM_dupallocN(sce->toolsettings);
-               scen->stats= NULL;
 
                ts= scen->toolsettings;
                if(ts) {
@@ -245,11 +244,6 @@ void free_scene(Scene *sce)
                base= base->next;
        }
        /* do not free objects! */
-       
-       if(sce->gpd) {
-               sce->gpd->id.us--;
-               sce->gpd= NULL;
-       }
 
        BLI_freelistN(&sce->base);
        seq_free_editing(sce);
@@ -305,9 +299,6 @@ void free_scene(Scene *sce)
                ntreeFreeTree(sce->nodetree);
                MEM_freeN(sce->nodetree);
        }
-
-       if(sce->stats)
-               MEM_freeN(sce->stats);
 }
 
 Scene *add_scene(char *name)
@@ -404,13 +395,11 @@ Scene *add_scene(char *name)
        sce->unit.scale_length = 1.0f;
 
        pset= &sce->toolsettings->particle;
-       pset->flag= PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER|PE_AUTO_VELOCITY;
+       pset->flag= PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER;
        pset->emitterdist= 0.25f;
        pset->totrekey= 5;
        pset->totaddkey= 5;
        pset->brushtype= PE_BRUSH_NONE;
-       pset->draw_step= 2;
-       pset->fade_frames= 2;
        for(a=0; a<PE_TOT_BRUSH; a++) {
                pset->brush[a].strength= 50;
                pset->brush[a].size= 50;
@@ -860,3 +849,14 @@ float get_render_aosss_error(RenderData *r, float error)
                return error;
 }
 
+void free_dome_warp_text(struct Text *txt)
+{
+       Scene *scene;
+
+       scene = G.main->scene.first;
+       while(scene) {
+               if (scene->r.dometext == txt)
+                       scene->r.dometext = NULL;
+               scene = scene->id.next;
+       }
+}