I have a piece of code that stores properties into a scene as such:
bpy.types.Scene.MyPropertyName = FloatProperty(name=“Test Property”, default=1.0, min=0.5, max=2.5)
To (greatly) simplify a piece of code (and avoid manually typing over a hundred properties) I would like to do just like the above but from a string (pulled from an array of 100+ strings). Example:
While I’ve been able to create custom properties from a string name with the code you provided (can see them in the scene custom properties rollout), I unfortunately cannot use these properties in panel widgets!
For example if I create a property the standard way with code like:
layout = self.layout
col = layout.column(align=True)
col.prop(context.scene, “MyProp”)
However if I invoke your code to create “MyProp” (again both will show in scene custom properties) then the property won’t show in the panel and I’ll get a warning “rna_uiItemR: property not found: Scene.MyProp”