@@ -910,8 +910,43 @@ class Constraint(PropertyGroup):
910910 user_defined_qualifier : StringProperty (name = "Custom Qualifier" )
911911
912912
913+ def updateBcfProjectName (self , context ):
914+ import bcfplugin
915+ bcfplugin .setProjectName (self .name )
916+
917+
918+ def updateBcfTopicAttribute (context , name , value ):
919+ import bcfplugin
920+ props = bpy .context .scene .BCFProperties
921+ topic = bcf .BcfStore .topics [props .active_topic_index ][1 ]
922+ if getattr (topic , name ) != value :
923+ setattr (topic , name , value )
924+ bcfplugin .modifyElement (topic , props .author )
925+
926+
927+ def updateBcfTopicName (self , context ):
928+ if bpy .context .scene .BCFProperties .name :
929+ updateBcfTopicAttribute (context , "title" , self .name )
930+
931+
932+ def updateBcfTopicType (self , context ):
933+ updateBcfTopicAttribute (context , "type" , self .topic_type )
934+
935+
936+ def updateBcfTopicStatus (self , context ):
937+ updateBcfTopicAttribute (context , "status" , self .topic_status )
938+
939+
940+ def updateBcfTopicPriority (self , context ):
941+ updateBcfTopicAttribute (context , "priority" , self .topic_priority )
942+
943+
944+ def updateBcfTopicStage (self , context ):
945+ updateBcfTopicAttribute (context , "stage" , self .topic_stage )
946+
947+
913948class BcfTopic (PropertyGroup ):
914- name : StringProperty (name = "Name" )
949+ name : StringProperty (name = "Name" , update = updateBcfTopicName )
915950
916951
917952class BcfTopicLabel (PropertyGroup ):
@@ -947,11 +982,6 @@ def refreshBcfTopic(self, context):
947982 RefreshBcfTopic .refresh (context )
948983
949984
950- def setBcfProjectName (self , context ):
951- import bcfplugin
952- bcfplugin .setProjectName (self .name )
953-
954-
955985class RefreshBcfTopic :
956986 props : None
957987 topic : None
@@ -1604,15 +1634,16 @@ class BIMProperties(PropertyGroup):
16041634
16051635
16061636class BCFProperties (PropertyGroup ):
1607- name : StringProperty (default = "" , name = "Project Name" , update = setBcfProjectName )
1637+ name : StringProperty (default = "" , name = "Project Name" , update = updateBcfProjectName )
1638+ author : StringProperty (default = "john@doe.com" , name = "Author Email" )
16081639 topics : CollectionProperty (name = "BCF Topics" , type = BcfTopic )
16091640 active_topic_index : IntProperty (name = "Active BCF Topic Index" , update = refreshBcfTopic )
16101641 viewpoints : EnumProperty (items = getBcfViewpoints , name = "BCF Viewpoints" )
16111642 topic_guid : StringProperty (default = "" , name = "Topic GUID" )
1612- topic_type : StringProperty (default = "" , name = "Topic Type" )
1613- topic_status : StringProperty (default = "" , name = "Topic Status" )
1614- topic_priority : StringProperty (default = "" , name = "Topic Priority" )
1615- topic_stage : StringProperty (default = "" , name = "Topic Stage" )
1643+ topic_type : StringProperty (default = "" , name = "Topic Type" , update = updateBcfTopicType )
1644+ topic_status : StringProperty (default = "" , name = "Topic Status" , update = updateBcfTopicStatus )
1645+ topic_priority : StringProperty (default = "" , name = "Topic Priority" , update = updateBcfTopicPriority )
1646+ topic_stage : StringProperty (default = "" , name = "Topic Stage" , update = updateBcfTopicStage )
16161647 topic_creation_date : StringProperty (default = "" , name = "Topic Date" )
16171648 topic_creation_author : StringProperty (default = "" , name = "Topic Author" )
16181649 topic_modified_date : StringProperty (default = "" , name = "Topic Modified Date" )
0 commit comments