Page MenuHome

Save ID-Properties for WorkSpaces
Closed, ResolvedPublicDESIGN

Description

System Information
Operating system: windows 10
Graphics card: nvidia geforce

Blender Version
Broken: v 2.81a

Short description of error

The python API docs claim that custom properties will be saved with the blend file, but this does not appear to be the case for custom properties defined on workspace objects.

https://docs.blender.org/api/blender_python_api_current/info_quickstart.html#custom-properties

Exact steps for others to reproduce the error

from default startup (new general file),
open the active tool and workspace settings panel (screwdriver and wrench icon)
open the workspaces sub-panel
add any custom property
save the file
close and re-open it.
(the custom property won't be there)

Related Objects

Event Timeline

@Kai Jægersen (kaio) mentioned on https://devtalk.blender.org/t/scene-per-tab-event-handler-for-tab-switching/11517/6 that workspace and window settings are runtime-only... If that's the case, then I suppose this is a documentation bug... But if that's the case, why even expose a UI for workspace custom properties?

I'm not sure how workspaces are implemented exactly. @Julian Eisel (Severin) might know more about workspaces are stored.

Campbell Barton (campbellbarton) renamed this task from workspace custom properties are not saved to Save ID-Properties for WorkSpaces.Tue, Jan 28, 10:55 AM
Campbell Barton (campbellbarton) triaged this task as Low priority.
Campbell Barton (campbellbarton) changed the subtype of this task from "Report" to "Design".

As far as I can see this can be supported, as with other windowing data, undo doesn't track this so STRUCT_NO_DATABLOCK_IDPROPERTIES would need to be set.

As long as there aren't any complications think this is OK to add.
Pinging @Bastien Montagne (mont29) for a second opinion.

Am not sure why STRUCT_NO_DATABLOCK_IDPROPERTIES should be used? AFAIK this is used to actually forbid custom props on a structure that does have idprops storage? Screen ID does not have that at least…

In fact am not sure why customprops on WS are not saved, afaict only WM are explicitly excluded from that in write_iddata(). Screens and WorkSpaces should be written as any other ID (although indeed there would be no undo supported for those two).