@@ -1708,7 +1708,7 @@ def draw(self, context):
17081708 col .prop (topic , "modified_author" )
17091709
17101710 bcfxml = bcfstore .BcfStore .get_bcfxml ()
1711- bcf_topic = bcfxml .topics [topic .guid ]
1711+ bcf_topic = bcfxml .topics [topic .name ]
17121712
17131713 if bcf_topic .header :
17141714 layout .label (text = "Header Files:" )
@@ -1720,7 +1720,7 @@ def draw(self, context):
17201720 row .operator ("bim.open_uri" , icon = "URL" , text = "" ).uri = f .reference
17211721 else :
17221722 op = row .operator ("bim.open_uri" , icon = "FILE_FOLDER" , text = "" )
1723- op .uri = os .path .join (bcfxml .filepath , topic .guid , f .reference )
1723+ op .uri = os .path .join (bcfxml .filepath , topic .name , f .reference )
17241724 box .label (text = f .date )
17251725 #box.label(text=f.ifc_project)
17261726 #box.label(text=f.ifc_spatial_structure_element)
@@ -1751,7 +1751,7 @@ def draw(self, context):
17511751 row .operator ("bim.open_uri" , icon = "URL" , text = "" ).uri = topic .bim_snippet .reference
17521752 else :
17531753 op = row .operator ("bim.open_uri" , icon = "FILE_FOLDER" , text = "" )
1754- op .uri = os .path .join (bcfxml .filepath , topic .guid , topic .bim_snippet .reference )
1754+ op .uri = os .path .join (bcfxml .filepath , topic .name , topic .bim_snippet .reference )
17551755
17561756 if topic .document_references :
17571757 layout .label (text = "Document References:" )
@@ -1763,7 +1763,7 @@ def draw(self, context):
17631763 row .operator ("bim.open_uri" , icon = "URL" , text = "" ).uri = doc .reference
17641764 else :
17651765 op = row .operator ("bim.open_uri" , icon = "FILE_FOLDER" , text = "" )
1766- op .uri = os .path .join (bcfxml .filepath , topic .guid , doc .reference )
1766+ op .uri = os .path .join (bcfxml .filepath , topic .name , doc .reference )
17671767 row = box .row (align = True )
17681768 row .prop (doc , "description" )
17691769
@@ -1774,6 +1774,51 @@ def draw(self, context):
17741774 row .operator ("bim.view_bcf_topic" , text = related_topic .name ).topic_guid = related_topic .name
17751775
17761776
1777+ class BIM_PT_bcf_comments (Panel ):
1778+ bl_label = "BCF Comments"
1779+ bl_idname = "BIM_PT_bcf_comments"
1780+ bl_options = {"DEFAULT_CLOSED" }
1781+ bl_space_type = "PROPERTIES"
1782+ bl_region_type = "WINDOW"
1783+ bl_context = "scene"
1784+ bl_parent_id = "BIM_PT_bcf"
1785+
1786+ def draw (self , context ):
1787+ layout = self .layout
1788+ layout .use_property_split = True
1789+
1790+ scene = context .scene
1791+ props = bpy .context .scene .BCFProperties
1792+
1793+ if props .active_topic_index >= len (props .topics ):
1794+ layout .label (text = "No BCF project is loaded" )
1795+ return
1796+
1797+ row = layout .row ()
1798+ row .prop (props , "comment_text_width" )
1799+
1800+ topic = props .topics [props .active_topic_index ]
1801+ for comment in topic .comments :
1802+ box = self .layout .box ()
1803+ box .separator ()
1804+ author_text = "{} ({})" .format (comment .author , comment .date )
1805+ if comment .modified_author :
1806+ author_text = "*{} ({})" .format (comment .modified_author , comment .modified_date )
1807+ box .label (text = author_text , icon = "WORDWRAP_ON" )
1808+ box .separator ()
1809+ box .scale_y = 0.5
1810+ words = comment .comment .split ()
1811+ while words :
1812+ total_line_chars = 0
1813+ line_words = []
1814+ while words and total_line_chars < props .comment_text_width :
1815+ word = words .pop (0 )
1816+ line_words .append (word )
1817+ total_line_chars += len (word ) + 1 # 1 is for the space
1818+ box .label (text = " " .join (line_words ))
1819+ box .separator ()
1820+
1821+
17771822class BIM_PT_qa (Panel ):
17781823 bl_label = "BIMTester Quality Auditing"
17791824 bl_idname = "BIM_PT_qa"
@@ -2105,7 +2150,7 @@ class BIM_UL_topics(bpy.types.UIList):
21052150 def draw_item (self , context , layout , data , item , icon , active_data , active_propname ):
21062151 ob = data
21072152 if item :
2108- layout .prop (item , "name " , text = "" , emboss = False )
2153+ layout .prop (item , "title " , text = "" , emboss = False )
21092154 else :
21102155 layout .label (text = "" , translate = False )
21112156
0 commit comments