[Bf-blender-cvs] [e59ebfef3c5] temp-sculpt-brush-channel: Merge branch 'master' into temp-sculpt-brush-channel
Joseph Eagar
noreply at git.blender.org
Tue Nov 8 20:42:40 CET 2022
Commit: e59ebfef3c583985553e78492cf8cd07bbe7648e
Author: Joseph Eagar
Date: Tue Nov 8 09:13:59 2022 -0800
Branches: temp-sculpt-brush-channel
https://developer.blender.org/rBe59ebfef3c583985553e78492cf8cd07bbe7648e
Merge branch 'master' into temp-sculpt-brush-channel
===================================================================
===================================================================
diff --cc source/blender/editors/sculpt_paint/paint_cursor.c
index de696e889b5,b6e83187c86..c479df43b0e
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@@ -563,17 -562,22 +563,22 @@@ static bool paint_draw_tex_overlay(Scen
if (mtex->brush_map_mode == MTEX_MAP_MODE_VIEW) {
GPU_matrix_push();
+ float center[2] = {
+ ups->draw_anchored ? ups->anchored_initial_mouse[0] : x,
+ ups->draw_anchored ? ups->anchored_initial_mouse[1] : y,
+ };
+
/* Brush rotation. */
- GPU_matrix_translate_2f(x, y);
+ GPU_matrix_translate_2fv(center);
GPU_matrix_rotate_2d(-RAD2DEGF(primary ? ups->brush_rotation : ups->brush_rotation_sec));
- GPU_matrix_translate_2f(-x, -y);
+ GPU_matrix_translate_2f(-center[0], -center[1]);
/* Scale based on tablet pressure. */
- if (primary && ups->stroke_active && BKE_brush_use_size_pressure(brush)) {
+ if (primary && ups->stroke_active && BKE_brush_use_size_pressure(scene, brush)) {
const float scale = ups->size_pressure_value;
- GPU_matrix_translate_2f(x, y);
+ GPU_matrix_translate_2fv(center);
GPU_matrix_scale_2f(scale, scale);
- GPU_matrix_translate_2f(-x, -y);
+ GPU_matrix_translate_2f(-center[0], -center[1]);
}
if (ups->draw_anchored) {
diff --cc source/blender/editors/sculpt_paint/sculpt.c
index 17f564c3051,3477285814e..483ae385765
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@@ -5556,10 -5509,11 +5557,11 @@@ static void sculpt_stroke_update_step(b
SCULPT_stroke_modifiers_check(C, ob, brush);
sculpt_update_cache_variants(C, sd, ob, itemptr);
- sculpt_restore_mesh(sd, ob);
+ sculpt_restore_mesh(CTX_data_scene(C), sd, ob);
if (sd->flags & (SCULPT_DYNTOPO_DETAIL_CONSTANT | SCULPT_DYNTOPO_DETAIL_MANUAL)) {
- float object_space_constant_detail = 1.0f / (sd->constant_detail * mat4_to_scale(ob->obmat));
+ float object_space_constant_detail = 1.0f / (sd->constant_detail *
+ mat4_to_scale(ob->object_to_world));
BKE_pbvh_bmesh_detail_size_set(ss->pbvh, object_space_constant_detail);
}
else if (sd->flags & SCULPT_DYNTOPO_DETAIL_BRUSH) {
More information about the Bf-blender-cvs
mailing list