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
This commit is contained in:
parent
c935a06edb
commit
179008f57a
Notes:
blender-bot
2023-02-14 08:33:26 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93 Referenced by issue #88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #100749, Blender LTS: Maintenance Task 3.3 Referenced by issue #102685, Grease Pencil: Brush cursors not shown if the file is opened with sculpt/vertex-/weightpaint mode
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue