Revision: 26561
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26561
Author:   blendix
Date:     2010-02-02 19:54:23 +0100 (Tue, 02 Feb 2010)

Log Message:
-----------
Fix semi-exit of particle edit mode after adding/removing hairs, when
child particles were enabled, should only free edit in case the parent
particle amount changes.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/particle_system.c

Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c    
2010-02-02 18:24:10 UTC (rev 26560)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c    
2010-02-02 18:54:23 UTC (rev 26561)
@@ -172,12 +172,6 @@
        PARTICLE_P;
        int totpart, totsaved = 0;
 
-       if(psys->edit && psys->free_edit) {
-               psys->free_edit(psys->edit);
-               psys->edit = NULL;
-               psys->free_edit = NULL;
-       }
-
        if(new_totpart<0) {
                if(part->distr==PART_DISTR_GRID  && part->from != 
PART_FROM_VERT) {
                        totpart= part->grid_res;
@@ -190,6 +184,12 @@
                totpart=new_totpart;
 
        if(totpart && totpart != psys->totpart) {
+               if(psys->edit && psys->free_edit) {
+                       psys->free_edit(psys->edit);
+                       psys->edit = NULL;
+                       psys->free_edit = NULL;
+               }
+
                newpars= MEM_callocN(totpart*sizeof(ParticleData), "particles");
                if(psys->part->phystype == PART_PHYS_BOIDS)
                        newboids= MEM_callocN(totpart*sizeof(BoidParticle), 
"boid particles");


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to