Hello Blender Coders/Blender Community!
I need some help with Blender Python. Here is what I want to achive:
I am integrating a game engine into Blender to be able to run and edit engine content directly from within Blender. Basically the point where I’m stuck is, that every bpy.types.Object is supposed to have a list of so called “Components”, for which I want to be able to edit the properties in a Panel. There are many different Component types (31 currently) and all have different attributes, so my idea was to generate the UI for those from the properties.
What I can do:
- Dynamically create a bpy.types.PropertyGroup from a Component’s attributes
- Automatically create UI from bpy.types.PropertyGroup (I did this myself, but does anybody know a build-in function to do this?)
What I cannot do, but need to do:
- Add the dynamically created bpy.types.PropertyGroup subclass for the Components to a bpy.types.PropertyCollection.
- Either save custom data to the .blend without using properties
- OR save/load extenernal data whenever blender loads/saves a .blend file [solved via load and save handlers]
If anybody knows how to do one of those things, I’d be glad if you could give me a hint, I’ve been trying to figure this out for ~8 hrs now. I hope I didn’t reach the Python API’s limits here.
Thank you in advance!