Had to do some RNA trickery to disable the metadata properties at RNA level, not at UI script level.
No need for an in-depth review, just want the general idea to be checked.
Basically:
- Local data-block assets set the data-block as owning ID for the asset metadata RNA pointer now (PointerRNA.owner_id).
- That way we can use the owner ID to see where the metadata belongs to and decide if it's editable that way.
- Additionally, some Python operators needed better polling so they show as grayed out, and don't just fail.
- Added "disabled hints" to explain why buttons are disabled.
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.