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
This commit is contained in:
parent
a14a152024
commit
e8c7866608
Notes:
blender-bot
2023-03-30 21:44:58 +02:00
Referenced by issue #105213, "Testing" tab missing from "Preferences>Add-ons" section. Referenced by issue #106306, Addons from Alternate script path (script_directory) in addon_contribs not showing in addon preferences
|
@ -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'},
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue