Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py6
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index bf8d7d8552f..e6801f00fce 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -412,14 +412,14 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
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")
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 50f42328043..fc0fe37d106 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3172,7 +3172,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
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 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
}
}
- 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 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
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);