Skip to content

Instantly share code, notes, and snippets.

@iCyP
Created February 13, 2019 11:33
Show Gist options
  • Save iCyP/0e01a422689bdc14d5b8c52793d2ea0a to your computer and use it in GitHub Desktop.
Save iCyP/0e01a422689bdc14d5b8c52793d2ea0a to your computer and use it in GitHub Desktop.
new_hook_add_shortcut
import bpy
bl_info = {
"name":"new_hook_add_shortcut",
"author": "iCyP",
"version": (0, 1),
"blender": (2, 80, 0),
"location": "EditMode->Right click",
"description": "add shortcut to hook selected to new empty",
"warning": "",
"support": "TESTING",
"wiki_url": "",
"tracker_url": "",
"category": "Mesh"
}
def add_button(self, context):
self.layout.separator()
self.layout.operator(bpy.ops.object.hook_add_newob.idname())
def register():
bpy.types.VIEW3D_MT_edit_mesh_specials.append(add_button)
# アドオン無効化時の処理
def unregister():
bpy.types.VIEW3D_MT_edit_mesh_specials.remove(add_button)
if "__main__" == __name__:
register()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment