[Bf-blender-cvs] [c935a06edbf] blender-v3.4-release: Cleanup: correct comments in ED_editors_init

Philipp Oeser noreply at git.blender.org
Sun Nov 27 12:39:46 CET 2022


Commit: c935a06edbf27a574cebd70414b864a8d99a9883
Author: Philipp Oeser
Date:   Thu Nov 24 13:17:02 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rBc935a06edbf27a574cebd70414b864a8d99a9883

Cleanup: correct comments in ED_editors_init

These comments were from rBcc7460eaa491 / rBde994d6b7b1c /
rB7037ff920447 but ended up in a confusing state.
Moved into the right places and reworded appropriately.

Spotted while looking into T102685.

Maniphest Tasks: T102685

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

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

M	source/blender/editors/util/ed_util.c

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

diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 92d65688bf1..7c9402ace4a 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -97,11 +97,12 @@ void ED_editors_init(bContext *C)
       continue;
     }
     if (BKE_object_has_mode_data(ob, mode)) {
+      /* For multi-edit mode we may already have mode data. */
       continue;
     }
     if (ob->type == OB_GPENCIL) {
-      /* For multi-edit mode we may already have mode data (grease pencil does not need it).
-       * However we may have a non-active object stuck in a grease-pencil edit mode. */
+      /* Grease pencil does not need a toggle of mode. However we may have a non-active object
+       * stuck in a grease-pencil edit mode. */
       if (ob != obact) {
         bGPdata *gpd = (bGPdata *)ob->data;
         gpd->flag &= ~(GP_DATA_STROKE_PAINTMODE | GP_DATA_STROKE_EDITMODE |



More information about the Bf-blender-cvs mailing list