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
This commit is contained in:
parent
b0810f788c
commit
c935a06edb
Notes:
blender-bot
2023-12-08 16:39:08 +01:00
Referenced by issue #102685, Grease Pencil: Brush cursors not shown if the file is opened with sculpt/vertex-/weightpaint mode
|
@ -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 |
|
||||
|
|
Loading…
Reference in New Issue