# Modal Operator not reloaded Blender 2.8

I have an addon with a modal operator, I change the file (Operator) which is in the Blender scripts directory (Windows AppData path) in an external editor.

Then I use reload scripts to reload the addon. The init.py file is updated, I can also see the new version in the preferences if I change it, but the operator is not updated.

To update the operator I have to restart Blender. The operator is unregister in the unregister method:

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

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


It is derived from another class which extends Operator:

class DP_OT_draw_operator(BL_UI_OT_draw_operator):

bl_idname = "object.dp_ot_draw_operator"
bl_options = {'REGISTER' }

def __init__(self):

super().__init__()

self.panel = BL_UI_Drag_Panel(100, 400, 300, 200)
self.panel.bg_color = (0.2, 0.2, 0.2, 0.9)


Could this be a problem or that the Operator is a modal one?

• A modal runs as long as the user interrupts its execution so I don't get why you have to reload something...? Also I don't get how this code is related to your question. First thing I'd try is running the code from one main file... probably obvious. – brockmann Mar 28 '19 at 9:42
• – batFINGER Mar 28 '19 at 11:58
• @brockmann : I am reloading because I am developing and changing the addon code - so I need to reload cause I am using an external editor. – Jayanam Mar 28 '19 at 14:36
• @batFINGER : Ok, I can derive like this but it doesnt solve the reload problem. The operator is just not reloaded when I change the file in an external editor – Jayanam Mar 28 '19 at 14:49
• @Jayanam Upvoted. However, it's hard to guess without having your environment. – brockmann Apr 1 '19 at 8:58