mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
Linked models - add description for georeferencing indicator
Example - https://files.catbox.moe/bkn9pn.png
This commit is contained in:
@@ -230,11 +230,11 @@ class Link(PropertyGroup):
|
|||||||
)
|
)
|
||||||
georeferenced: EnumProperty(
|
georeferenced: EnumProperty(
|
||||||
name="Georeferenced",
|
name="Georeferenced",
|
||||||
description="Georeferencing status: compatibility between host and linked model",
|
description="Georeferencing status, compatibility between host and linked model",
|
||||||
items=[
|
items=[
|
||||||
("NONE", "No Georef", "Linked model has no georeferencing"),
|
("NONE", "No Georef", "Linked model has no georeferencing", "QUESTION", 0),
|
||||||
("NOT_COMPATIBLE", "Not Compatible", "Has geo data but CRS differ from host"),
|
("NOT_COMPATIBLE", "Not Compatible", "Has geo data but CRS differ from host", "ERROR", 1),
|
||||||
("FULL_COMPATIBLE", "Full Compatible", "Both CRS name and vertical datum match host"),
|
("FULL_COMPATIBLE", "Full Compatible", "Both CRS name and vertical datum match host", "WORLD", 2),
|
||||||
],
|
],
|
||||||
default="NONE",
|
default="NONE",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -619,12 +619,14 @@ class BIM_UL_links(UIList):
|
|||||||
):
|
):
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
if item.is_loaded:
|
if item.is_loaded:
|
||||||
if item.georeferenced == "NONE":
|
from bonsai.bim.module.project.prop import Link
|
||||||
row.label(text="", icon="QUESTION")
|
|
||||||
elif item.georeferenced == "NOT_COMPATIBLE":
|
s = Link.bl_rna
|
||||||
row.label(text="", icon="ERROR")
|
geo_prop = s.properties["georeferenced"]
|
||||||
elif item.georeferenced == "FULL_COMPATIBLE":
|
assert isinstance(geo_prop, bpy.types.EnumProperty)
|
||||||
row.label(text="", icon="WORLD")
|
enum_item = geo_prop.enum_items[item.georeferenced]
|
||||||
|
op = row.operator("bim.show_description", text="", icon=enum_item.icon, emboss=False)
|
||||||
|
op.description = f"{geo_prop.description}\n{enum_item.name}: {enum_item.description}"
|
||||||
if item.has_transformation:
|
if item.has_transformation:
|
||||||
row.label(text="", icon="OBJECT_ORIGIN")
|
row.label(text="", icon="OBJECT_ORIGIN")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user