def execute(self, context): s = bpy.context.scene a = s.cam_active_operation o = s.cam_operations[a] gname = o.name + '_orientations' bpy.ops.object.empty_add(type='ARROWS') oriob = bpy.context.active_object oriob.empty_draw_size = 0.02 # 2 cm simple.addToGroup(oriob, gname) oriob.name = 'ori_' + o.name + '.' + str(len(bpy.data.collections[gname].objects)).zfill(3) return {'FINISHED'}
def execute(self, context): #main(context) s=bpy.context.scene a=s.cam_active_operation o=s.cam_operations[a] gname=o.name+'_orientations' bpy.ops.object.empty_add(type='ARROWS') oriob=bpy.context.active_object oriob.empty_draw_size=0.02 # 2 cm simple.addToGroup(oriob,gname) oriob.name='ori_'+o.name+'.'+str(len(bpy.data.groups[gname].objects)).zfill(3) return {'FINISHED'}