I'm creating a simple script where once executed it adds a mirror modifier to an object. The next step would be to invoke this button through the script and then I click on the object I want to mirror my selected object around:
But the command doesn't show up on the last executed command list and I can't find anything about it on the net. I just want to execute the command this button invokes.
my code:
import bpy from bpy.types import Menu
class MirrorPicker(bpy.types.Operator):
bl_idname = "mirror.picker"
bl_label = "Mirror Picker"
def execute(self, context):
bpy.ops.object.modifier_add(type='MIRROR')
# the eyedropper code goes here somewhere
return {'FINISHED'}
def register():
bpy.utils.register_class(MirrorPicker)
def unregister():
bpy.utils.unregister_class(MirrorPicker)
if __name__ == "__main__": register()

active objectlike in animation nodes. – zeffii Nov 08 '15 at 11:12