RNA Types metaclass registration
[blender.git] / release / scripts / templates / operator_simple.py
1 import bpy
2
3 def main(context):
4     for ob in context.scene.objects:
5         print(ob)
6
7 class SimpleOperator(bpy.types.Operator):
8     ''''''
9     bl_idname = "object.simple_operator"
10     bl_label = "Simple Object Operator"
11
12     def poll(self, context):
13         return context.active_object != None
14
15     def execute(self, context):
16         main(context)
17         return {'FINISHED'}
18
19 def register():
20     pass
21
22 def unregister():
23     pass
24
25 if __name__ == "__main__":
26     register()