mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
The profile manager now only manages named profiles
This commit is contained in:
@@ -41,7 +41,7 @@ class ProfileData:
|
||||
|
||||
@classmethod
|
||||
def total_profiles(cls):
|
||||
return len(tool.Ifc.get().by_type("IfcProfileDef"))
|
||||
return len([p for p in tool.Ifc.get().by_type("IfcProfileDef") if p.ProfileName])
|
||||
|
||||
@classmethod
|
||||
def profile_classes(cls):
|
||||
|
||||
@@ -34,6 +34,8 @@ class LoadProfiles(bpy.types.Operator):
|
||||
props.profiles.clear()
|
||||
|
||||
for profile in tool.Ifc.get().by_type("IfcProfileDef"):
|
||||
if not profile.ProfileName:
|
||||
continue
|
||||
new = props.profiles.add()
|
||||
new.ifc_definition_id = profile.id()
|
||||
new.name = profile.ProfileName or "Unnamed"
|
||||
|
||||
@@ -41,7 +41,7 @@ class BIM_PT_profiles(Panel):
|
||||
self.props = context.scene.BIMProfileProperties
|
||||
|
||||
row = self.layout.row(align=True)
|
||||
row.label(text="{} Profiles Found".format(ProfileData.data["total_profiles"]), icon="SNAP_GRID")
|
||||
row.label(text=f"{ProfileData.data['total_profiles']} Named Profiles Found", icon="SNAP_GRID")
|
||||
if self.props.is_editing:
|
||||
row.operator("bim.disable_profile_editing_ui", text="", icon="CANCEL")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user