diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2021-01-13 12:36:02 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2021-01-13 14:09:31 +0300 |
commit | 8964c02348f61c2ce8046c09478180ddfbd0f8e5 (patch) | |
tree | 9045cf9a32903d4cc2fb13d90fd449f0a99a3f71 /source/blender/windowmanager | |
parent | 8185d07ace493a74fb1b99636f4bb80174b81418 (diff) |
RNA: allow editing pointer IDProperty values from the UI.
Currently it is not possible to edit bare IDProperty pointer
values which are not explicitly defined through python via
UI fields. This is likely mostly because, unlike numeric values,
pointers aren't marked PROP_EDITABLE by default. However there
are also some bugs in the RNA code that need fixing.
The Geometry Nodes modifier uses bare properties to store
input settings for the node group it wraps, so supporting
Object and Collection sockets requires editable pointers.
This patch marks bare IDProperties editable, and ensures
that changing ID pointers rebuilds the dependency graph.
A type check is needed because an IDPROPERTY PointerPropertyRNA
can actually wrap a group value rather than an ID pointer.
Making pointers editable is not likely to accidentally
affect UI fields that were not intended to be editable,
because a simple `layout.prop` cannot determine which
datablocks to display in the menu and remains read-only.
The PROP_NEVER_UNLINK flag is also removed: it seems it
was added because the edit field that couldn't produce
a menu to set the pointer used to still display the unlink
button, but that seems not to be the case anymore.
Actual support for Object & Collection inputs in the modifier
is added in D10056, which can be used to test this code.
Differential Revision: https://developer.blender.org/D10098
Diffstat (limited to 'source/blender/windowmanager')
0 files changed, 0 insertions, 0 deletions