Fix T73080: Remove support for scene radius in Weight/Vertex paint

The 2D paint cursor in the 3D view does not support scene radius in
weight and vertex paint mode. This was also the case in 2.80 with the
old cursor. The option to change the units from view to scene is not
available in the UI in those modes, so I think it makes sense to remove
the support from the code.

The ideal solution could be supporting the new cursor in all paint
modes, but that is going to take more time and it is going to be
problematic in texture paint. After doing this, we can bring this code
back and add the option to change the units to the UI.

Reviewed By: jbakker

Maniphest Tasks: T73080

Differential Revision: https://developer.blender.org/D6586
This commit is contained in:
Pablo Dobarro 2020-01-15 03:50:01 +01:00
parent 1c98539b57
commit be691105c2
Notes: blender-bot 2023-02-14 08:08:56 +01:00
Referenced by issue #73280, Weight paint expands far from brush radius to another vertexes (regression)
Referenced by issue #73080, Weight paint brush is affected by radius unit option from sculpt mode
1 changed files with 3 additions and 8 deletions

View File

@ -1512,14 +1512,9 @@ static void vwpaint_update_cache_variants(bContext *C, VPaint *vp, Object *ob, P
/* Truly temporary data that isn't stored in properties */
if (cache->first_time) {
if (!BKE_brush_use_locked_size(scene, brush)) {
cache->initial_radius = paint_calc_object_space_radius(
cache->vc, cache->true_location, BKE_brush_size_get(scene, brush));
BKE_brush_unprojected_radius_set(scene, brush, cache->initial_radius);
}
else {
cache->initial_radius = BKE_brush_unprojected_radius_get(scene, brush);
}
cache->initial_radius = paint_calc_object_space_radius(
cache->vc, cache->true_location, BKE_brush_size_get(scene, brush));
BKE_brush_unprojected_radius_set(scene, brush, cache->initial_radius);
}
if (BKE_brush_use_size_pressure(brush) &&