[Bf-blender-cvs] [3ea1ae7278] app-templates: Remove underscore blecklist/whitelist

Campbell Barton noreply at git.blender.org
Tue Mar 21 22:32:26 CET 2017


Commit: 3ea1ae727875365c705c9e907af56667dc52a00e
Author: Campbell Barton
Date:   Wed Mar 22 08:31:18 2017 +1100
Branches: app-templates
https://developer.blender.org/rB3ea1ae727875365c705c9e907af56667dc52a00e

Remove underscore blecklist/whitelist

===================================================================

M	release/datafiles/app_templates/101/template/__init__.py
M	release/scripts/modules/bl_app_override.py

===================================================================

diff --git a/release/datafiles/app_templates/101/template/__init__.py b/release/datafiles/app_templates/101/template/__init__.py
index da395ea4fc..fb43927866 100644
--- a/release/datafiles/app_templates/101/template/__init__.py
+++ b/release/datafiles/app_templates/101/template/__init__.py
@@ -53,7 +53,7 @@ class AppStateStore:
                 bl_region_type={'TOOLS', 'WINDOW'},
                 bl_space_type={'VIEW_3D', 'PROPERTIES'},
                 # keep basic panels
-                black_list={
+                blacklist={
                     'OBJECT_PT_transform',
                     'VIEW3D_PT_tools_add_object',
                     'VIEW3D_PT_tools_meshedit',
diff --git a/release/scripts/modules/bl_app_override.py b/release/scripts/modules/bl_app_override.py
index 352ac95015..3e79c1ed06 100644
--- a/release/scripts/modules/bl_app_override.py
+++ b/release/scripts/modules/bl_app_override.py
@@ -29,15 +29,15 @@ Intended for use with 'app_templates', though it can be used from anywhere.
 # TODO, how to check these aren't from add-ons.
 # templates might need to un-register while filtering.
 def class_filter(cls_parent, **kw):
-    white_list = kw.pop("white_list", None)
-    black_list = kw.pop("black_list", None)
+    whitelist = kw.pop("whitelist", None)
+    blacklist = kw.pop("blacklist", None)
     kw_items = tuple(kw.items())
     for cls in cls_parent.__subclasses__():
         # same as is_registered()
         if "bl_rna" in cls.__dict__:
-            if black_list is not None and cls.__name__ in black_list:
+            if blacklist is not None and cls.__name__ in blacklist:
                 continue
-            if ((white_list is not None and cls.__name__ is white_list) or
+            if ((whitelist is not None and cls.__name__ is whitelist) or
                     all((getattr(cls, attr) in expect) for attr, expect in kw_items)):
                 yield cls




More information about the Bf-blender-cvs mailing list