diff --git a/__init__.py b/__init__.py index 81d2295..1002c39 100644 --- a/__init__.py +++ b/__init__.py @@ -104,7 +104,7 @@ class ReplicatedDatablock(bpy.types.PropertyGroup): type_name: bpy.props.StringProperty() bl_delay_refresh: bpy.props.FloatProperty() bl_delay_apply: bpy.props.FloatProperty() - use_as_filter: bpy.props.BoolProperty(default=False) + use_as_filter: bpy.props.BoolProperty(default=True) icon: bpy.props.StringProperty() class SessionProps(bpy.types.PropertyGroup): diff --git a/ui.py b/ui.py index 168306b..cbf49dd 100644 --- a/ui.py +++ b/ui.py @@ -286,14 +286,17 @@ class SESSION_PT_outliner(bpy.types.Panel): row_major=True, columns=0, even_columns=True, even_rows=False, align=True) for item in settings.supported_datablock: - col = flow.column() + col = flow.column(align=True) col.prop(item,"use_as_filter",text="", icon=item.icon) # row.prop(item, "is_replicated", text="") row = layout.row(align=True) # Property area # area_msg = row.box() - client_keys = operators.client.list() + + types_filter = [t.type_name for t in settings.supported_datablock if t.use_as_filter] + client_keys = [key for key in operators.client.list() if operators.client.get(uuid=key).str_type in types_filter] + if client_keys and len(client_keys) > 0: col = layout.column(align=True) @@ -301,7 +304,7 @@ class SESSION_PT_outliner(bpy.types.Panel): draw_property(context, col, key) else: - col.label(text="Empty") + row.label(text="Empty") classes = (