Revision: 26604
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26604
Author:   campbellbarton
Date:     2010-02-04 17:54:25 +0100 (Thu, 04 Feb 2010)

Log Message:
-----------
reading in hair with dynamics wasnt working but mostly crashed when duplicating 
the object.
from reading all places dynamic hair is used I think these changes are correct 
(cloth seems to share pointcache with the psys) but its not obvious.

jahka: please check this is ok.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/object.c
    trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c     2010-02-04 
16:53:39 UTC (rev 26603)
+++ trunk/blender/source/blender/blenkernel/intern/object.c     2010-02-04 
16:54:25 UTC (rev 26604)
@@ -1164,6 +1164,12 @@
        
        psysn->pointcache= BKE_ptcache_copy_list(&psysn->ptcaches, 
&psys->ptcaches);
 
+       /* XXX - from reading existing code this seems correct but intended 
usage of
+        * pointcache should /w cloth should be added in 'ParticleSystem' - 
campbell */
+       if(psysn->clmd) {
+               psysn->clmd->point_cache= psysn->pointcache;
+       }
+
        id_us_plus((ID *)psysn->part);
 
        return psysn;

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2010-02-04 
16:53:39 UTC (rev 26603)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2010-02-04 
16:54:25 UTC (rev 26604)
@@ -3187,6 +3187,13 @@
                                pt->ob=newlibadr(fd, id->lib, pt->ob);
 
                        psys->target_ob = newlibadr(fd, id->lib, 
psys->target_ob);
+
+                       if(psys->clmd) {
+                               /* XXX - from reading existing code this seems 
correct but intended usage of
+                                * pointcache should /w cloth should be added 
in 'ParticleSystem' - campbell */
+                               psys->clmd->point_cache= psys->pointcache;
+                               psys->clmd->ptcaches.first= 
psys->clmd->ptcaches.last= NULL;
+                       }
                }
                else {
                        /* particle modifier must be removed before particle 
system */


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

Reply via email to