Is there a way for Blender to remember the value that the user last used?
Once I quit the application, the Blender GUI values are reset. But,I want to display the value entered by the user at the last startup on the GUI as it is.
If I save that value, is it best to create a text file on the user's PC and save it?
Autodesk Maya has a command called "optionVar" that I could use to save the value. Is there something close to that in Blender?
The code is partially shown below. I created a text field with default values in code like this:
class QueryProps_stringProperties(bpy.types.PropertyGroup):
testText = "testText"
query_testText: bpy.props.StringProperty(default=testText)
class Test_PT_Panel(bpy.types.Panel):
blidname = "Test_PT_Panel"
bl_label = "Test Panel"
bl_category = "Test"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
def draw(self,context):
sce = context.scene
props_stringProp = sce.QueryProps_stringProperties
layout = self.layout
row = layout.row()
row.label(text="testText")
row.prop(props_stringProp, "query_testText", text="")
What I'm showing is a UI that doesn't want to store information in a .blend file, it retains its value no matter what scene you open at any time.