gregzaal / Gaffer

A light-manager add-on for Blender
387 stars 30 forks source link

Save the directory of HDRI specified by the user #31

Closed blenderskool closed 7 years ago

blenderskool commented 7 years ago

It would be really handy if the directory of the hdri specified by the user remains there till the user changes it next time.

Essentially save the path so that it is setup automatically next time

gregzaal commented 7 years ago

It's just a normal User Preference, so it is saved when the user clicks "Save User Settings" at the bottom left. I don't think it's wise to automatically save the user preferences since they may have changed something else temporarily.

It could be saved to a separate file (the settings.json) instead of being a user preference, that would be more permanent, but I'm not sure what disadvantages that might have.

blenderskool commented 7 years ago

Yeah, I am adding a system to save it as another file, It is not good to save Users settings 😄

gregzaal commented 7 years ago

There is a bit of a system in place for this sort of thing already - see the get_persistent_setting and set_persistent_setting functions in functions.py

blenderskool commented 7 years ago

Yep, I have used that and added this