fix : draw active mode UI side pannel

This commit is contained in:
Fabian 2021-07-01 11:58:52 +02:00
parent a8f96581c5
commit 3a5a5fc633
3 changed files with 16 additions and 17 deletions

View File

@ -444,9 +444,8 @@ class UserModeWidget(Widget):
def draw(self):
user_selection = self.data.get('selected_objects')
location = self.data.get('view_corners')
positions = [tuple(coord) for coord in location]
viewport_coord = positions[6]
area, region, rv3d = view3d_find()
viewport_coord = project_to_viewport(region, rv3d, (0, 0))
for select_obj in user_selection:
obj = find_from_attr("uuid", select_obj, bpy.data.objects)

View File

@ -363,7 +363,7 @@ class SessionUserSync(Timer):
new_key = ui_users.add()
new_key.name = user
new_key.username = user
# if user != self.settings.username:
if user != self.settings.username:
renderer.add_widget(
f"{user}_cam", UserFrustumWidget(user))
renderer.add_widget(

View File

@ -343,10 +343,10 @@ class SESSION_PT_user(bpy.types.Panel):
box = row.box()
split = box.split(factor=0.35)
split.label(text="user")
split = split.split(factor=0.5)
split.label(text="location")
split = split.split(factor=0.3)
split.label(text="mode")
split.label(text="frame")
split.label(text="location")
split.label(text="ping")
row = layout.row()
@ -430,10 +430,10 @@ class SESSION_UL_users(bpy.types.UIList):
status_icon = 'FAKE_USER_ON'
split = layout.split(factor=0.35)
split.label(text=item.username, icon=status_icon)
split = split.split(factor=0.5)
split.label(text=scene_current)
split = split.split(factor=0.3)
split.label(icon=mode_icon)
split.label(text=frame_current)
split.label(text=scene_current)
split.label(text=ping)