Implement remove BCF related topic

This commit is contained in:
Dion Moult
2020-12-28 19:56:57 +11:00
parent ea83238e7a
commit 37e56c4011
4 changed files with 23 additions and 5 deletions
@@ -1038,6 +1038,22 @@ class RemoveBcfDocumentReference(bpy.types.Operator):
return {"FINISHED"}
class RemoveBcfRelatedTopic(bpy.types.Operator):
bl_idname = "bim.remove_bcf_related_topic"
bl_label = "Remove BCF Related Topic"
index: bpy.props.IntProperty()
def execute(self, context):
bcfxml = bcfstore.BcfStore.get_bcfxml()
props = bpy.context.scene.BCFProperties
blender_topic = props.topics[props.active_topic_index]
topic = bcfxml.topics[blender_topic.name]
del topic.related_topics[self.index]
bcfxml.edit_topic(topic)
bpy.ops.bim.load_bcf_topic(topic_guid = topic.guid, topic_index = props.active_topic_index)
return {"FINISHED"}
class RemoveBcfComment(bpy.types.Operator):
bl_idname = "bim.remove_bcf_comment"
bl_label = "Remove BCF Comment"