I made this script and when I run it, it works but when I try to install it, nothing happens. Why?!?!?
Any help?
bl_info = { "name": "Leafar´s LTs Menu",
"author": "Rafael Sánchez",
"version": (0,1),
"blender": (2, 76),
"location": "View3D > Shift+X",
"description": "LoopTools Pie Menu",
"warning": "",
"wiki_url": "",
"category": "3D View"}
import bpy
from bpy.types import Menu
# spawn an edit mode selection pie (run while object is in edit mode to get a valid output)
class VIEW3D_PIE_template(Menu):
# label is displayed at the center of the pie menu.
bl_label = "LTs"
bl_idname = "mesh.LTmenu"
def draw(self, context):
layout = self.layout
pie = layout.menu_pie()
#4 - LEFT
pie.operator("mesh.looptools_relax", text="Relax", icon='PARTICLE_PATH')
#6 - RIGHT
pie.operator("mesh.looptools_space", text="Space", icon='NOCURVE')
#2 - BOTTOM
pie.operator("mesh.looptools_bridge", text="Bridge", icon='GRIP')
#8 - TOP
pie.operator("screen.redo_last", text="F6", icon='SCRIPTWIN')
#7 - TOP - LEFT
pie.operator("mesh.looptools_flatten", text="Flatten", icon='OUTLINER_DATA_FONT')
#9 - TOP - RIGHT
pie.operator("mesh.looptools_gstretch", text="Gstrecth", icon='PARTICLE_POINT')
#1 - BOTTOM - LEFT
pie.operator("mesh.looptools_circle", text="Circle", icon='META_EMPTY')
#3 - BOTTOM - RIGHT
pie.operator("mesh.looptools_curve", text="Curve", icon='OUTLINER_DATA_CURVE')
def register():
bpy.utils.register_class(VIEW3D_PIE_template)
wm = bpy.context.window_manager
km = wm.keyconfigs.addon.keymaps.new(name = "Mesh")
kmi = km.keymap_items.new("wm.call_menu_pie", "X", "PRESS", shift = True).properties.name="mesh.LTmenu"
def unregister():
bpy.utils.unregister_class(VIEW3D_PIE_template)
if __name__ == "__main__":
register()