feat(rcf): get user panel back
This commit is contained in:
parent
44b077fbce
commit
a6dce98173
@ -30,7 +30,7 @@ update_list = {}
|
|||||||
|
|
||||||
SUPPORTED_DATABLOCKS = ['collections', 'meshes', 'objects',
|
SUPPORTED_DATABLOCKS = ['collections', 'meshes', 'objects',
|
||||||
'materials', 'textures', 'lights', 'cameras', 'actions', 'armatures', 'grease_pencils']
|
'materials', 'textures', 'lights', 'cameras', 'actions', 'armatures', 'grease_pencils']
|
||||||
SUPPORTED_TYPES = [ 'Material',
|
SUPPORTED_TYPES = ['Material',
|
||||||
'Texture', 'Light', 'Camera','Mesh', 'Grease Pencil', 'Object', 'Action', 'Armature','Collection', 'Scene']
|
'Texture', 'Light', 'Camera','Mesh', 'Grease Pencil', 'Object', 'Action', 'Armature','Collection', 'Scene']
|
||||||
|
|
||||||
# UTILITY FUNCTIONS
|
# UTILITY FUNCTIONS
|
||||||
@ -150,6 +150,7 @@ def draw_tick():
|
|||||||
|
|
||||||
drawer.draw()
|
drawer.draw()
|
||||||
|
|
||||||
|
# refresh_window()
|
||||||
# Upload
|
# Upload
|
||||||
upload_client_instance_position()
|
upload_client_instance_position()
|
||||||
return 1
|
return 1
|
||||||
|
22
ui.py
22
ui.py
@ -81,7 +81,7 @@ class SessionUsersPanel(bpy.types.Panel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
if operators.client_instance:
|
if operators.client_instance:
|
||||||
return operators.client_instance.status == client.RCFStatus.CONNECTED
|
return operators.client_instance.agent.is_alive()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
@ -91,23 +91,23 @@ class SessionUsersPanel(bpy.types.Panel):
|
|||||||
scene = context.scene
|
scene = context.scene
|
||||||
# Create a simple row.
|
# Create a simple row.
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
if operators.client_instance:
|
if operators.client_keys and len(operators.client_keys) > 0:
|
||||||
if len(operators.client_instance.property_map) > 0:
|
for key in operators.client_keys:
|
||||||
for key, values in operators.client_instance.property_map.items():
|
if 'Client' in key:
|
||||||
if 'client' in key:
|
|
||||||
info = ""
|
info = ""
|
||||||
item_box = row.box()
|
item_box = row.box()
|
||||||
detail_item_box = item_box.row()
|
detail_item_box = item_box.row()
|
||||||
|
|
||||||
if values.id == operators.client_instance.id:
|
username = key.split('/')[1]
|
||||||
|
if username == net_settings.username:
|
||||||
info = "(self)"
|
info = "(self)"
|
||||||
# detail_item_box = item_box.row()
|
# detail_item_box = item_box.row()
|
||||||
detail_item_box.label(
|
detail_item_box.label(
|
||||||
text="{} - {}".format(values.id.decode(), info))
|
text="{} - {}".format(username, info))
|
||||||
|
|
||||||
if operators.client.id.decode() not in key:
|
if net_settings.username not in key:
|
||||||
detail_item_box.operator(
|
detail_item_box.operator(
|
||||||
"session.snapview", text="", icon='VIEW_CAMERA').target_client = values.id.decode()
|
"session.snapview", text="", icon='VIEW_CAMERA').target_client = username
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
else:
|
else:
|
||||||
row.label(text="Empty")
|
row.label(text="Empty")
|
||||||
@ -127,7 +127,7 @@ class SessionPropertiesPanel(bpy.types.Panel):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
if operators.client_instance:
|
if operators.client_instance:
|
||||||
return operators.client_instance.agent.is_alive()
|
return operators.client_instance.agent.is_alive()
|
||||||
# return operators.client.status == client.RCFStatus.CONNECTED
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
@ -201,7 +201,7 @@ class SessionTaskPanel(bpy.types.Panel):
|
|||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
SessionSettingsPanel,
|
SessionSettingsPanel,
|
||||||
# SessionUsersPanel,
|
SessionUsersPanel,
|
||||||
SessionPropertiesPanel,
|
SessionPropertiesPanel,
|
||||||
# SessionTaskPanel,
|
# SessionTaskPanel,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user