Page MenuHome

Fix T89514: GP draw mode not saved when scene is not the active one
ClosedPublic

Authored by Falk David (filedescriptor) on Sep 7 2021, 7:05 PM.

Details

Summary

This patch fixes the error that pops up
(Error: Unable to execute '... Mode Toggle', error changing modes)
when trying to switch to e.g. draw mode from a grease pencil object
that was saved in draw mode in an inactive scene when the file was loaded.

Note that this does not fix the bigger issue described in T91243.

The fix makes sure that we reset all the mode flags on the grease pencil
data when we set the mode to object mode.

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 16857
Build 16857: arc lint + arc unit

Event Timeline

Falk David (filedescriptor) requested review of this revision.Sep 7 2021, 7:05 PM
Falk David (filedescriptor) created this revision.

I think the fix is correct because the mode flag is in the datablock too (some places is impossible get the mode from object, so we keep a backup of the data). Your fix disable all modes and keep the datablock as Object mode.

This revision is now accepted and ready to land.Sep 7 2021, 8:17 PM

@Falk David (filedescriptor) you have this patch ready since September, is it still valid?

Yes, this should have been committed. Sorry.