mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
bim.add_group - use dynamic description to clarify when it's adding subgroups
It was kind of confusing since the icon and everything else was the same.
This commit is contained in:
@@ -110,6 +110,12 @@ class AddGroup(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
group: bpy.props.IntProperty()
|
group: bpy.props.IntProperty()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def description(cls, context, properties) -> str:
|
||||||
|
if properties.group:
|
||||||
|
return "Add new subgroup to the active IfcGroup."
|
||||||
|
return "Add new IfcGroup."
|
||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
result = ifcopenshell.api.group.add_group(tool.Ifc.get())
|
result = ifcopenshell.api.group.add_group(tool.Ifc.get())
|
||||||
if self.group:
|
if self.group:
|
||||||
|
|||||||
Reference in New Issue
Block a user