This commit implements described in the #104573. The goal is to fix the confusion of the submodule hashes change, which are not ideal for any of the supported git-module configuration (they are either always visible causing confusion, or silently staged and committed, also causing confusion). This commit replaces submodules with a checkout of addons and addons_contrib, covered by the .gitignore, and locale and developer tools are moved to the main repository. This also changes the paths: - /release/scripts are moved to the /scripts - /source/tools are moved to the /tools - /release/datafiles/locale is moved to /locale This is done to avoid conflicts when using bisect, and also allow buildbot to automatically "recover" wgen building older or newer branches/patches. Running `make update` will initialize the local checkout to the changed repository configuration. Another aspect of the change is that the make update will support Github style of remote organization (origin remote pointing to thy fork, upstream remote pointing to the upstream blender/blender.git). Pull Request #104755
64 lines
1.3 KiB
Python
64 lines
1.3 KiB
Python
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
from __future__ import annotations
|
|
|
|
# support reloading sub-modules
|
|
if "bpy" in locals():
|
|
from importlib import reload
|
|
_modules_loaded[:] = [reload(val) for val in _modules_loaded]
|
|
del reload
|
|
|
|
_modules = [
|
|
"add_mesh_torus",
|
|
"anim",
|
|
"assets",
|
|
"clip",
|
|
"console",
|
|
"constraint",
|
|
"file",
|
|
"geometry_nodes",
|
|
"image",
|
|
"mesh",
|
|
"node",
|
|
"object",
|
|
"object_align",
|
|
"object_quick_effects",
|
|
"object_randomize_transform",
|
|
"presets",
|
|
"rigidbody",
|
|
"screen_play_rendered_anim",
|
|
"sequencer",
|
|
"spreadsheet",
|
|
"userpref",
|
|
"uvcalc_follow_active",
|
|
"uvcalc_lightmap",
|
|
"uvcalc_transform",
|
|
"vertexpaint_dirt",
|
|
"view3d",
|
|
"wm",
|
|
]
|
|
|
|
import bpy
|
|
|
|
if bpy.app.build_options.freestyle:
|
|
_modules.append("freestyle")
|
|
|
|
__import__(name=__name__, fromlist=_modules)
|
|
_namespace = globals()
|
|
_modules_loaded = [_namespace[name] for name in _modules]
|
|
del _namespace
|
|
|
|
|
|
def register():
|
|
from bpy.utils import register_class
|
|
for mod in _modules_loaded:
|
|
for cls in mod.classes:
|
|
register_class(cls)
|
|
|
|
|
|
def unregister():
|
|
from bpy.utils import unregister_class
|
|
for mod in reversed(_modules_loaded):
|
|
for cls in reversed(mod.classes):
|
|
if cls.is_registered:
|
|
unregister_class(cls)
|