This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/release/scripts/templates/operator_simple.py

22 lines
445 B
Python
Raw Normal View History

import bpy
def main(context):
for ob in context.scene.objects:
print(ob)
class SimpleOperator(bpy.types.Operator):
''''''
bl_idname = "object.simple_operator"
bl_label = "Simple Object Operator"
def poll(self, context):
return context.active_object != None
def execute(self, context):
main(context)
return {'FINISHED'}
if __name__ == "__main__":
bpy.ops.object.simple_operator()