[Bf-blender-cvs] [179008f57a2] blender-v3.4-release: Fix T102685: Grease Pencil brush cursors missing on file open
Philipp Oeser
noreply at git.blender.org
Sun Nov 27 12:39:46 CET 2022
Commit: 179008f57a25b0c90adba5efcccb9b8c06170876
Author: Philipp Oeser
Date: Thu Nov 24 14:04:16 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB179008f57a25b0c90adba5efcccb9b8c06170876
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 7c9402ace4a..a86098aa1d4 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"
@@ -111,6 +112,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