Revision: 37188
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37188
Author:   jwilkins
Date:     2011-06-04 17:48:22 +0000 (Sat, 04 Jun 2011)
Log Message:
-----------
Revision: 29878
Author: nicholasbishop
Date: 1:18:11 PM, Friday, July 02, 2010
Message:
Make mask opacity actually do something; I had forgotten to update the PBVH 
iterator to take mask opacity into account.

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h

Property Changed:
----------------
    branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29796,29832,29860,29862
/trunk/blender:36833-37054
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29796,29832,29860,29862,29878
/trunk/blender:36833-37054

Modified: branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h
===================================================================
--- branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h   2011-06-04 
17:47:14 UTC (rev 37187)
+++ branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h   2011-06-04 
17:48:22 UTC (rev 37188)
@@ -272,8 +272,10 @@
                                        if(vi.gridkey->mask) { \
                                                int j; \
                                                vi.mask_combined= 0; \
-                                               for(j=0; j<vi.gridkey->mask; 
++j) \
-                                                       vi.mask_combined+= 
GRIDELEM_MASK(vi.grid, vi.gridkey)[j]; \
+                                               for(j=0; j<vi.gridkey->mask; 
++j) { \
+                                                       CustomDataLayer *cdl= 
vi.vdata->layers + vi.pmask_first_layer + j; \
+                                                       vi.mask_combined+= 
GRIDELEM_MASK(vi.grid, vi.gridkey)[j] * cdl->strength; \
+                                               } \
                                                CLAMP(vi.mask_combined, 0, 1); \
                                                if(vi.pmask_active_layer != -1) 
\
                                                        vi.mask_active= 
&GRIDELEM_MASK(vi.grid, \
@@ -290,9 +292,11 @@
                                        if(vi.pmask_layer_count) { \
                                                int j; \
                                                vi.mask_combined= 0; \
-                                               for(j=0; 
j<vi.pmask_layer_count; ++j) \
+                                               for(j=0; 
j<vi.pmask_layer_count; ++j) { \
+                                                       CustomDataLayer *cdl= 
vi.vdata->layers + vi.pmask_first_layer + j; \
                                                        vi.mask_combined+= \
-                                                               
((float*)vi.vdata->layers[vi.pmask_first_layer + 
j].data)[vi.vert_indices[vi.gx]]; \
+                                                               
((float*)cdl->data)[vi.vert_indices[vi.gx]] * cdl->strength; \
+                                               } \
                                                CLAMP(vi.mask_combined, 0, 1); \
                                                if(vi.pmask_active_layer != -1) 
\
                                                        vi.mask_active = 
&((float*)vi.vdata->layers[vi.pmask_active_layer].data)[vi.vert_indices[vi.gx]];
 \

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

Reply via email to