[Bf-blender-cvs] [e8c7866608b] master: Add-ons: Exclude contrib for beta, rc and release builds.

Thomas Dinges noreply at git.blender.org
Tue Dec 13 11:14:38 CET 2022


Commit: e8c7866608bb71b674afd9420a22b993e066f873
Author: Thomas Dinges
Date:   Tue Dec 13 11:12:36 2022 +0100
Branches: master
https://developer.blender.org/rBe8c7866608bb71b674afd9420a22b993e066f873

Add-ons: Exclude contrib for beta, rc and release builds.

* Make it clearer that contrib isn't shipped with releases, by already excluding it in beta.
* Improve the UI by hiding the "Testing" enum item in these case.

Differential Revision: https://developer.blender.org/D16729

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

M	release/scripts/startup/bl_ui/__init__.py
M	source/creator/CMakeLists.txt

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

diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
index eaf61b58e6d..4822370c9ea 100644
--- a/release/scripts/startup/bl_ui/__init__.py
+++ b/release/scripts/startup/bl_ui/__init__.py
@@ -94,6 +94,16 @@ _namespace = globals()
 _modules_loaded = [_namespace[name] for name in _modules]
 del _namespace
 
+def _addon_support_items():
+    """Return the addon support levels suitable for this Blender build."""
+
+    items = [
+        ('OFFICIAL', "Official", "Officially supported"),
+        ('COMMUNITY', "Community", "Maintained by community developers"),
+    ]
+    if bpy.app.version_cycle == 'alpha':
+        items.append(('TESTING', "Testing", "Newly contributed scripts (excluded from release builds)"))
+    return items
 
 def register():
     from bpy.utils import register_class
@@ -141,11 +151,7 @@ def register():
     )
 
     WindowManager.addon_support = EnumProperty(
-        items=[
-            ('OFFICIAL', "Official", "Officially supported"),
-            ('COMMUNITY', "Community", "Maintained by community developers"),
-            ('TESTING', "Testing", "Newly contributed scripts (excluded from release builds)")
-        ],
+        items=_addon_support_items(),
         name="Support",
         description="Display support level",
         default={'OFFICIAL', 'COMMUNITY'},
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 6837bc0da9e..82a37614841 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -394,9 +394,10 @@ install(
 if(WITH_PYTHON)
   # install(CODE "message(\"copying blender scripts...\")")
 
-  # exclude addons_contrib if release
+  # exclude addons_contrib if release branch
   if("${BLENDER_VERSION_CYCLE}" STREQUAL "release" OR
-     "${BLENDER_VERSION_CYCLE}" STREQUAL "rc")
+     "${BLENDER_VERSION_CYCLE}" STREQUAL "rc" OR
+     "${BLENDER_VERSION_CYCLE}" STREQUAL "beta")
     set(ADDON_EXCLUDE_CONDITIONAL "addons_contrib/*")
   else()
     set(ADDON_EXCLUDE_CONDITIONAL "_addons_contrib/*")  # Dummy, won't do anything.



More information about the Bf-blender-cvs mailing list