1
$\begingroup$

My addon is constituted by two files scripts. when I push the 'Remove' button , one file stay on the addons folder.

enter image description here

How can I tell blender remove the two python files from the addons directory?

$\endgroup$
4
  • $\begingroup$ I'm not sure what you mean... You want blender to delete the python files from the addons directory? Isn't this already what happens? $\endgroup$
    – gandalf3
    Commented Feb 13, 2015 at 9:59
  • $\begingroup$ @gandalf3 yes, delete the python files from the addons directory. How can I do this ? $\endgroup$ Commented Feb 13, 2015 at 10:12
  • 2
    $\begingroup$ I'm voting to close this question as off-topic because is appears to be a misunderstanding of Python modules. If your addon is properly set-up as directory with your script files incl. a __init__.py, a click on Remove should delete the entire folder. $\endgroup$
    – CodeManX
    Commented Feb 13, 2015 at 11:06
  • $\begingroup$ @CoDEmanX ok thanks for this suggestion (I did not know it) $\endgroup$ Commented Feb 13, 2015 at 12:22

1 Answer 1

2
$\begingroup$

In my __init__.py file

I put this:

if "bpy" in locals():
    import imp
    imp.reload(myScript)

and everything works fine :)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .