bl3.2.1 Wont show "load preferences: from 2.93 #100699

Closed
opened 2022-08-30 03:11:35 +02:00 by Rombout Versluijs · 18 comments

System Information
Operating system: Windows-10-10.0.25188-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.94

Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: bcfdb14560
Worked: (newest version of Blender that worked as expected)

Short description of error
Normally when you open a fresh installed new Blender version. It will show the dialog where we can set the keymap and also ask if user wants to import preferences of a earlier Blender version. For me it only shows the keymap dialog but not the import function.

Exact steps for others to reproduce the error
01 install blender 3.2.1
02 run blender 3.2.1
03 We are greeted with splash screen with keymap options
04 missing is the import preferences function

**System Information** Operating system: Windows-10-10.0.25188-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.94 **Blender Version** Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: `bcfdb14560` Worked: (newest version of Blender that worked as expected) **Short description of error** Normally when you open a fresh installed new Blender version. It will show the dialog where we can set the keymap and also ask if user wants to import preferences of a earlier Blender version. For me it only shows the keymap dialog but not the import function. **Exact steps for others to reproduce the error** 01 install blender 3.2.1 02 run blender 3.2.1 03 We are greeted with splash screen with keymap options 04 missing is the import preferences function

Added subscriber: @RomboutVersluijs

Added subscriber: @RomboutVersluijs

I been checking some code and the issue is that it only looks for minor versions. In the userpref.py file there is the operator

preferences.copy_prev

the cls previous_versions only check back one minor version

@classmethod
    def previous_version(cls):
        # Find config folder from previous version.
        import os
        version = bpy.app.version
        version_new = ((version[0] * 100) + version[1])
        version_old = ((version[0] * 100) + version[1]) - 1
        print(version_new)
        print(version_old)
        - Ensure we only try to copy files from a point release.
        - The check below ensures the second numbers match.
        while (version_new % 100) *10 == (version_old % 100)* 10:
            version_split = version_old // 100, version_old % 100
            if os.path.isdir(cls._old_version_path(version_split)):
                return version_split
            version_old = version_old - 1
        return None

So do i really need to install every version from 2.93 to 3.2.1 to get 3.2.1 using my previous preferences?

I been checking some code and the issue is that it only looks for minor versions. In the userpref.py file there is the operator ``` preferences.copy_prev ``` the cls previous_versions only check back one minor version ``` @classmethod def previous_version(cls): # Find config folder from previous version. import os version = bpy.app.version version_new = ((version[0] * 100) + version[1]) version_old = ((version[0] * 100) + version[1]) - 1 print(version_new) print(version_old) - Ensure we only try to copy files from a point release. - The check below ensures the second numbers match. while (version_new % 100) *10 == (version_old % 100)* 10: version_split = version_old // 100, version_old % 100 if os.path.isdir(cls._old_version_path(version_split)): return version_split version_old = version_old - 1 return None ``` So do i really need to install every version from 2.93 to 3.2.1 to get 3.2.1 using my previous preferences?

as a workaround i manually copied items from 2.93 user folder to a new 3.2 folder. Did get some warning mainly due to addions not being updated. I tend to use one blender version as the main addon folder. But i guess i need to start using a new major version for this with all the API changes going from 2.93 to 3.2.1

as a workaround i manually copied items from 2.93 user folder to a new 3.2 folder. Did get some warning mainly due to addions not being updated. I tend to use one blender version as the main addon folder. But i guess i need to start using a new major version for this with all the API changes going from 2.93 to 3.2.1
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Thanks for the report. If I understand correctly you want to import settings from last installed version, right?
And so far that option shows up if we've previous consecutive version installed, did i get you correctly? I'm able to confirm this behavior after removing the userprefs file.

Thanks for the report. If I understand correctly you want to import settings from last installed version, right? And so far that option shows up if we've previous consecutive version installed, did i get you correctly? I'm able to confirm this behavior after removing the `userprefs` file.

Correctl, ive saw some old reports when the 3.0 branch went live. Some users which could not load the previous preferences. That one went from 2.93 to 3.0. Though i would think everyrone would have this bugs as it only looks for minor version.

I did a print call from the def previous_version and it prints out 301 300 and at the end 299

Correctl, ive saw some old reports when the 3.0 branch went live. Some users which could not load the previous preferences. That one went from 2.93 to 3.0. Though i would think everyrone would have this bugs as it only looks for minor version. I did a print call from the def previous_version and it prints out 301 300 and at the end 299

I was looking at github in old versions and noticed branch 3.0 had hardcoded exceptions for this big step.

Source: blender Github repo

    @classmethod
    def previous_version(cls):
        # Find config folder from previous version.
        import os
        version = bpy.app.version
        version_new = ((version[0] * 100) + version[1])
        version_old = ((version[0] * 100) + version[1]) - 1

        # Special case, remove when the version is > 3.0.
        if version_new == 300:
            version_new = 294
            version_old = 293
        else:
            print("TODO: remove exception!")
        # End special case.

        - Ensure we only try to copy files from a point release.
        - The check below ensures the second numbers match.
        while (version_new % 100) *10 == (version_old % 100)* 10:
            version_split = version_old // 100, version_old % 100
            if os.path.isdir(cls._old_version_path(version_split)):
                return version_split
            version_old = version_old - 1
        return None
I was looking at github in old versions and noticed branch 3.0 had hardcoded exceptions for this big step. Source: [blender Github repo ](https://github.com/blender/blender/blob/blender-v3.0-release/release/scripts/startup/bl_operators/userpref.py#:~:text=%23%20Special%20case%2C%20remove,End%20special%20case.) ``` @classmethod def previous_version(cls): # Find config folder from previous version. import os version = bpy.app.version version_new = ((version[0] * 100) + version[1]) version_old = ((version[0] * 100) + version[1]) - 1 # Special case, remove when the version is > 3.0. if version_new == 300: version_new = 294 version_old = 293 else: print("TODO: remove exception!") # End special case. - Ensure we only try to copy files from a point release. - The check below ensures the second numbers match. while (version_new % 100) *10 == (version_old % 100)* 10: version_split = version_old // 100, version_old % 100 if os.path.isdir(cls._old_version_path(version_split)): return version_split version_old = version_old - 1 return None ```

Here's also a commit which shows that hardcoded values were added to resolve preference not importing

62bff15377

Here's also a commit which shows that hardcoded values were added to resolve preference not importing https://github.com/blender/blender/commit/62bff15377510ce05543afb40526d430a21697f1
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Added subscribers: @LazyDodo, @ideasman42, @iss

Added subscribers: @LazyDodo, @ideasman42, @iss

I can reproduce this, but from commit log not sure what intentions are - whether it is supposed to import pre 3.0 config. @ideasman42 @LazyDodo, can you check this?

I can reproduce this, but from commit log not sure what intentions are - whether it is supposed to import pre 3.0 config. @ideasman42 @LazyDodo, can you check this?
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

I can validate at-least 3.4 won't import a 2.9x config, but i'll be honest we ended up fixing this last time with a bunch of people, my name is just on it since i did some of the low hanging fruit in D10986: Fix Various versioning issues, can't really say this is an area i'm overly familiar with, I'm gonna leave it to @ideasman42

I can validate at-least 3.4 won't import a 2.9x config, but i'll be honest we ended up fixing this last time with a bunch of people, my name is just on it since i did some of the low hanging fruit in [D10986: Fix Various versioning issues](https://archive.blender.org/developer/D10986), can't really say this is an area i'm overly familiar with, I'm gonna leave it to @ideasman42

This issue was referenced by 5916e73b28

This issue was referenced by 5916e73b2888537926d9aa71125a265989fa9e5a

This issue was referenced by fabf4ee33d

This issue was referenced by fabf4ee33def3b8f3555072ffa1d497ac8355da1

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'

Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
Campbell Barton self-assigned this 2022-10-13 08:39:10 +02:00

The issue is that 3.2.2 did not have the check for version below as noted in here

The issue is that 3.2.2 did not have the check for version below as noted in [here ](https://developer.blender.org/T100699#1410174)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#100699
No description provided.