Skip to content

Commit 1dd89c3

Browse files
committed
Updated configuration management system
- Now uses template config files - Better (e.g working) saving mechanism.
1 parent 81bfd6e commit 1dd89c3

33 files changed

+850
-172
lines changed

scripts/mailIt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ PLAYLIST_LIMIT = 45
2626
CONFIG_DATA = vfxConfig.getBundles()
2727

2828
SEQUENCE_WHITELIST = CONFIG_DATA['mailIt']['settings']['sequence_whitelist']
29-
SHOT_STATUS_MAPPING = CONFIG_DATA['shotgun']['settings']['shot_status_mapping']
29+
SHOT_STATUS_MAPPING = vfxSG.schemaRead("Shot", "sg_status_list")
3030
RECIPIENTS_BY_VENDOR = CONFIG_DATA['mailIt']['settings']['recipients_by_vendor']
3131

3232
def getRecipentsByVendor(vendor):
@@ -109,7 +109,6 @@ def run():
109109

110110
if __name__ == "__main__":
111111
results = run()
112-
#msg, subject, recipients = run()
113112
if results == []:
114113
pass
115114
else:

scripts/mrFilmOut

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,9 @@ class ConfigPanel(QtWidgets.QGroupBox):
505505
currentDeliveryIndex = vfxSG.getAllDeliveries(handle)
506506
self.__batchNumberSpinner.setValue(currentDeliveryIndex)
507507

508-
destinations = [destination['name'] for destination in CONFIG_DATA['mrFilmOut']['settings']['delivery_destinations']]
508+
vendors = vfxSG.getVendors()
509+
destinations = [vendor.name for vendor in vendors]
510+
509511
self.__destinationCombo.addItems(destinations)
510512

511513
self.__deliveryMethodComboBox.addItems(self.DELIVERY_METHODS)

scripts/noteBao

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PLAYLIST_UNFOLD_LIMIT = 15
1919
PLAYLIST_LIMIT = 50
2020

2121
VERSION_COUNT_OPTIONS = [str(15), str(25), str(35), str(45)]
22+
SHOT_STATUS_MAPPING = sg.schemaRead("Shot", "sg_status_list")
2223

2324
PACKAGE_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

Comments
 (0)