- added menu templates
- move template menu into the header of the text editor (so users will find more easily)
- updated mathutils examples, switching the order of multiplication.
This commit is contained in:
2011-07-26 07:39:00 +00:00
parent 5b3906728f
commit 71692e802f
6 changed files with 112 additions and 27 deletions

View File

@@ -0,0 +1,26 @@
import bpy
class SimpleCustomMenu(bpy.types.Menu):
bl_label = "Simple Custom Menu"
bl_idname = "OBJECT_MT_simple_custom_menu"
def draw(self, context):
layout = self.layout
layout.operator("wm.open_mainfile")
layout.operator("wm.save_as_mainfile")
def register():
bpy.utils.register_class(SimpleCustomMenu)
def unregister():
bpy.utils.unregister_class(SimpleCustomMenu)
if __name__ == "__main__":
register()
# The menu can also be called from scripts
bpy.ops.wm.call_menu(name=SimpleCustomMenu.bl_idname)