← All ideas
  • Published 19 Jul 2024

Remote Access to PropertyGroup

You can't register a PropertyGroup in one .py and then register a CollectionProperty in a different .py that references that PropertyGroup. At least not when you're working out of the Text Editor.

This is a non-issue for probably 95% of addons due to their limited size and complexity. But when you have much larger, more complicated add-ons, it gets really annoying. You have to have multiple duplicates of the PropertyGroup if you don't want your file structure controlled by this single limitation.

Can that be made less dumb? It would be great if this,

py_two_collection: CollectionProperty(type=Py1PropertyGroup),

or some variation worked regardless of where the PropertyGroup was registered from. Right now it only works if that PropertyGroup was registered from the same script as the CollectionProperty.

0%

Development Status: Open

Upvote 0 Downvote 0
Jordan-Henshaw
19 Jul 2024

1 Comment

guishe

Actually, you can access property groups defined in python

Py1PropertyGroup = bpy.types.PropertyGroup.bl_rna_get_subclass_py('Py1PropertyGroup')
...
py_two_collection: CollectionProperty(type=Py1PropertyGroup)