mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
bbim, bcf - expose topic attributes to edit from bbim #3026
Previously they weren't editable if they were not defined in .bcf already, so previously it was kind of requiring them to be defined by some other software, not BBIM. Also changed couple prop names to make them more clear to users.
This commit is contained in:
@@ -138,7 +138,7 @@ class BcfTopic(PropertyGroup):
|
||||
modified_author: StringProperty(default="", name="Modified By")
|
||||
assigned_to: StringProperty(default="", name="Assigned To")
|
||||
due_date: StringProperty(default="", name="Due Date")
|
||||
description: StringProperty(default="", name="Description")
|
||||
description: StringProperty(default="", name="Topic Description")
|
||||
viewpoints: EnumProperty(items=lambda _, context: getBcfViewpoints(_, context), name="BCF Viewpoints")
|
||||
files: CollectionProperty(name="Files", type=StrProperty)
|
||||
reference_links: CollectionProperty(name="Reference Links", type=BcfReferenceLink)
|
||||
@@ -147,7 +147,7 @@ class BcfTopic(PropertyGroup):
|
||||
document_references: CollectionProperty(name="Document References", type=BcfDocumentReference)
|
||||
related_topics: CollectionProperty(name="Related Topics", type=StrProperty)
|
||||
comments: CollectionProperty(name="Comments", type=BcfComment)
|
||||
is_editable: BoolProperty(name="Is Editable", default=False, update=updateBcfTopicIsEditable)
|
||||
is_editable: BoolProperty(name="Edit Topic Attributes", default=False, update=updateBcfTopicIsEditable)
|
||||
|
||||
|
||||
class BCFProperties(PropertyGroup):
|
||||
|
||||
@@ -63,12 +63,12 @@ class BIM_PT_bcf(Panel):
|
||||
col.operator("bim.remove_bcf_topic", icon="REMOVE", text="")
|
||||
if props.active_topic_index < len(props.topics):
|
||||
topic = props.active_topic
|
||||
is_editable = topic.is_editable
|
||||
col.prop(topic, "is_editable", icon="CHECKMARK" if topic.is_editable else "GREASEPENCIL", icon_only=True)
|
||||
|
||||
if props.active_topic_index < len(props.topics):
|
||||
topic = props.active_topic
|
||||
row = layout.row()
|
||||
row.enabled = topic.is_editable
|
||||
row.enabled = is_editable
|
||||
row.prop(topic, "description", text="")
|
||||
|
||||
row = layout.row()
|
||||
@@ -78,18 +78,10 @@ class BIM_PT_bcf(Panel):
|
||||
row.operator("bim.remove_bcf_viewpoint", icon="X", text="")
|
||||
|
||||
col = layout.column(align=True)
|
||||
if topic.type:
|
||||
col.prop(topic, "type", emboss=topic.is_editable)
|
||||
if topic.status:
|
||||
col.prop(topic, "status", emboss=topic.is_editable)
|
||||
if topic.priority:
|
||||
col.prop(topic, "priority", emboss=topic.is_editable)
|
||||
if topic.stage:
|
||||
col.prop(topic, "stage", emboss=topic.is_editable)
|
||||
if topic.assigned_to:
|
||||
col.prop(topic, "assigned_to", emboss=topic.is_editable)
|
||||
if topic.due_date:
|
||||
col.prop(topic, "due_date", emboss=topic.is_editable)
|
||||
props = ("type", "status", "priority", "stage", "assigned_to", "due_date")
|
||||
for prop in props:
|
||||
if getattr(topic, prop) or is_editable:
|
||||
col.prop(topic, prop, emboss=is_editable)
|
||||
|
||||
col = layout.column(align=True)
|
||||
if topic.modified_date:
|
||||
|
||||
Reference in New Issue
Block a user