0
$\begingroup$

How can I add this pie menu from text editor to blender(2.78) so it will load every time. Script kiddie here so please explain in plain English.

import bpy
from bpy.types import Menu


class VIEW3D_PIE_template(Menu):
    # label is displayed at the center of the pie menu.
    bl_label = "Select Mode"
    bl_idname = "mesh.kkmodeling"

    def draw(self, context):
        layout = self.layout

        pie = layout.menu_pie()
        # operator_enum will just spread all available options
        # for the type enum of the operator on the pie
        #pie.operator_enum("mesh.select_mode", "type")
        pie.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region")
        pie.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual")
        pie.operator("mesh.inset", text="Inset Faces")
        pie.operator("mesh.edge_face_add")
        pie.operator("mesh.subdivide")
        pie.operator("mesh.loopcut_slide")
        pie.operator("mesh.offset_edge_loops_slide")
        pie.operator("mesh.knife_tool", text="Knife")
def register():
    bpy.utils.register_class(VIEW3D_PIE_template)

    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new("Mesh")
    kmi = km.keymap_items.new("wm.call_menu_pie", "W", "PRESS", shift=True, alt=True).properties.name="mesh.kkmodeling"


def unregister():
    bpy.utils.unregister_class(VIEW3D_PIE_template)


if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name="VIEW3D_PIE_template")
$\endgroup$

1 Answer 1

-1
$\begingroup$

load py from preferences addon tab. Then activate add on.

$\endgroup$
1
  • $\begingroup$ Won't work with this code above. Please explain why, thanks! $\endgroup$
    – aliasguru
    Nov 28, 2016 at 12:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .