I would like to apply a custom parameter to a selection of objects with the following setup:
class MyPanel(bpy.types.Panel):
bl_label = "Tool"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
@classmethod
def poll(cls, context):
return len(context.selected_objects) > 0
def draw(self, context):
layout = self.layout
myprop = context.active_object.myprop
row = layout.row()
row.prop(myprop, 'subdivs')
For now it works with the active_object
, but how do I have to change my panel so it can pass on multiple variables to my update function?