mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +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"]
|
AlignType = Literal["CENTERLINE", "POSITIVE", "NEGATIVE"]
|
||||||
align_type: bpy.props.EnumProperty( # type: ignore [reportRedeclaration]
|
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:
|
if TYPE_CHECKING:
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ class PsetProperties(PropertyGroup):
|
|||||||
active_pset_name: StringProperty(name="Pset Name")
|
active_pset_name: StringProperty(name="Pset Name")
|
||||||
active_pset_type: EnumProperty(
|
active_pset_type: EnumProperty(
|
||||||
name="Active Pset Type",
|
name="Active Pset Type",
|
||||||
items=((i, i, "") for i in ("-", "PSET", "QTO")),
|
items=[(i, i, "") for i in ("-", "PSET", "QTO")],
|
||||||
default="-",
|
default="-",
|
||||||
)
|
)
|
||||||
properties: CollectionProperty(name="Properties", type=IfcProperty)
|
properties: CollectionProperty(name="Properties", type=IfcProperty)
|
||||||
|
|||||||
Reference in New Issue
Block a user