Revision: 43525
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43525
Author:   miikah
Date:     2012-01-19 11:13:41 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
Dynamic Paint:
* Added "Project" option also for "Volume + Proximity" brush type.

Modified Paths:
--------------
    
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
    trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c

Modified: 
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
===================================================================
--- 
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py  
    2012-01-19 10:04:51 UTC (rev 43524)
+++ 
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py  
    2012-01-19 11:13:41 UTC (rev 43525)
@@ -412,14 +412,14 @@
             col.prop(brush, "paint_distance", text="Paint Distance")
             split = layout.row().split(percentage=0.4)
             sub = split.column()
-            if brush.paint_source == 'DISTANCE':
+            if brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE'}:
                 sub.prop(brush, "use_proximity_project")
-            elif brush.paint_source == 'VOLUME_DISTANCE':
+            if brush.paint_source == 'VOLUME_DISTANCE':
                 sub.prop(brush, "invert_proximity")
                 sub.prop(brush, "use_negative_volume")
 
             sub = split.column()
-            if brush.paint_source == 'DISTANCE':
+            if brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE'}:
                 column = sub.column()
                 column.active = brush.use_proximity_project
                 column.prop(brush, "ray_direction")

Modified: trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c       
2012-01-19 10:04:51 UTC (rev 43524)
+++ trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c       
2012-01-19 11:13:41 UTC (rev 43525)
@@ -3172,7 +3172,7 @@
                        boundInsert(&mesh_bb, mvert[ii].co);
 
                        /* for project brush calculate average normal */
-                       if (brush->collision & MOD_DPAINT_COL_DIST && 
brush->flags & MOD_DPAINT_PROX_PROJECT) {
+                       if (brush->flags & MOD_DPAINT_PROX_PROJECT) {
                                float nor[3];
                                normal_short_to_float_v3(nor, mvert[ii].no);
                                mul_mat3_m4_v3(brushOb->obmat, nor);
@@ -3182,7 +3182,7 @@
                        }
                }
 
-               if (brush->collision & MOD_DPAINT_COL_DIST && brush->flags & 
MOD_DPAINT_PROX_PROJECT) {
+               if (brush->flags & MOD_DPAINT_PROX_PROJECT) {
                        mul_v3_fl(avg_brushNor, 1.0f/(float)numOfVerts);
                        /* instead of null vector use positive z */
                        if 
(!(MIN3(avg_brushNor[0],avg_brushNor[1],avg_brushNor[2])))
@@ -3323,7 +3323,7 @@
                                                        if (inner_proximity && 
!hit_found) continue;
 
                                                        /* If pure distance 
proximity, find the nearest point on the mesh */
-                                                       if (brush->collision != 
MOD_DPAINT_COL_DIST || !(brush->flags & MOD_DPAINT_PROX_PROJECT)) {
+                                                       if (!(brush->flags & 
MOD_DPAINT_PROX_PROJECT)) {
                                                                if 
(BLI_bvhtree_find_nearest(treeData.tree, ray_start, &nearest, 
mesh_faces_nearest_point_dp, &treeData) != -1) {
                                                                        
proxDist = sqrtf(nearest.dist);
                                                                        
copy_v3_v3(hitCo, nearest.co);

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

Reply via email to