I'm trying to initialize a PropertyGroup with pointers to objects inside another PropertyGroup. I'm getting an error: bpy_struct "ListItem" registration error: object_group could not register. Am I doing something wrong? In principle I'm trying to hold pointers to objects in a list, with each list with a label.
Answer from here doesn't seem to be working:Register Object inside of Another Object
class ObjectPointer(PropertyGroup):
obj: bpy.props.PointerProperty(type = bpy.types.Object)
class ListItem(PropertyGroup):
name: StringProperty(
name = "Name"
)
object_group: CollectionProperty(type = objectPointer)
Inside register():
bpy.types.Scene.my_list = CollectionProperty(type = ListItem)
ObjectPointerfirst, thenListItemand finally assign it tomy_listin the register function. Also make sure(type = objectPointer)is written like(type = ObjectPointer)(ObjectPointer with capital O, but might be just a typo in your question). – Sighthound Jan 06 '21 at 17:23