Reset text field to default when starting Blender Is there a way of reseting a text field every time Blender is initiated, saved or before closing? I want to create a password field for an Addon and I don't want it's value to be saved alongside the blend file.
I have looked for a while but I haven't seen anyone asking this particular subject.
A little bit of code:
row.prop(scene.testing, &quot;password&quot;)

Password being a String Property created like this:
password: StringProperty(
        name=&quot;Password&quot;,
        description=&quot;Password&quot;,
        default=&quot;&quot;,
        subtype=&quot;PASSWORD&quot;)

If it could be possible to reset to the default value which is &quot;&quot;, that would be perfect, but I don't seem to find anything.
Thanks!
Use the window manager.
Related How to declare global variables for use in an addon that aren&#39;t stored in the blend file
For a session variable suggest using the window manager. Will always be default when new blender is openened. No window manager property is saved directly.
bpy.types.WindowMangager.password =  StringProperty(
        name=&quot;Password&quot;,
        description=&quot;Password&quot;,
        default=&quot;&quot;,
        subtype=&quot;PASSWORD&quot;)

SKIP_SAVE
Also look at using the skip save option of a property.
Force a Blender operator to always start with default values
Onload handler.
How to set blender default properties in addons?