Implement BCF related topics

This commit is contained in:
Dion Moult
2020-03-25 17:55:52 +11:00
parent 1971bfe014
commit 3a590e4ba1
4 changed files with 34 additions and 1 deletions
+13 -1
View File
@@ -404,6 +404,18 @@ class GetBcfTopics(bpy.types.Operator):
return {'FINISHED'}
class ViewBcfTopic(bpy.types.Operator):
bl_idname = 'bim.view_bcf_topic'
bl_label = 'Get BCF Topic'
topic_guid: bpy.props.StringProperty()
def execute(self, context):
for index, topic in enumerate(bcf.BcfStore.topics):
if str(topic[1].xmlId) == self.topic_guid:
bpy.context.scene.BCFProperties.active_topic_index = index
return {'FINISHED'}
class ActivateBcfViewpoint(bpy.types.Operator):
bl_idname = 'bim.activate_bcf_viewpoint'
bl_label = 'Activate BCF Viewpoint'
@@ -411,7 +423,7 @@ class ActivateBcfViewpoint(bpy.types.Operator):
def execute(self, context):
import bcfplugin
topics = bcfplugin.getTopics()
topics = bcf.BcfStore.topics
if not topics:
return {'FINISHED'}
topic = topics[bpy.context.scene.BCFProperties.active_topic_index][1]