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$
  • $\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 Feb 13 '15 at 9:59
  • $\begingroup$ @gandalf3 yes, delete the python files from the addons directory. How can I do this ? $\endgroup$ – Issanou Kamardine IK Feb 13 '15 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 Feb 13 '15 at 11:06
  • $\begingroup$ @CoDEmanX ok thanks for this suggestion (I did not know it) $\endgroup$ – Issanou Kamardine IK Feb 13 '15 at 12:22
2
$\begingroup$

In my __init__.py file

I put this:

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

and everything works fine :)

| improve this answer | |
$\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.