Add brick operator accepts label parameter & add toggle for namespace editing

This commit is contained in:
Trashman247
2023-07-06 00:19:58 -07:00
parent a28b8c1cd4
commit 301800d8ed
6 changed files with 52 additions and 8 deletions
@@ -126,6 +126,7 @@ class AddBrick(bpy.types.Operator, Operator):
namespace=props.namespace,
brick_class=props.brick_equipment_class,
library=library,
label=props.new_brick_label
)
@@ -229,4 +230,14 @@ class SerializeBrick(bpy.types.Operator, Operator):
def description(cls, context, properties):
if properties.should_save_as:
return "Save Brick project to a selected file"
return "Save the Brick project"
return "Save the Brick project"
class AddBrickNamespace(bpy.types.Operator, Operator):
bl_idname = "bim.add_brick_namespace"
bl_label = "Add Brick Namespace"
def _execute(self, context):
props = context.scene.BIMBrickProperties
alias = props.new_brick_namespace_alias
uri = props.new_brick_namespace_uri
core.add_namespace(tool.Brick, alias=alias, uri=uri)