Skip to content

Commit

Permalink
area tag redraw loops as func
Browse files Browse the repository at this point in the history
  • Loading branch information
Pullusb committed Feb 26, 2024
1 parent 9b8d259 commit e93dd02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snippets/dev/refresh_all_areas_redraw.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Refresh interface on all areas
def refresh_viewports():
for area in bpy.context.screen.areas:
area.tag_redraw()
5 changes: 5 additions & 0 deletions snippets/dev/refresh_viewport_with_area_redraw.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## refresh all 3D in viewport
def refresh_viewports():
for area in bpy.context.screen.areas:
if area.type == 'VIEW_3D':
area.tag_redraw()

0 comments on commit e93dd02

Please sign in to comment.