[Bf-blender-cvs] [89303959127] master: Fix T101765: Curves sculptmode: object origin and 3D cursor are visible
Philipp Oeser
noreply at git.blender.org
Wed Dec 14 08:27:45 CET 2022
Commit: 893039591270ad6989a5450286f82b6604ce69f6
Author: Philipp Oeser
Date: Tue Dec 13 15:40:18 2022 +0100
Branches: master
https://developer.blender.org/rB893039591270ad6989a5450286f82b6604ce69f6
Fix T101765: Curves sculptmode: object origin and 3D cursor are visible
This is because OB_MODE_SCULPT_CURVES is not part of OB_MODE_ALL_PAINT
(yet). While there is some chance it ends up there, there are a lot of
more places that need checking and so patch only fixes the report very
isolated.
NOTE: T93501 is related (since the option to show these should also be
hidden in sculptmode)
Maniphest Tasks: T101765
Differential Revision: https://developer.blender.org/D16764
===================================================================
M source/blender/draw/engines/overlay/overlay_extra.cc
M source/blender/draw/intern/draw_view.c
===================================================================
diff --git a/source/blender/draw/engines/overlay/overlay_extra.cc b/source/blender/draw/engines/overlay/overlay_extra.cc
index 48dfb027545..3363a94a38f 100644
--- a/source/blender/draw/engines/overlay/overlay_extra.cc
+++ b/source/blender/draw/engines/overlay/overlay_extra.cc
@@ -1552,7 +1552,8 @@ void OVERLAY_extra_cache_populate(OVERLAY_Data *vedata, Object *ob)
const bool is_select_mode = DRW_state_is_select();
const bool is_paint_mode = (draw_ctx->object_mode &
- (OB_MODE_ALL_PAINT | OB_MODE_ALL_PAINT_GPENCIL)) != 0;
+ (OB_MODE_ALL_PAINT | OB_MODE_ALL_PAINT_GPENCIL |
+ OB_MODE_SCULPT_CURVES)) != 0;
const bool from_dupli = (ob->base_flag & (BASE_FROM_SET | BASE_FROM_DUPLI)) != 0;
const bool has_bounds = !ELEM(ob->type, OB_LAMP, OB_CAMERA, OB_EMPTY, OB_SPEAKER, OB_LIGHTPROBE);
const bool has_texspace = has_bounds &&
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 35ff8891a0f..269942edaf8 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -59,7 +59,7 @@ static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, Vie
}
/* don't draw cursor in paint modes, but with a few exceptions */
- if (draw_ctx->object_mode & OB_MODE_ALL_PAINT) {
+ if ((draw_ctx->object_mode & (OB_MODE_ALL_PAINT | OB_MODE_SCULPT_CURVES)) != 0) {
/* exception: object is in weight paint and has deforming armature in pose mode */
if (draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) {
if (BKE_object_pose_armature_get(draw_ctx->obact) != NULL) {
More information about the Bf-blender-cvs
mailing list