9
$\begingroup$

I did applink for 3dCoat app. I set Export directory manually. At present, i should set the directory in every blend scene. But i would like to set the directory path only one time and store it aways in cache. Is it possible to do?

My code:

            exchangedir = StringProperty(
            name="FilePath",
            subtype="DIR_PATH"
        )
.....

row.prop(simple3Dcoat, "exchangedir", text="ExchangeDir")

It would be cool to store "exchangedir" string in cache. So that it will be always the same for all blend files. Thank you!

$\endgroup$
9
$\begingroup$

This sounds like you would want to have a user-preference for the addon, Blender supports this through bpy.types.AddonPreferences

This way, the addon can have settings that are saved with the user defaults.

API docs include example usage.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.