mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix errors reregistering Bonsai
Items generators were exhausted at the first register leading to errors like 'TypeError: EnumProperty(..., default='-'): not found in enum members' preventing reregistration.
This commit is contained in:
@@ -498,7 +498,7 @@ class AlignProduct(bpy.types.Operator):
|
||||
|
||||
AlignType = Literal["CENTERLINE", "POSITIVE", "NEGATIVE"]
|
||||
align_type: bpy.props.EnumProperty( # type: ignore [reportRedeclaration]
|
||||
items=((i, i, "") for i in get_args(AlignType))
|
||||
items=[(i, i, "") for i in get_args(AlignType)]
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -245,7 +245,7 @@ class PsetProperties(PropertyGroup):
|
||||
active_pset_name: StringProperty(name="Pset Name")
|
||||
active_pset_type: EnumProperty(
|
||||
name="Active Pset Type",
|
||||
items=((i, i, "") for i in ("-", "PSET", "QTO")),
|
||||
items=[(i, i, "") for i in ("-", "PSET", "QTO")],
|
||||
default="-",
|
||||
)
|
||||
properties: CollectionProperty(name="Properties", type=IfcProperty)
|
||||
|
||||
Reference in New Issue
Block a user