[Bf-blender-cvs] [e981a187e5a] blender-v3.3-release: Fix T102685: Grease Pencil brush cursors missing on file open
Philipp Oeser
noreply at git.blender.org
Thu Jan 12 14:07:18 CET 2023
Commit: e981a187e5a6027c51482068da7277fcf6430020
Author: Philipp Oeser
Date: Thu Nov 24 14:04:16 2022 +0100
Branches: blender-v3.3-release
https://developer.blender.org/rBe981a187e5a6027c51482068da7277fcf6430020
Fix T102685: Grease Pencil brush cursors missing on file open
Brush cursors were missing when opening a file saved in sculpt/vertex-/
weightpaint mode.
Since we dont do a full modeswitch on file load in `ED_editors_init` for
grease pencil since rBde994d6b7b1c, we were missing the brush cursor
toggling [`ED_gpencil_toggle_brush_cursor`] normally done in
`ED_gpencil_setup_modes`.
This is now explicitly added for any greasepencil paintmode (in case
object is active).
Maniphest Tasks: T102685
Differential Revision: https://developer.blender.org/D16603
===================================================================
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 3cfe6bd61a4..9a31b7a965b 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -37,6 +37,7 @@
#include "ED_armature.h"
#include "ED_asset.h"
+#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_object.h"
@@ -113,6 +114,9 @@ void ED_editors_init(bContext *C)
ob->mode = OB_MODE_OBJECT;
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
}
+ else if (mode & OB_MODE_ALL_PAINT_GPENCIL) {
+ ED_gpencil_toggle_brush_cursor(C, true, NULL);
+ }
continue;
}
More information about the Bf-blender-cvs
mailing list