Add list of BCF topics in UI

This commit is contained in:
Dion Moult
2020-03-21 21:44:02 +11:00
parent 5454521c2a
commit 65a5dcbe25
4 changed files with 28 additions and 2 deletions
+5 -1
View File
@@ -393,7 +393,11 @@ class GetBcfTopics(bpy.types.Operator):
import bcfplugin
bcfplugin.openProject(bpy.context.scene.BIMProperties.bcf_file)
topics = bcfplugin.getTopics()
print(topics)
while len(bpy.context.scene.BIMProperties.bcf_topics) > 0:
bpy.context.scene.BIMProperties.bcf_topics.remove(0)
for topic in topics:
new = bpy.context.scene.BIMProperties.bcf_topics.add()
new.name = topic[0]
return {'FINISHED'}