I can’t find the proper python notation to access the layout. Closest I have is “context.scene.camera.data” but that puts my button at the bottom of the list of options.
class HelloWorldPanel(bpy.types.Panel):
"""Creates a Panel in the Object properties window"""
bl_label = "Fractal Camera"
bl_idname = "OBJECT_PT_hello"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "data"
def draw(self, context):
layout = self.layout
#obj = context.scene.camera.data
obj = context.camera
row = layout.row()
row.label(text="Import Metadata", icon='PREVIEW_RANGE')
row = layout.row()
row.label(text="Active object is: " + obj.name)
row = layout.row()
row.prop(obj, "name")
row = layout.row()
row.operator("mandelbulber.metadata")