[Bf-blender-cvs] [ed852c8401c] blender-v3.4-release: Fix: Curves sculptmode: deduplicate checks for being in mode

Philipp Oeser noreply at git.blender.org
Sat Nov 12 16:51:17 CET 2022


Commit: ed852c8401c98a10a8ab4ad842a0dfc1a4ae799b
Author: Philipp Oeser
Date:   Fri Nov 11 15:07:43 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rBed852c8401c98a10a8ab4ad842a0dfc1a4ae799b

Fix: Curves sculptmode: deduplicate checks for being in mode

rBa8f7d41d3898 added a "duplicate" check for being in curves sculptmode
unnecessarily afaict (`in_sculpt_curve_mode` in addition to the
previously existing `in_curves_sculpt_mode`).
Over time, the later evolved to also take into account the output of a
viewer node, see rBc55d38f00b8c (the previously existing
`in_curves_sculpt_mode` did not receive this).

This all results in the fact that selection is not drawn with a viewer
node (can be useful though, and there are separate opacity controls for
both selection and the viewer attribute, so these can be used/blended to
everyones liking).

So now deduplicate the check.

Differential Revision: https://developer.blender.org/D16467

===================================================================

M	source/blender/draw/engines/overlay/overlay_engine.cc

===================================================================

diff --git a/source/blender/draw/engines/overlay/overlay_engine.cc b/source/blender/draw/engines/overlay/overlay_engine.cc
index f1fdfe98fdc..c41cfc790fa 100644
--- a/source/blender/draw/engines/overlay/overlay_engine.cc
+++ b/source/blender/draw/engines/overlay/overlay_engine.cc
@@ -324,8 +324,6 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob)
                                     (draw_ctx->object_mode & OB_MODE_SCULPT_CURVES);
   const bool in_sculpt_mode = (ob == draw_ctx->obact) && (ob->sculpt != nullptr) &&
                               (ob->sculpt->mode_type == OB_MODE_SCULPT);
-  const bool in_curves_sculpt_mode = (ob == draw_ctx->obact) &&
-                                     (ob->mode == OB_MODE_SCULPT_CURVES);
   const bool has_surface = ELEM(ob->type,
                                 OB_MESH,
                                 OB_CURVES_LEGACY,
@@ -449,7 +447,7 @@ static void OVERLAY_cache_populate(void *vedata, Object *ob)
   if (in_sculpt_mode) {
     OVERLAY_sculpt_cache_populate(data, ob);
   }
-  else if (in_curves_sculpt_mode) {
+  else if (in_sculpt_curve_mode) {
     OVERLAY_sculpt_curves_cache_populate(data, ob);
   }



More information about the Bf-blender-cvs mailing list