# Addon not updating when pressing F8

I have a simple operator that prints out the string "Testing operator". I change the string to "Testing updated file", then go to Blender and press F8 to reload the script. I run the operator, but I still get "Testing operator", and not the updated string.

I have the script in a separate folder (not in the Blender script path), and have installed the addon through Blender's "Install from file". The script is only one file, and I'm editing it in Notepad++.

When I try to reinstall the addon, the update takes place. However, restarting Blender does nothing.

My question is thus: how can I make the refresh function work?

Note: The reason I don't have the script in Blender's script path, is that the script can easily be deleted by accident.

Code if necessary:

bl_info = {
"author" : "Naioai Studios",
"version" : (1, 0, 0),
"blender" : (2, 7, 2),
"location" : "View 3D > Edit Mode > Tool Shelf",
"description" :
"Allows for semi-automatic shipping",
"warning" : "",
"wiki_url" : "",
"tracker_url" : "",
"category" : "1_Custom",
'support': 'COMMUNITY'
}

import bpy

def main():
print("Testing updated flflflflf")

class SimpleOperator(bpy.types.Operator):
bl_idname = "object.import_stickman"
bl_label = "Import stickman"

def execute(self, context):
main()
return {'FINISHED'}

def register():
bpy.utils.register_class(SimpleOperator)

def unregister():
bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
register()

#test call
bpy.ops.object.import_stickman()

• once you install the addon blender will take a copy of the file and save somewhere else and wont refer to the original file (it will be reading from the copy ) that's why reinstalling solve the problem but refreshing wont Mar 29, 2015 at 21:37
• What then, can be done to make the refresh function work? Mar 29, 2015 at 21:40
• Is there for instance a way of forcing Blender to refer to original file, or force Blender to copy every time it refreshes? Mar 29, 2015 at 21:42
• edit the copy that blender is using (in your addon details you will see file : destination ) Mar 29, 2015 at 21:43
• why not execute and test the script (only the main) until you get the final script then finish by making the addon Mar 29, 2015 at 21:44