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:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user