blender/release/scripts/startup/bl_operators
Julian Eisel 222fd1abf0 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
2021-09-23 14:46:13 +02:00
..
bmesh Cleanup: pep8 2018-07-03 06:48:44 +02:00
__init__.py Spreadsheet: new spreadsheet editor 2021-03-10 11:35:42 +01:00
add_mesh_torus.py PyAPI: use postponed annotations to support Python 3.10 2021-02-21 22:37:53 +11:00
anim.py UI: Use unified format for "Warning" in descriptions 2021-03-26 12:07:50 -04:00
assets.py Asset Browser: Disable metadata editing for external asset libraries 2021-09-23 14:46:13 +02:00
clip.py WM: check missing space-data & constraints in poll functions 2021-05-18 20:57:40 +10:00
console.py Fix T86293: crash undoing after executing the python console in certain 2021-03-05 12:50:55 +01:00
constraint.py WM: check missing space-data & constraints in poll functions 2021-05-18 20:57:40 +10:00
file.py Cleanup: import operator class directly for Python operators 2021-03-23 16:08:02 +11:00
freestyle.py Cleanup: import operator class directly for Python operators 2021-03-23 16:08:02 +11:00
geometry_nodes.py Geometry Nodes: Support modifier on curve objects 2021-09-11 13:54:40 -05:00
image.py Cleanup: view-port --> 2D/3D Viewport 2020-12-02 18:16:23 -05:00
mesh.py PyAPI: use keyword only arguments 2021-06-09 03:05:44 +10:00
node.py Geometry Nodes: new Viewer node 2021-07-05 10:46:36 +02:00
object_align.py Cleanup: unused imports 2021-03-06 19:26:18 +11:00
object_quick_effects.py Fix T86746: Description missing from Quick Liquid 2021-03-20 13:44:36 +01:00
object_randomize_transform.py UI: avoid using "loc/rot", use full words instead. 2020-11-04 14:27:18 +01:00
object.py Refactor IDProperty UI data storage 2021-08-27 08:27:24 -05:00
presets.py PyAPI: use keyword only arguments 2021-06-09 03:05:44 +10:00
rigidbody.py Speedup rigid body "Copy from Active" operator 2021-07-20 18:57:12 +02:00
screen_play_rendered_anim.py PlayAnim: support limiting the cache by memory instead of frames 2021-05-06 11:31:44 +10:00
sequencer.py Cleanup: sequencer operators 2021-08-31 07:39:03 +10:00
spreadsheet.py Cleanup: pep8 2021-07-06 12:05:27 +10:00
userpref.py Keymap: set the default filepath exporting keymaps 2021-09-22 17:47:52 +10:00
uvcalc_follow_active.py PyAPI: use keyword only arguments 2021-06-09 03:05:44 +10:00
uvcalc_lightmap.py UI: Match tooltip with interface name 2021-05-29 11:22:58 -04:00
vertexpaint_dirt.py Cleanup: pep8 (indentation, spacing, long lines) 2020-10-02 11:59:16 +10:00
view3d.py WM: check missing space-data & constraints in poll functions 2021-05-18 20:57:40 +10:00
wm.py Custom Properties: Rewrite edit operator, improve UX 2021-09-22 21:57:33 -05:00