feat: remove headers

This commit is contained in:
Swann Martinez
2020-03-04 14:12:56 +01:00
parent f03a3aadff
commit efa243211b

View File

@ -58,16 +58,16 @@ class SessionPrefs(bpy.types.AddonPreferences):
subtype="DIR_PATH", subtype="DIR_PATH",
default=environment.DEFAULT_CACHE_DIR) default=environment.DEFAULT_CACHE_DIR)
# for UI # for UI
category: bpy.props.EnumProperty( # category: bpy.props.EnumProperty(
name="Category", # name="Category",
description="Preferences Category", # description="Preferences Category",
items=[ # items=[
('INFO', "Information", "Information about this add-on"), # ('INFO', "Information", "Information about this add-on"),
('CONFIG', "Configuration", "Configuration about this add-on"), # ('CONFIG', "Configuration", "Configuration about this add-on"),
# ('UPDATE', "Update", "Update this add-on"), # ('UPDATE', "Update", "Update this add-on"),
], # ],
default='INFO' # default='INFO'
) # )
conf_session_identity_expanded: bpy.props.BoolProperty( conf_session_identity_expanded: bpy.props.BoolProperty(
name="Identity", name="Identity",
description="Identity", description="Identity",
@ -88,7 +88,6 @@ class SessionPrefs(bpy.types.AddonPreferences):
description="timings", description="timings",
default=False default=False
) )
conf_session_cache_expanded: bpy.props.BoolProperty( conf_session_cache_expanded: bpy.props.BoolProperty(
name="Cache", name="Cache",
description="cache", description="cache",
@ -99,78 +98,78 @@ class SessionPrefs(bpy.types.AddonPreferences):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
layout.row().prop(self, "category", expand=True) # layout.row().prop(self, "category", expand=True)
if self.category == 'INFO': # if self.category == 'INFO':
layout.separator() # layout.separator()
layout.label(text="WIP") # layout.label(text="Enable real-time collaborative workflow inside blender")
if self.category == 'CONFIG': # if self.category == 'CONFIG':
grid = layout.column() grid = layout.column()
# USER INFORMATIONS # USER INFORMATIONS
box = grid.box() box = grid.box()
box.prop( box.prop(
self, "conf_session_identity_expanded", text="User informations", self, "conf_session_identity_expanded", text="User informations",
icon='DISCLOSURE_TRI_DOWN' if self.conf_session_identity_expanded icon='DISCLOSURE_TRI_DOWN' if self.conf_session_identity_expanded
else 'DISCLOSURE_TRI_RIGHT', emboss=False) else 'DISCLOSURE_TRI_RIGHT', emboss=False)
if self.conf_session_identity_expanded: if self.conf_session_identity_expanded:
box.row().prop(self, "username", text="name") box.row().prop(self, "username", text="name")
box.row().prop(self, "client_color", text="color") box.row().prop(self, "client_color", text="color")
# NETWORK SETTINGS # NETWORK SETTINGS
box = grid.box() box = grid.box()
box.prop( box.prop(
self, "conf_session_net_expanded", text="Netorking", self, "conf_session_net_expanded", text="Netorking",
icon='DISCLOSURE_TRI_DOWN' if self.conf_session_net_expanded icon='DISCLOSURE_TRI_DOWN' if self.conf_session_net_expanded
else 'DISCLOSURE_TRI_RIGHT', emboss=False)
if self.conf_session_net_expanded:
box.row().prop(self, "ip", text="Address")
row = box.row()
row.label(text="Port:")
row.prop(self, "port", text="Address")
row = box.row()
row.label(text="Start with an empty scene:")
row.prop(self, "start_empty", text="")
table = box.box()
table.row().prop(
self, "conf_session_timing_expanded", text="Refresh rates",
icon='DISCLOSURE_TRI_DOWN' if self.conf_session_timing_expanded
else 'DISCLOSURE_TRI_RIGHT', emboss=False) else 'DISCLOSURE_TRI_RIGHT', emboss=False)
if self.conf_session_net_expanded: if self.conf_session_timing_expanded:
box.row().prop(self, "ip", text="Address") line = table.row()
row = box.row() line.label(text=" ")
row.label(text="Port:") line.separator()
row.prop(self, "port", text="Address") line.label(text="refresh (sec)")
row = box.row() line.label(text="apply (sec)")
row.label(text="Start with an empty scene:")
row.prop(self, "start_empty", text="")
table = box.box() for item in self.supported_datablocks:
table.row().prop( line = table.row(align=True)
self, "conf_session_timing_expanded", text="Refresh rates", line.label(text="", icon=item.icon)
icon='DISCLOSURE_TRI_DOWN' if self.conf_session_timing_expanded line.prop(item, "bl_delay_refresh", text="")
else 'DISCLOSURE_TRI_RIGHT', emboss=False) line.prop(item, "bl_delay_apply", text="")
# HOST SETTINGS
box = grid.box()
box.prop(
self, "conf_session_hosting_expanded", text="Hosting",
icon='DISCLOSURE_TRI_DOWN' if self.conf_session_hosting_expanded
else 'DISCLOSURE_TRI_RIGHT', emboss=False)
if self.conf_session_hosting_expanded:
box.row().prop(self, "right_strategy", text="Right model")
row = box.row()
row.label(text="Start with an empty scene:")
row.prop(self, "start_empty", text="")
if self.conf_session_timing_expanded: # CACHE SETTINGS
line = table.row() box = grid.box()
line.label(text=" ") box.prop(
line.separator() self, "conf_session_cache_expanded", text="Cache",
line.label(text="refresh (sec)") icon='DISCLOSURE_TRI_DOWN' if self.conf_session_cache_expanded
line.label(text="apply (sec)") else 'DISCLOSURE_TRI_RIGHT', emboss=False)
if self.conf_session_cache_expanded:
for item in self.supported_datablocks: box.row().prop(self, "cache_directory", text="Cache directory")
line = table.row(align=True)
line.label(text="", icon=item.icon)
line.prop(item, "bl_delay_refresh", text="")
line.prop(item, "bl_delay_apply", text="")
# HOST SETTINGS
box = grid.box()
box.prop(
self, "conf_session_hosting_expanded", text="Hosting",
icon='DISCLOSURE_TRI_DOWN' if self.conf_session_hosting_expanded
else 'DISCLOSURE_TRI_RIGHT', emboss=False)
if self.conf_session_hosting_expanded:
box.row().prop(self, "right_strategy", text="Right model")
row = box.row()
row.label(text="Start with an empty scene:")
row.prop(self, "start_empty", text="")
# CACHE SETTINGS
box = grid.box()
box.prop(
self, "conf_session_cache_expanded", text="Cache",
icon='DISCLOSURE_TRI_DOWN' if self.conf_session_cache_expanded
else 'DISCLOSURE_TRI_RIGHT', emboss=False)
if self.conf_session_cache_expanded:
box.row().prop(self, "cache_directory", text="Cache directory")
def generate_supported_types(self): def generate_supported_types(self):
self.supported_datablocks.clear() self.supported_datablocks.clear()