Commit: a89907b183969e04cfc5e1de5953429375d17db6 Author: Campbell Barton Date: Wed Mar 22 12:23:37 2017 +1100 Branches: app-templates https://developer.blender.org/rBa89907b183969e04cfc5e1de5953429375d17db6
Include classes to filter as a callback =================================================================== M release/datafiles/app_templates/101/template/__init__.py M release/scripts/modules/bl_app_override/__init__.py =================================================================== diff --git a/release/datafiles/app_templates/101/template/__init__.py b/release/datafiles/app_templates/101/template/__init__.py index 489255aded..2c21bf5836 100644 --- a/release/datafiles/app_templates/101/template/__init__.py +++ b/release/datafiles/app_templates/101/template/__init__.py @@ -109,6 +109,14 @@ class AppStateStore(AppOverrideState): # UI Filter/Ignore @staticmethod + def ui_ignore_classes(): + return ( + bpy.types.Header, + bpy.types.Menu, + bpy.types.Panel, + ) + + @staticmethod def ui_ignore_operator(op_id): return op_id in { "object.select_by_layer", diff --git a/release/scripts/modules/bl_app_override/__init__.py b/release/scripts/modules/bl_app_override/__init__.py index 50c3bfbd79..396ebf78a2 100644 --- a/release/scripts/modules/bl_app_override/__init__.py +++ b/release/scripts/modules/bl_app_override/__init__.py @@ -1,4 +1,3 @@ - # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or @@ -44,7 +43,7 @@ def class_filter(cls_parent, **kw): def ui_draw_filter_register( *, - classes=None, + ui_ignore_classes=None, ui_ignore_operator=None, ui_ignore_property=None, ui_ignore_menu=None, @@ -54,8 +53,8 @@ def ui_draw_filter_register( UILayout = bpy.types.UILayout - if classes is None: - classes = ( + if ui_ignore_classes is None: + ui_ignore_classes = ( bpy.types.Panel, bpy.types.Menu, bpy.types.Header, @@ -178,7 +177,7 @@ def ui_draw_filter_register( ui_ignore_store = [] - for cls in classes: + for cls in ui_ignore_classes: for subcls in list(cls.__subclasses__()): if "draw" in subcls.__dict__: # don't want to get parents draw() _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs