Revision: 16861
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16861
Author:   broken
Date:     2008-10-01 09:30:56 +0200 (Wed, 01 Oct 2008)

Log Message:
-----------
Added 'Object Location' option to 'object vertices' mode in Point 
Density. This brings it consistent with the 'particle system' 
mode, and allows silly things like this a bit easier (especially 
after the last fix and BVH improvements!):

http://mke3.net/blender/devel/rendering/volumetrics/pd_objectloc.mov

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

Modified: 
branches/sim_physics/source/blender/render/intern/source/pointdensity.c
===================================================================
--- branches/sim_physics/source/blender/render/intern/source/pointdensity.c     
2008-10-01 07:13:28 UTC (rev 16860)
+++ branches/sim_physics/source/blender/render/intern/source/pointdensity.c     
2008-10-01 07:30:56 UTC (rev 16861)
@@ -120,13 +120,15 @@
                VertRen *ver= RE_findOrAddVert(obr, i);
                
                VECCOPY(ver_co, ver->co);
+               Mat4MulVecfl(re->viewinv, ver_co);
                
                if (pd->ob_cache_space == TEX_PD_OBJECTSPACE) {
-                       Mat4MulVecfl(re->viewinv, ver_co);
                        Mat4MulVecfl(obr->ob->imat, ver_co);
+               } else if (pd->psys_cache_space == TEX_PD_OBJECTLOC) {
+                       VecSubf(ver_co, ver_co, obr->ob->loc);
                } else {
                        /* TEX_PD_WORLDSPACE */
-                       Mat4MulVecfl(re->viewinv, ver_co);
+
                }
                
                BLI_bvhtree_insert(pd->point_tree, i, ver_co, 1);

Modified: branches/sim_physics/source/blender/src/buttons_shading.c
===================================================================
--- branches/sim_physics/source/blender/src/buttons_shading.c   2008-10-01 
07:13:28 UTC (rev 16860)
+++ branches/sim_physics/source/blender/src/buttons_shading.c   2008-10-01 
07:30:56 UTC (rev 16861)
@@ -797,7 +797,7 @@
                        
                        uiDefBut(block, LABEL, B_NOP, "Cache vertices in:",
                                X2CLM2, yco-=BUTH, BUTW2, BUTH, 0, 0, 0, 0, 0, 
"");
-                       uiDefButS(block, MENU, B_TEXREDR_PRV, "Object Space 
%x1|Global Space %x2",
+                       uiDefButS(block, MENU, B_TEXREDR_PRV, "Object Location 
%x0|Object Space %x1|Global Space %x2",
                                X2CLM2, yco-=BUTH, BUTW2, BUTH, 
&pd->ob_cache_space, 0.0, 0.0, 0, 0, "Co-ordinate system to cache vertices in");
                }
        }


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

Reply via email to