- hide members of bpy from dir() and autocomp.

- path functions bpy.utils.script_paths(), bpy.utils_preset_paths(subdir)
- further simplified presets, use a generic draw function for preset menus and define the preset subdir and operator in the class
This commit is contained in:
2009-11-22 11:23:19 +00:00
parent 058454368a
commit 771406df94
7 changed files with 93 additions and 71 deletions

View File

@@ -158,14 +158,6 @@ class TEXT_MT_text(bpy.types.Menu):
layout.itemO("text.properties", icon='ICON_MENU_PANEL')
#ifndef DISABLE_PYTHON
# XXX layout.column()
# XXX uiDefIconTextBlockBut(block, text_template_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Script Templates", 0, yco-=20, 120, 19, "");
# XXX uiDefIconTextBlockBut(block, text_plugin_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Text Plugins", 0, yco-=20, 120, 19, "");
#endif
layout.itemM("TEXT_MT_templates")
@@ -177,8 +169,7 @@ class TEXT_MT_templates(bpy.types.Menu):
def draw(self, context):
import os
template_dir = os.path.join(os.path.dirname(__file__), os.path.pardir, "templates")
self.path_menu(template_dir, "text.open")
self.path_menu(bpy.utils.script_paths("templates"), "text.open")
class TEXT_MT_edit_view(bpy.types.Menu):