Revision: 23813
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23813
Author:   blendix
Date:     2009-10-13 19:15:12 +0200 (Tue, 13 Oct 2009)

Log Message:
-----------
Bugfixes for particle mode:
* Fix crash removing all particles.
* Brush added particles did not get correct coordinates.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/physics/particle_edit.c
    trunk/blender/source/blender/editors/space_view3d/drawobject.c

Modified: trunk/blender/source/blender/editors/physics/particle_edit.c
===================================================================
--- trunk/blender/source/blender/editors/physics/particle_edit.c        
2009-10-13 16:08:34 UTC (rev 23812)
+++ trunk/blender/source/blender/editors/physics/particle_edit.c        
2009-10-13 17:15:12 UTC (rev 23813)
@@ -3003,6 +3003,9 @@
                        for(k=0, hkey=pa->hair; k<pa->totkey; k++, hkey++, 
key++) {
                                key->co= hkey->co;
                                key->time= &hkey->time;
+
+                               if(!(psys->flag & PSYS_GLOBAL_HAIR))
+                                       key->flag |= PEK_USE_WCO;
                        }
                        
                        pa->size= 1.0f;

Modified: trunk/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/drawobject.c      
2009-10-13 16:08:34 UTC (rev 23812)
+++ trunk/blender/source/blender/editors/space_view3d/drawobject.c      
2009-10-13 17:15:12 UTC (rev 23813)
@@ -4237,7 +4237,7 @@
                                if(!(point->flag & PEP_HIDE))
                                        totkeys += point->totkey;
 
-                       if(!(edit->points->keys->flag & PEK_USE_WCO))
+                       if(edit->points && !(edit->points->keys->flag & 
PEK_USE_WCO))
                                pd=pdata=MEM_callocN(totkeys*3*sizeof(float), 
"particle edit point data");
                        cd=cdata=MEM_callocN(totkeys*(timed?4:3)*sizeof(float), 
"particle edit color data");
 


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to