replace dynamic_menu.py with Menu classmethods much less complicated.

access append/prepend eg.

bpy.types.INFO_MT_file_import.append(lambda self, context: self.layout.operator("import_some.format"))
This commit is contained in:
2009-12-25 22:16:19 +00:00
parent 695677914a
commit 5afd084513
21 changed files with 54 additions and 203 deletions

View File

@@ -27,8 +27,6 @@ This will generate python files in "./source/blender/python/doc/bpy/sphinx-in"
Generate html docs by running...
sphinx-build source/blender/python/doc/bpy/sphinx-in source/blender/python/doc/bpy/sphinx-out
'''
# if you dont have graphvis installed ommit the --graph arg.
@@ -75,7 +73,7 @@ def py_function_args(func):
INVALID = py_function_args
defaults = ([INVALID] * (len(names) - len(defaults))) + defaults
if names[0] == "self":
if names[0] in ("self", "cls"): # normal class function or classmethod
del names[0]
del defaults[0]