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:
authorPablo Dobarro <pablodp606@gmail.com>2020-01-15 05:50:01 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-01-24 20:11:37 +0300
commitbe691105c2adcd2bdc64aa7646cfe3fab8cb6fb7 (patch)
tree0dc0af1ba8f9d26d2ab53763726d69001f684d57 /source/blender/editors/sculpt_paint/paint_vertex.c
parent1c98539b57a463ee3a284ffbfdde05837a1c417e (diff)
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
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_vertex.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index cafdd72c7cd..7372ea6d44a 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -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) &&