Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-10-19 16:48:45 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-10-19 16:48:45 +0300
commita918332cc3f821f5a70b1de53b65dd9ca596b093 (patch)
treec7c48c66e0ce7d34b6bf9148fffaf56753d4ef6a
parentae6710aab8b0ca4271db7a04db0b962b79df3191 (diff)
Rigify: suppress module load order list mismatch errors.
It seems the order changed, maybe because of a Python version upgrade. To fix, ignore the position of the 'utils' module.
-rw-r--r--rigify/__init__.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/rigify/__init__.py b/rigify/__init__.py
index 83aafb8c..9254e49d 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -39,7 +39,6 @@ import bpy
# With the sole exception of 'utils', modules must be listed in the
# correct dependency order.
initial_load_order = [
- 'utils',
'utils.errors',
'utils.misc',
'utils.rig',
@@ -50,6 +49,7 @@ initial_load_order = [
'utils.widgets',
'utils.widgets_basic',
'utils.widgets_special',
+ 'utils',
'utils.mechanism',
'utils.animation',
'utils.metaclass',
@@ -66,6 +66,7 @@ initial_load_order = [
'rot_mode',
'ui',
]
+utils_module_name = __name__ + '.utils'
def get_loaded_modules():
@@ -82,6 +83,14 @@ def reload_modules():
for name in reload_list:
importlib.reload(sys.modules[name])
+def compare_module_list(a, b):
+ # Allow 'utils' to move around
+ a_copy = list(a)
+ a_copy.remove(utils_module_name)
+ b_copy = list(b)
+ b_copy.remove(utils_module_name)
+ return a_copy == b_copy
+
def load_initial_modules():
load_list = [ __name__ + '.' + name for name in initial_load_order ]
@@ -91,7 +100,7 @@ def load_initial_modules():
module_list = get_loaded_modules()
expected_list = load_list[0 : max(11, i+1)]
- if module_list != expected_list:
+ if not compare_module_list(module_list, expected_list):
print('!!! RIGIFY: initial load order mismatch after '+name+' - expected: \n', expected_list, '\nGot:\n', module_list)
return load_list
@@ -113,7 +122,7 @@ else:
reload_list = reload_list_init = get_loaded_modules()
- if reload_list != load_list:
+ if not compare_module_list(reload_list, load_list):
print('!!! RIGIFY: initial load order mismatch - expected: \n', load_list, '\nGot:\n', reload_list)
load_rigs()