mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
bonsai bcf - fix issue when viewpoints were not reloaded
when new bcf file was loaded
This commit is contained in:
@@ -126,7 +126,8 @@ class LoadBcfTopics(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
bcfxml = bcfstore.BcfStore.get_bcfxml()
|
bcfxml = bcfstore.BcfStore.get_bcfxml()
|
||||||
assert bcfxml
|
assert bcfxml
|
||||||
context.scene.BCFProperties.topics.clear()
|
props = context.scene.BCFProperties
|
||||||
|
props.topics.clear()
|
||||||
# workaround, one non standard topic would break reading entire bcf
|
# workaround, one non standard topic would break reading entire bcf
|
||||||
# ignored these topics ATM
|
# ignored these topics ATM
|
||||||
# happens on non standard nodes or on missing nodes in markup
|
# happens on non standard nodes or on missing nodes in markup
|
||||||
@@ -138,8 +139,10 @@ class LoadBcfTopics(bpy.types.Operator):
|
|||||||
print("Problems on reading topic, thus ignored: {}".format(topic_guid))
|
print("Problems on reading topic, thus ignored: {}".format(topic_guid))
|
||||||
continue
|
continue
|
||||||
for index, topic_guid in enumerate(topics2use):
|
for index, topic_guid in enumerate(topics2use):
|
||||||
new = context.scene.BCFProperties.topics.add()
|
new = props.topics.add()
|
||||||
bpy.ops.bim.load_bcf_topic(topic_guid=topic_guid, topic_index=index)
|
bpy.ops.bim.load_bcf_topic(topic_guid=topic_guid, topic_index=index)
|
||||||
|
|
||||||
|
props.refresh_topic(context)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user