feat: auto refresh the viewport for overlay update

This commit is contained in:
Swann 2019-09-15 22:43:33 +02:00
parent 8328da2ec3
commit 5c676b8f16
3 changed files with 7 additions and 1 deletions

View File

@ -37,6 +37,7 @@ class BlUser(BlDatablock):
if presence.renderer:
presence.renderer.draw_client_camera(self.buffer['name'], self.buffer['location'],self.buffer['color'])
presence.renderer.draw_client_selection(self.buffer['name'], self.buffer['color'],self.buffer['selected_objects'])
presence.refresh_3d_view()
def dump(self,pointer=None):

View File

@ -31,6 +31,10 @@ def view3d_find():
return None, None, None
def refresh_3d_view():
area, region, rv3d = view3d_find()
area.tag_redraw()
def get_target(region, rv3d, coord):
target = [0, 0, 0]
@ -211,6 +215,7 @@ class DrawFactory(object):
def draw3d_callback(self):
bgl.glLineWidth(1.5)
bgl.glEnable(bgl.GL_DEPTH_TEST)
try:
for shader, batch, color in self.d3d_items.values():
shader.bind()

2
ui.py
View File

@ -15,7 +15,7 @@ ICONS_PROP_STATES = ['TRIA_DOWN', # ADDED
class SESSION_PT_settings(bpy.types.Panel):
"""Settings panel"""
bl_idname = "MULTIUSER_SETTINGS_PT_panel"
bl_label = "Settings"
bl_label = "Session"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Multiuser"