Testing loadUserPreset and saveUserPreset



  • Testing Engine.LoadUserPreset(), Engine.saveUserPreset() and Engine.getUserPresetList() I found this:

    When you are running the compiled standalone app, Engine.getUserPresetList() read only from /AppData/Roaming/..../User Presets folder

    LoadUserPreset() read from this folder too...

    but saveUserPreset() write PRESET FILE at the root of the drive where the executable is running from...

    So , when you try to save a user preset, getUserPresetList can´t read the new user preset because is not in ./AppData/Roaming/..../User Presets folder..., and of course loadUserPreset() can't load it, or the changes of an old user preset file, because still reading the old one file ....

    If you manually copy the new ( or the changed ) user preset file to ./AppData/Roaming/..../User Presets folder, this methods works and getUserPresetList() can return the correct list,...and loadUserPreset() can load correctly the new (or the changed) user preset....

    I think this considerations can be useful to find a solution for the User Preset System....,
    I hope
    Thanks for all....



  • @jadg said in Testing loadUserPreset and saveUserPreset:

    Testing Engine.LoadUserPreset(), Engine.saveUserPreset() and Engine.getUserPresetList() I found this:

    When you are running the compiled standalone app, Engine.getUserPresetList() read only from /AppData/Roaming/..../User Presets folder

    LoadUserPreset() read from this folder too...

    but saveUserPreset() write PRESET FILE at the root of the drive where the executable is running from...

    So , when you try to save a user preset, getUserPresetList can´t read the new user preset because is not in ./AppData/Roaming/..../User Presets folder..., and of course loadUserPreset() can't load it, or the changes of an old user preset file, because still reading the old one file ....

    If you manually copy the new ( or the changed ) user preset file to ./AppData/Roaming/..../User Presets folder, this methods works and getUserPresetList() can return the correct list,...and loadUserPreset() can load correctly the new (or the changed) user preset....

    I think this considerations can be useful to find a solution for the User Preset System....,
    I hope
    Thanks for all....


  • administrators

    but saveUserPreset() write PRESET FILE at the root of the drive where the executable is running from...

    This is of course complete bullshit and shouldn't happen. How the method works is that it creates a sibling file to the currently loaded user preset, but if nothing is loaded, then it does weird things like you described.

    A temporary workaround until I find the time to fix this correctly is to make sure that a user preset is loaded before you call Engine.saveUserPreset()...


Log in to reply
 

5
Online

329
Users

979
Topics

6.5k
Posts

Looks like your connection to Forum was lost, please wait while we try to reconnect.