Thanks as well for mentioning QSettings. I've not read about this before and will take a look!
-Chad On Sat, Aug 17, 2019 at 6:23 PM Jakob Kousholt <jako...@gmail.com> wrote: > Thanks, Guys! > I wasn't aware of either QSettings or OptionVars, so I will definitely > look into those. > > On Sat, 17 Aug 2019 at 17:21, Justin Israel <justinisr...@gmail.com> > wrote: > >> >> >> On Sun, Aug 18, 2019, 4:41 AM Jakob Kousholt <jako...@gmail.com> wrote: >> >>> Hey Folks, >>> >>> I'd love to get your approach to make state persist of your UI. Let's >>> say I have a custom-built UI and for the majority of the time, the user >>> input in the UI will be the same per scene. So next time they load up their >>> scene and open my UI the settings they entered the first time around should >>> persist. What is your approach? Do you create some arbitrary node in the >>> scene which holds the information, or what would be considered a good >>> approach? Looking forward to your approach, thanks! >>> >> >> Is it Maya native UI or Qt? >> For Maya native UI I had always thought that an accepted approach was to >> store the UI prefs in Maya OptionVars? If they are really complex settings >> then I guess you could go with Chad's suggestion of storing a json prefs >> file. >> >> For Qt, it already provides a QSettings concept which knows where to >> store, and retrieves it for you based on app and organisation name. Even if >> you aren't using Qt for your UI, technically you could use QSettings from >> PySide to manage your prefs if you don't want to deal with the filesystem >> details. >> >> >>> Jake >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Python Programming for Autodesk Maya" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to python_inside_maya+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/CAEKd6baxEMb21GugKE7cWb0F38aSBR4c1z82UEWm-7sxq8j4Lw%40mail.gmail.com >>> <https://groups.google.com/d/msgid/python_inside_maya/CAEKd6baxEMb21GugKE7cWb0F38aSBR4c1z82UEWm-7sxq8j4Lw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Python Programming for Autodesk Maya" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to python_inside_maya+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3JZ9FVYusT59RbN6T%2B1RB95Ta%3DN7NjaH_p0oSXdtmN0Q%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3JZ9FVYusT59RbN6T%2B1RB95Ta%3DN7NjaH_p0oSXdtmN0Q%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to python_inside_maya+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CAEKd6bbrAm%3D-DaQ_zsROOSULqR7FpgmE2o7OhgQOSybECmJzbg%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAEKd6bbrAm%3D-DaQ_zsROOSULqR7FpgmE2o7OhgQOSybECmJzbg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAJ4oLs5rA0VKFH7ZupnDm7v66bOamFFzjuEbrwntKH1KwCAN9w%40mail.gmail.com.