Revision: 17165
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17165
Author:   broken
Date:     2008-10-22 07:24:41 +0200 (Wed, 22 Oct 2008)

Log Message:
-----------
* fix for point density - particle systems weren't being
 deformed by lattices

Modified Paths:
--------------
    branches/sim_physics/source/blender/render/intern/source/pointdensity.c

Modified: 
branches/sim_physics/source/blender/render/intern/source/pointdensity.c
===================================================================
--- branches/sim_physics/source/blender/render/intern/source/pointdensity.c     
2008-10-22 04:42:00 UTC (rev 17164)
+++ branches/sim_physics/source/blender/render/intern/source/pointdensity.c     
2008-10-22 05:24:41 UTC (rev 17165)
@@ -65,9 +65,8 @@
        psys_render_set(ob, psys, re->viewmat, re->winmat, re->winx, re->winy, 
0);
        
        dm = 
mesh_create_derived_render(ob,CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
-       dm->release(dm);
        
-       if ( !psys_check_enabled(ob, psys) ){
+       if ( !psys_check_enabled(ob, psys)) {
                psys_render_restore(ob, psys);
                return;
        }
@@ -76,8 +75,10 @@
        Mat4Invert(ob->imat, ob->obmat);
        
        total_particles = psys->totpart+psys->totchild;
+       psys->lattice=psys_get_lattice(ob,psys);
        
        pd->point_tree = BLI_bvhtree_new(total_particles, 0.0, 4, 6);
+       
        if (pd->noise_influence != TEX_PD_NOISE_STATIC)
                pd->point_data = MEM_mallocN(sizeof(float)*3*total_particles, 
"point_data");
        
@@ -112,7 +113,13 @@
        }
        
        BLI_bvhtree_balance(pd->point_tree);
+       dm->release(dm);
        
+       if(psys->lattice){
+               end_latt_deform();
+               psys->lattice=0;
+       }
+       
        psys_render_restore(ob, psys);
 }
 


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

Reply via email to