diff --git a/src/blenderbim/blenderbim/bim/data/ui/presets.py b/src/blenderbim/blenderbim/bim/data/ui/presets.py new file mode 100644 index 0000000000..90f9d874df --- /dev/null +++ b/src/blenderbim/blenderbim/bim/data/ui/presets.py @@ -0,0 +1,241 @@ +presets = { + "Basic": [ + "project", + "search", + "bcf", + "attribute", + "spatial", + "pset", + "qto" + ], + "Admin": [ + "project", + "search", + "bcf", + "root", + "unit", + "model", + "georeference", + "context", + "drawing", + "misc", + "attribute", + "type", + "spatial", + "void", + "aggregate", + "geometry", + "cobie", + "resource", + "cost", + "sequence", + "group", + "system", + "structural", + "boundary", + "profile", + "material", + "style", + "layer", + "owner", + "pset", + "qto", + "classification", + "constraint", + "document", + "pset_template", + "clash", + "lca", + "csv", + "bimtester", + "diff", + "patch", + "covetool", + "augin", + "debug" + ], + "BIM Coordination": [ + "project", + "search", + "bcf", + "root", + "unit", + "georeference", + "attribute", + "type", + "spatial", + "void", + "aggregate", + "owner", + "pset", + "qto", + "clash", + "csv", + "bimtester", + "diff", + "patch", + "debug" + ], + "Architecture": [ + "project", + "search", + "bcf", + "root", + "unit", + "model", + "georeference", + "context", + "drawing", + "misc", + "attribute", + "type", + "spatial", + "void", + "aggregate", + "geometry", + "group", + "system", + "boundary", + "profile", + "material", + "style", + "layer", + "owner", + "pset", + "qto", + "classification", + "pset_template", + "clash", + "csv" + ], + "Structural Engineering": [ + "project", + "search", + "bcf", + "root", + "unit", + "model", + "georeference", + "context", + "drawing", + "misc", + "attribute", + "type", + "spatial", + "void", + "aggregate", + "geometry", + "group", + "system", + "structural", + "boundary", + "profile", + "material", + "style", + "layer", + "owner", + "pset", + "qto", + "classification", + "pset_template", + "clash", + "csv" + ], + "MEP": [ + "project", + "search", + "bcf", + "root", + "unit", + "model", + "georeference", + "context", + "drawing", + "misc", + "attribute", + "type", + "spatial", + "void", + "aggregate", + "geometry", + "group", + "system", + "boundary", + "profile", + "material", + "style", + "layer", + "owner", + "pset", + "qto", + "classification", + "pset_template", + "clash", + "csv" + ], + "Quantity Surveying": [ + "project", + "search", + "attribute", + "spatial", + "void", + "pset", + "qto", + "classification", + "csv" + ], + "Model Enrichment": [ + "project", + "search", + "root", + "attribute", + "spatial", + "pset", + "qto", + "pset_template", + "csv", + "patch" + ], + "3D Visualisation": [ + "project", + "search", + "bcf", + "attribute", + "spatial", + "pset", + "qto" + ], + "4D Scheduling": [ + "project", + "search", + "attribute", + "spatial", + "resource", + "cost", + "sequence", + "pset", + "qto" + ], + "5D Cost Management": [ + "project", + "search", + "attribute", + "spatial", + "resource", + "cost", + "sequence", + "pset", + "qto", + "lca" + ], + "Facility Management": [ + "project", + "search", + "attribute", + "spatial", + "cobie", + "pset", + "qto", + "lca" + ] +} \ No newline at end of file diff --git a/src/blenderbim/blenderbim/bim/operator.py b/src/blenderbim/blenderbim/bim/operator.py index b3921ff817..44eda63619 100644 --- a/src/blenderbim/blenderbim/bim/operator.py +++ b/src/blenderbim/blenderbim/bim/operator.py @@ -442,8 +442,12 @@ class ConfigureVisibility(bpy.types.Operator): def draw(self, context): layout = self.layout - grid = layout.column_flow(columns=3) + + layout.prop(context.scene.BIMProperties, "ui_preset") + layout.separator() + layout.label(text="Adjust the modules to your liking:") + grid = layout.column_flow(columns=3) for module in context.scene.BIMProperties.module_visibility: split = grid.split() col = split.column() diff --git a/src/blenderbim/blenderbim/bim/prop.py b/src/blenderbim/blenderbim/bim/prop.py index d8a8a5e066..1bd1401b50 100644 --- a/src/blenderbim/blenderbim/bim/prop.py +++ b/src/blenderbim/blenderbim/bim/prop.py @@ -41,6 +41,21 @@ cwd = os.path.dirname(os.path.realpath(__file__)) materialpsetnames_enum = [] +def update_preset(self, context): + from blenderbim.bim.data.ui.presets import presets + + module_visibility = context.scene.BIMProperties.module_visibility + chosen_preset = context.scene.BIMProperties.ui_preset + + for module in module_visibility: + module.is_visible = module.name in presets[chosen_preset] + + +def load_presets(self, context): + from blenderbim.bim.data.ui.presets import presets + return [(preset,preset,"") for preset in presets.keys()] + + def update_is_visible(self, context): from blenderbim.bim import modules @@ -203,6 +218,12 @@ class ModuleVisibility(PropertyGroup): class BIMProperties(PropertyGroup): + ui_preset: EnumProperty( + name="UI Preset", + description="Select from one of the available UI presets, or configure the modules to your preference below", + update=update_preset, + items=load_presets + ) module_visibility: CollectionProperty(name="Module Visibility", type=ModuleVisibility) schema_dir: StringProperty( default=os.path.join(cwd, "schema") + os.path.sep, name="Schema Directory", update=update_schema_dir