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, seeng as flags
include PROP_NEVER_UNLINK, which seems useless for an intentionally
readonly property. 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, fixes a crash
bug in RNA_property_pointer_set due to the wrong order of
operations, 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.
Actual support for Object & Collection inputs in the modifier
is added in D10056, which can be used to test this code.