Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Settings: Settings can be extracted from UI #3323

Merged

Conversation

iLLiCiTiT
Copy link
Member

@iLLiCiTiT iLLiCiTiT commented Jun 10, 2022

Brief description

Added option to extract current values into json file.

Description

Extraction takes current values and extract them to a json file. It takes all values no matter if are overriden or not. Values are stored under keys with double underscores to be able differentiate what is value and what are metadata. Also added option to paste values from clipboard that are copied from different source or when whole file is copied.

Additional information

Didn't add option to "open json file" because it would be hard to find out what user want's to do with it. This is not meant as backup of Project settings as it does not save only overrides but all values.

Testing notes

Extract values to file

  1. Open settings UI
  2. Right click on any item in settings and hit Extract to file
  3. Select output file and hit Save
  4. Check output

Using extracted file

  1. Open settings UI
  2. Copy file in file explorer
  3. Right click in settings where would you like to paste values
  4. Paste action should be visible and if the saved file contains path there should be also Paste to same place
  5. Try them

Paste value as text

  1. Open settings UI
  2. Copy json content as text
# For example 'system_settings/modules/avalon'
{
    "AVALON_TIMEOUT": 666,
    "AVALON_THUMBNAIL_ROOT": {
        "windows": "D:/evil/directory",
        "darwin": "",
        "linux": ""
    }
}
  1. Try to paste it into settings UI

Resolves #3271

@ynbot
Copy link
Contributor

ynbot commented Jun 10, 2022

@iLLiCiTiT iLLiCiTiT self-assigned this Jun 10, 2022
@iLLiCiTiT iLLiCiTiT added the type: enhancement Enhancements to existing functionality label Jun 10, 2022
@antirotor
Copy link
Member

Related to #3271

@iLLiCiTiT iLLiCiTiT merged commit 277acc8 into develop Jun 13, 2022
@iLLiCiTiT iLLiCiTiT deleted the feature/OP-3327_File-serializable-parts-of-the-Settings branch June 13, 2022 14:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Settings serializable to file
4 participants