1

I'm very new to Blender scripting (not programming in general) and I can't seem to figure out how to save an array of some data type (probably want it to be another PropertyGroup) in a PropertyGroup that I put on bpy.types.Scene.ssData.

What I have tried so far is variations on this:

class SSData(bpy.types.PropertyGroup):
  totalCount: bpy.props.IntProperty(name="Subscene Count", description="Integer", default=0)
  list: ['ford']

but when I try to get the list property like this: bpy.context.scene.ssData.list I get an error AttributeError: 'SSData' object has no attribute 'list'. The other property is registered fine btw, I can get totalCount and set it to some other value as well.

I've searched in the Blender docs for some Array type that I can use like bpy.props.IntProperty but I can't find anything. I understand that the object I want there should inherit from bpy_structs but I don't know if I can make my own type based on that.

Dries
  • 111
  • 4
  • 3
    Does this help? https://blender.stackexchange.com/questions/16511/how-can-i-store-and-retrieve-a-custom-list-in-a-blend-file – Ray Mairlot Aug 05 '19 at 16:05
  • @RayMairlot This definitely helps! Thank you very much. I tried something similar as well but I wasn't sure how the CollectionProperty thing works (given it has a function called add() that I didn't know about). – Dries Aug 06 '19 at 06:36

0 Answers0