@@ -19,6 +19,7 @@ PLAYLIST_UNFOLD_LIMIT = 15
1919PLAYLIST_LIMIT = 50
2020
2121VERSION_COUNT_OPTIONS = [str (15 ), str (25 ), str (35 ), str (45 )]
22+ SHOT_STATUS_MAPPING = sg .schemaRead ("Shot" , "sg_status_list" )
2223
2324PACKAGE_STATUS_MAPPING = {'ip' : 'Packaged' }
2425
@@ -130,7 +131,7 @@ class NoteBaoUi(QtWidgets.QMainWindow):
130131 os .mkdir (path )
131132 except :
132133 pass
133- print ( selectedVersions )
134+
134135 for version in selectedVersions [playlist .playlistObj .name ]:
135136 versionNotes = version .getNotes ()
136137 if versionNotes != []:
@@ -149,12 +150,11 @@ class NoteBaoUi(QtWidgets.QMainWindow):
149150
150151 for attachment in note .attachments :
151152 fileName = attachment .download (os .path .join (path , version .name ))
152- print ("!!!" , fileName )
153153 attachmentFileNames = attachmentFileNames + "{0}, " .format (os .path .split (fileName )[1 ])
154154
155- versionList = [version .info ['entity' ]['name' ], version .name , CONFIG_DATA [ 'shotgun' ][ 'settings' ][ 'shot_status_mapping' ] [version .shot .status ], noteStr , note .createdAt , version .status , attachmentFileNames ]
155+ versionList = [version .info ['entity' ]['name' ], version .name , SHOT_STATUS_MAPPING [version .shot .status ], noteStr , note .createdAt , version .status , attachmentFileNames ]
156156 else :
157- versionList = [version .info ['entity' ]['name' ], version .name , CONFIG_DATA [ 'shotgun' ][ 'settings' ][ 'shot_status_mapping' ] [version .shot .status ], noteStr , note .createdAt , version .status , "" ]
157+ versionList = [version .info ['entity' ]['name' ], version .name , SHOT_STATUS_MAPPING [version .shot .status ], noteStr , note .createdAt , version .status , "" ]
158158
159159 output .append (versionList )
160160
@@ -283,7 +283,8 @@ class PlaylistTree(QtWidgets.QTreeWidget):
283283 versions = {}
284284 for i in range (self .topLevelItemCount ()):
285285 topItem = self .topLevelItem (i )
286- versions [topItem .text (1 )] = []
286+ if not topItem .text (1 ) in versions :
287+ versions [topItem .text (1 )] = []
287288 for i in range (topItem .childCount ()):
288289 childItem = topItem .child (i )
289290 if childItem .checkState (0 ) == QtCore .Qt .CheckState .Checked :
0 commit comments