diff options
author | Julian Eisel <julian@blender.org> | 2021-09-23 15:43:21 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-09-23 15:46:13 +0300 |
commit | 222fd1abf09ae65b7082f58bf2ac43422c77162c (patch) | |
tree | aeb1c3723f8e3d80723e28660d35889c3dfdeaa9 /source/blender/blenkernel/intern/asset_catalog.cc | |
parent | 059d01d42e049a5d4a42f81c8b860540127efeb6 (diff) |
Asset Browser: Disable metadata editing for external asset libraries
Buttons to edit asset metadata are now disabled for assets from an
external library (i.e. assets not stored in the current .blend file).
Their tooltips explain why they are disabled.
Had to do some RNA trickery to disable the metadata properties at RNA
level, not at UI script level.
The basic idea is:
* Local data-block assets set the data-block as owning ID for the asset
metadata RNA pointer now.
* That way we can use the owner ID to see where the metadata belongs to
and decide if it's editable that way.
* Additionaly, some Python operators needed better polling so they show
as grayed out, and don't just fail.
One important thing: Custom properties of the metadata can still be
edited. The edits won't be saved however. Would be nice to disable that,
but it's currently not supported on BPY/IDProperty/RNA level.
Addresses T82943.
Differential Revision: https://developer.blender.org/D12127
Diffstat (limited to 'source/blender/blenkernel/intern/asset_catalog.cc')
0 files changed, 0 insertions, 0 deletions