Revision: 32762
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32762
Author:   jhk
Date:     2010-10-29 14:49:36 +0200 (Fri, 29 Oct 2010)

Log Message:
-----------
Fix for[#24422] Crash when switching to Point Select Mode - particle hair

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

Modified: trunk/blender/source/blender/editors/physics/particle_edit.c
===================================================================
--- trunk/blender/source/blender/editors/physics/particle_edit.c        
2010-10-29 10:31:45 UTC (rev 32761)
+++ trunk/blender/source/blender/editors/physics/particle_edit.c        
2010-10-29 12:49:36 UTC (rev 32762)
@@ -774,6 +774,7 @@
                if(mpoint->keys) MEM_freeN(mpoint->keys);
 
                mpa->hair= MEM_dupallocN(pa->hair);
+               mpa->totkey= pa->totkey;
                mpoint->keys= MEM_dupallocN(point->keys);
                mpoint->totkey= point->totkey;
 
@@ -782,7 +783,7 @@
                for(k=0; k<mpa->totkey; k++, mkey++, mhkey++) {
                        mkey->co= mhkey->co;
                        mkey->time= &mhkey->time;
-                       mkey->flag &= PEK_SELECT;
+                       mkey->flag &= ~PEK_SELECT;
                }
        }
 
@@ -4008,12 +4009,16 @@
                                        key->co= hkey->co;
                                        key->time= &hkey->time;
                                        key->flag= hkey->editflag;
-                                       if(!(psys->flag & PSYS_GLOBAL_HAIR))
+                                       if(!(psys->flag & PSYS_GLOBAL_HAIR)) {
                                                key->flag |= PEK_USE_WCO;
+                                               hkey->editflag |= PEK_USE_WCO;
+                                       }
+
                                        hkey++;
                                }
                                pa++;
                        }
+                       update_world_cos(ob, edit);
                }
                else {
                        PTCacheMem *pm;


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

Reply via email to