I created a custom property for my armature and I want to add it to my custom panel. If I want to add an object property to a panel I'll do it like this layout.prop(object, "property")
. However this doesn't work for custom properties that I created. What am I doing wrong?
I'm using Blender version 2.79.
Here is the panel code:
class MyPanel(bpy.types.Panel):
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_label = "MyPanel"
bl_category = "MyPanel"
def draw(self, context):
layout = self.layout
object = context.object
layout.prop(object, "prop") #Custom property is called "prop"
object = bpy.data.objects["Armature"]
and then writelayout.prop(object, "prop")
. But this doesn't work. $\endgroup$