diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-20 08:10:14 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-20 08:10:14 +0300 |
commit | c2cdbe1e88f1397d624538589137c013e087c38a (patch) | |
tree | 549b28c72f2c1db46796e626778e7f4a0e1e0691 /doc/python_api/examples/bpy.types.Operator.py | |
parent | df3316cbe98e19def7284c028e53682db0be9a30 (diff) |
Cleanup: run autopep8 on doc/
Diffstat (limited to 'doc/python_api/examples/bpy.types.Operator.py')
-rw-r--r-- | doc/python_api/examples/bpy.types.Operator.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/python_api/examples/bpy.types.Operator.py b/doc/python_api/examples/bpy.types.Operator.py index 5299b198774..41b96ac402f 100644 --- a/doc/python_api/examples/bpy.types.Operator.py +++ b/doc/python_api/examples/bpy.types.Operator.py @@ -22,13 +22,15 @@ class HelloWorldOperator(bpy.types.Operator): print("Hello World") return {'FINISHED'} -# Only needed if you want to add into a dynamic menu + +# Only needed if you want to add into a dynamic menu. def menu_func(self, context): self.layout.operator(HelloWorldOperator.bl_idname, text="Hello World Operator") -# Register and add to the view menu (required to also use F3 search "Hello World Operator" for quick access) + +# Register and add to the view menu (required to also use F3 search "Hello World Operator" for quick access). bpy.utils.register_class(HelloWorldOperator) bpy.types.VIEW3D_MT_view.append(menu_func) -# test call to the newly defined operator +# Test call to the newly defined operator. bpy.ops.wm.hello_world() |