Skip to content

Commit

Permalink
Update 0.6.75
Browse files Browse the repository at this point in the history
Added extra conditionals to the Auto Reload function. This is directly to make working with addons like Primambase a little more fluid.
  • Loading branch information
ionthedev committed May 9, 2023
1 parent d4de8bc commit 248d963
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ReSprytile",
"author": "Jeiel Aranal Updated by: Brandon Friend",
# Final version number must be two numerals to support x.x.00
"version": (0, 6, 62),
"version": (0, 6, 75),
"blender": (3, 4, 0),
"description": "A utility for creating tile based low spec scenes with paint/map editor tools",
"location": "View3D > UI panel > ReSprytile",
Expand Down
11 changes: 8 additions & 3 deletions sprytile_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ def modal(self, context, event):
if context.scene.sprytile_data.auto_reload is False:
self.cancel(context)
return {'CANCELLED'}

if self.check_files():
for window in context.window_manager.windows:
for area in window.screen.areas:
Expand Down Expand Up @@ -1281,13 +1281,18 @@ def invoke(self, context, event):
self.last_check_time = None
self.check_files()
wm = context.window_manager
self._timer = wm.event_timer_add(2, window=context.window)
if self._timer is not None:
wm.event_timer_remove(self._timer)
self._timer = wm.event_timer_add(0.1, window=context.window)
wm.modal_handler_add(self)
return {'RUNNING_MODAL'}

def cancel(self, context):
wm = context.window_manager
wm.event_timer_remove(self._timer)
if isinstance(self._timer, bpy.types.Timer):
wm.event_timer_remove(self._timer)
self._timer = None



class UTIL_OP_SprytileUpdateCheck(bpy.types.Operator):
Expand Down

0 comments on commit 248d963

Please sign in to comment.