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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-04 18:24:11 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-04 18:25:37 +0300
commit6c878c5d3ca466fb6b7dd8894f8c2565b8e6d223 (patch)
tree7ed1cd53c73407f2416929ead77fe6657d80e03a /release
parentdfc0d3755b9bd4ce34a8384349ab28fe1c95b8c6 (diff)
Fix T58692: splash screen next not working when using BLENDER_USER_CONFIG.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/wm.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index b8db041710c..2cdcca562c7 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1483,9 +1483,19 @@ class WM_OT_copy_prev_settings(Operator):
old = cls._old_path()
new = cls._new_path()
+
+ # Disable operator in case config path is overriden with environment
+ # variable. That case has no automatic per-version configuration.
+ userconfig_path = os.path.normpath(bpy.utils.user_resource('CONFIG'))
+ new_userconfig_path = os.path.normpath(os.path.join(new, "config"))
+ if userconfig_path != new_userconfig_path:
+ return False
+
+ # Enable operator if new config path does not exist yet.
if os.path.isdir(old) and not os.path.isdir(new):
return True
+ # Enable operator also if there are no new user preference yet.
old_userpref = os.path.join(old, "config", "userpref.blend")
new_userpref = os.path.join(new, "config", "userpref.blend")
return os.path.isfile(old_userpref) and not os.path.isfile(new_userpref)
@@ -2693,8 +2703,8 @@ class WM_MT_splash(Menu):
# Draw setup screen if no preferences have been saved yet.
import os
- user_path = bpy.utils.resource_path('USER')
- userdef_path = os.path.join(user_path, "config", "userpref.blend")
+ userconfig_path = bpy.utils.user_resource('CONFIG');
+ userdef_path = os.path.join(userconfig_path, "userpref.blend")
if not os.path.isfile(userdef_path):
self.draw_setup(context)