fix: ui common props right

This commit is contained in:
Swann Martinez 2019-07-19 18:22:02 +02:00
parent 3e958e3390
commit 88e4bfbc0b
No known key found for this signature in database
GPG Key ID: 414CCAFD8DA720E1
2 changed files with 3 additions and 5 deletions

View File

@ -75,7 +75,7 @@ def save_session_config(self,context):
config["start_empty"] = self.start_empty config["start_empty"] = self.start_empty
config["enable_presence"] = self.enable_presence config["enable_presence"] = self.enable_presence
config["client_color"] = [self.client_color.r,self.client_color.g,self.client_color.b] config["client_color"] = [self.client_color.r,self.client_color.g,self.client_color.b]
rep_type = {} rep_type = {}
for bloc in self.supported_datablock: for bloc in self.supported_datablock:
config["replicated_types"][bloc.type_name] = bloc.is_replicated config["replicated_types"][bloc.type_name] = bloc.is_replicated

6
ui.py
View File

@ -175,6 +175,7 @@ class SESSION_PT_user(bpy.types.Panel):
def get_client_key(item): def get_client_key(item):
return item[0] return item[0]
class SESSION_PT_properties(bpy.types.Panel): class SESSION_PT_properties(bpy.types.Panel):
bl_idname = "MULTIUSER_PROPERTIES_PT_panel" bl_idname = "MULTIUSER_PROPERTIES_PT_panel"
bl_label = "Replicated properties" bl_label = "Replicated properties"
@ -211,7 +212,6 @@ class SESSION_PT_properties(bpy.types.Panel):
area_msg = row.box() area_msg = row.box()
client_keys = client.instance.list() client_keys = client.instance.list()
if client_keys and len(client_keys) > 0: if client_keys and len(client_keys) > 0:
for item in sorted(client_keys, key=get_client_key): for item in sorted(client_keys, key=get_client_key):
owner = 'toto' owner = 'toto'
try: try:
@ -229,7 +229,7 @@ class SESSION_PT_properties(bpy.types.Panel):
detail_item_box.label(text="{} ".format(owner)) detail_item_box.label(text="{} ".format(owner))
right_icon = "DECORATE_UNLOCKED" right_icon = "DECORATE_UNLOCKED"
if owner == net_settings.username: if owner == net_settings.username or owner == "Common" :
right_icon="DECORATE_UNLOCKED" right_icon="DECORATE_UNLOCKED"
else: else:
@ -237,8 +237,6 @@ class SESSION_PT_properties(bpy.types.Panel):
ro = detail_item_box.operator("session.right", text="",emboss=net_settings.is_admin, icon=right_icon) ro = detail_item_box.operator("session.right", text="",emboss=net_settings.is_admin, icon=right_icon)
ro.key = item[0] ro.key = item[0]
# detail_item_box.operator(
# "session.remove_prop", text="", icon="X").property_path = key
else: else:
area_msg.label(text="Empty") area_msg.label(text="Empty")