Skip to content

Instantly share code, notes, and snippets.

@dskjal
Last active April 4, 2018 02:05
Show Gist options
  • Save dskjal/d8040e308c04c77d3ea38ca97820739e to your computer and use it in GitHub Desktop.
Save dskjal/d8040e308c04c77d3ea38ca97820739e to your computer and use it in GitHub Desktop.
Blender にボタンを定義するスクリプト
import bpy
class MyButton(bpy.types.Operator):
bl_idname = "my.button"
bl_label = "text"
def execute(self, context):
print("pushed")
return{'FINISHED'}
bpy.utils.register_class(MyButton)
#bpy.utils.register_module(__name__) は Blender 2.8 からは使えない
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment