-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConformAll.py
executable file
·2895 lines (2462 loc) · 126 KB
/
ConformAll.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/usr/bin/env python
# See the README.md for install
import os
import json
import csv
import datetime
from pprint import pprint
import sys
import time
import platform
#import opentimelineio as otio
from multiprocessing.shared_memory import ShareableList,SharedMemory
from multiprocessing import resource_tracker
#sys.path.append('/Library/Application Support/Blackmagic Design/DaVinci Resolve/Developer/Scripting/Modules')
#import DaVinciResolveScript as dvr
ICON = "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAL5lWElmTU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAMAAAExAAIAAAANAAAAcgEyAAIAAAAUAAAAgIdpAAQAAAABAAAAlAAAAAAAAABgAAAAAQAAAGAAAAABR0lNUCAyLjEwLjM0AAAyMDI1OjAyOjA2IDE1OjI2OjAxAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAACAoAMABAAAAAEAAACAAAAAAD9ZGY0AAAAJcEhZcwAADsQAAA7EAZUrDhsAAAMCaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIj4KICAgICAgICAgPHRpZmY6WVJlc29sdXR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QE9rLGPJEjHrKuQEZGCcRTdsK8BO2KWA2CyArMwKWdMBhBJ8KsKP5r5BBisAFDgEIrAfCfYgvx0A+hbLtLYGghm7n1+dZ++hH85NI2gllPyqGEzYDLLSw4r2/wHGfbLi0tli5QAAAABJRU5ErkJggg=="
class MyMpClip():
'''
This class creates a virtual media clip object to use when the imported timeline refer to a clip that is linked to corrupted
media or the media does not exist at all. This class uses the "Edit Index" of DaVinci Resolve to create the virtual clip.
If the High Resolution media exists at conform time, that media will come online.
'''
def __init__(self,
file_name:str,
video_codec:str,
name:str,
recordFrame:int, # timeline clip position frame
sourceIn:int, # clip cut in frame
sourceOut:int, # clip cut out frame
startTC:str, # clip start tc
endTC:str, # clip end tc
track:int) -> None:
self._properties = {
"File Name":file_name,
"Video Codec":video_codec,
"Reel Name":file_name,
"Clip Name":name,
"Clip Color":"Apricot",
"Start TC":startTC,
"End TC":endTC
}
self._recordFrame = recordFrame
self._sourceIn = sourceIn
self._sourceOut = sourceOut
self._track = track
self._mpClip = self
self._timelineClip = None
def setTimelineClip(self,clip):
self._timelineClip = clip
def GetClipProperty(self,key:str=None):
'''
Encapsulation of the API GetClipProperty method.
'''
if isinstance(self._mpClip,MyMpClip):
if key:
return self._properties.get(key,"")
else:
return self._properties
else:
return self._mpClip.GetClipProperty(key)
def SetClipProperty(self,key:str,value:any):
'''
Encapsulation of the API SetClipProperty method.
'''
if isinstance(self._mpClip,MyMpClip):
self._properties[key] = value
else:
self._mpClip.SetClipProperty(key,value)
def SetClipColor(self,colorName):
'''
This method encapsulates the API SetClipColor method, but the color is always "Apricot",
no matters what color is send in the argument.
'''
colorName = "Apricot"
if isinstance(self._mpClip,MyMpClip):
self._properties["Clip Color"] = colorName
else:
if len(self._mpClip.GetClipColor()) == 0:
self._mpClip.SetClipColor(colorName)
def LinkProxyMedia(self,proxyMediaFilePath):
if not isinstance(self._mpClip,MyMpClip):
self._mpClip.LinkProxyMedia(proxyMediaFilePath)
def GetName(self):
return self._properties["Clip Name"]
def ReplaceClip(self,filename:str):
'''
This is the encapsulation of the API ReplaceClip method, and do the same thing using this
virtual clip object.
'''
version_down_19_1 = int(str(RESOLVE_VERSION[0])+str(RESOLVE_VERSION[1])) < 191
ret = True
currentFolder = getMediaFolder(currentTimeline.GetName())
binFolder = getMediaFolder("media",parent = currentFolder)
mediaPool.SetCurrentFolder(binFolder)
mpClips = binFolder.GetClipList() # try if clip alread exists
clipFound = False
try:
if mpClips:
for mpClip in mpClips:
if mpClip and mpClip.GetClipProperty("File Path") == filename:
mpClips = [mpClip]
clipFound = True
print_info("Clip",mpClip.GetName(),"already exists in the media folder.")
break
if not clipFound:
mpClips = mediaPool.ImportMedia([filename])
if len(mpClips) > 0 and mpClips[0]:
self._mpClip = mpClips[0]
if self._timelineClip:
print_info("Trying to create timeline clip",self._timelineClip.GetName())
self._sourceIn = self._timelineClip.GetLeftOffset()
self._sourceOut = self._timelineClip.GetRightOffset()
self._recordFrame = self._timelineClip.GetStart()
currentTimeline.DeleteClips([self._timelineClip])
## Appends list of clipInfos specified as dict of "mediaPoolItem", "startFrame" (int), "endFrame" (int), (optional) "mediaType" (int; 1 - Video only, 2 - Audio only), "trackIndex" (int) and "recordFrame" (int). Returns the list of appended timelineItems.
clipDict = {
"mediaPoolItem":self._mpClip,
"startFrame":self._sourceIn,
"endFrame":self._sourceOut-(1 if version_down_19_1 else 0),
"mediaType":1,
"trackIndex":self._track,
"recordFrame":self._recordFrame
}
#pprint(clipDict)
timelineClips = mediaPool.AppendToTimeline([clipDict])
if timelineClips:
print_info("Timeline item",timelineClips[0].GetName(),"created.")
else:
print_error("Can't create tileline item!")
else:
print_error("No timeline item!")
else:
print_error("Can't import",filename)
ret = False
except Exception as e:
print_error("An exception accured:",e,"\nstartFrame:",self._sourceIn,"\nendFrame:",self._sourceOut,"\ntrackIndex:",self._track,"\nrecordFrame:",self._recordFrame)
ret = False
finally:
mediaPool.SetCurrentFolder(currentFolder)
return ret
def print_error(*args,sep: str = " ", end: str = "\n"):
print('ERROR:','',end='')
print(*args,sep=sep,end=end)
def print_warning(*args,sep: str = " ", end: str = "\n"):
print('WARNING:','',end='')
print(*args,sep=sep,end=end)
def print_info(*args,sep: str = " ", end: str = "\n"):
print('INFO:','',end='')
print(*args,sep=sep,end=end)
#resolve = dvr.scriptapp("Resolve")
print_info("Python version:",sys.version)
#print("Python Path:",sys.path)
CONFORM_ALL_VERSION="2025.3.0"
RESOLVE_VERSION=resolve.GetVersion()
RESOLVE_VERSION_STRING=resolve.GetVersionString()
RESOLVE_VERSION_SUFIX=RESOLVE_VERSION_STRING.replace('.','_')
STOCK_DRB="stock_" + RESOLVE_VERSION_SUFIX + ".drb"
BLACKLIST_FILES="blacklist_files_" + RESOLVE_VERSION_SUFIX + ".json"
print_info("ConformAll version:",CONFORM_ALL_VERSION)
print_info("DaVinci Resolve Version:",RESOLVE_VERSION_STRING)
userPath = os.path.expanduser("~")
if not os.path.exists(userPath):
print_error("User path does not exist!!!")
exit(1)
else:
print_info("User HOME is:",userPath)
# application settings
settingsFile = "ConformAll.json"
settingsPath = os.path.join(userPath,"Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Settings")
settingsJson = {"projects":[{
"project": "default",
"mogPath" : "",
"fieldSep" : "_",
"fieldCount" : 5,
"sonyPath" : "",
"aafPath" : "",
"avidPath" : "",
"motionPath" : "",
"motionFieldSep" : "_",
"motionFieldCount" : 5,
"exportStock" : True,
"importStock" : True,
"copyMediaPath" : "",
"autoImportSourceClipsIntoMediaPool":False
}],
"currentProject":"default",
"windowGeometry": { "1": 50, "2": 50, "3": 600, "4": 410 }
}
settings = {} # project settings
currentHouseProject = ""
stockBinPath = ""
typeColor = {
'MOG':'Orange',
'SONY':'Violet',
'OTHER':'Olive',
'AUTO':'Yellow', # Media imported using the timeline import function, e.g. Edge proxy
'SAME':'Navy', # The High Res codec is the same of Low Res
'NO_PROXY':'Apricot' # Used when the proxy from AAF is not imported, e.g. error importing, and we load the high resolution instead
}
cancelCopyFiles = False
drScriptsPath="/Library/Application Support/Blackmagic Design/DaVinci Resolve/Fusion/Scripts"
copyFilesPath = os.path.join(drScriptsPath,"copy_files.py")
def loadSettings():
'''
Get global settings.
'''
global currentHouseProject
global settingsJson
path = os.path.join(settingsPath,settingsFile)
#print(path)
if os.path.exists(path):
with open(path,'r') as openFile:
settingsJson = json.load(openFile)
else:
with open(path, "w") as outfile:
json.dump(settingsJson, outfile)
def getProjects():
'''
Get home projects list.
'''
projects = []
for obj in settingsJson["projects"]:
projects.append(obj['project'])
return projects
def getSettings(project):
'''
Get some home project settings.
Updates the global variable "settings".
Arguments:
project: the home project to get the settings
'''
global settings
for obj in settingsJson["projects"]:
if obj['project'] == project:
settings = obj
return True
return False
def saveSetting(project = None,rename = False):
'''
Save the application settings.
Arguments:
project: the name of the home project to save. if present, the project settings
are saved. If not present only the application settings are saved.
rename: if True, the project will be renamed with the name currently in the
Profile UI text field (not the one selected in the pulldown).
This means that the user pressed the "Rename" button.
'''
global settingsJson
settingsJson['currentProject'] = cbProjects.CurrentText
settingsJson['windowGeometry'] = win.Geometry
if project:
values = getUIValues()
if not getSettings(project) and not rename: # it's a new project
settingsJson['projects'].append({'project':project})
for obj in settingsJson["projects"]:
if obj['project'] == project:
if rename:
obj['project'] = cbProjects.CurrentText
obj['mogPath'] = values[0]
obj['fieldSep']=values[1]
obj['fieldCount']=values[2]
obj['sonyPath']=values[3]
obj['aafPath']=values[4]
obj['avidPath']=values[5]
obj['motionPath']=values[6]
obj['motionFieldSep']=values[7]
obj['motionFieldCount']=values[8]
obj['exportStock']=values[9]
obj['importStock']=values[10]
obj['copyMediaPath']=values[11]
obj['autoImportSourceClipsIntoMediaPool']=values[12]
break
path = os.path.join(settingsPath,settingsFile)
with open(path, "w") as outfile:
json.dump(settingsJson, outfile)
def getUIValues():
"""
Get the UI values.
Return (index:value): (
0:mogPath (string),
1:fieldSeparator (string),
2:fieldCount (int),
3:sonyPath (string),
4:aafPath (string),
5:avidPath (string),
6:motionPath (string),
7:motionFieldSeparator (string),
8:motionFieldCount (int),
9:exportStock (bool),
10:importStock (bool),
11:copyMediaPath (string),
12:autoImportSourceClipsIntoMediaPool (bool),
) Tuple
"""
return (win.Find('txtMogPath').Text,
win.Find('txtFieldSep').Text,
win.Find('spFieldCount').Value,
win.Find('txtSonyPath').Text,
win.Find('txtAAFPath').Text,
win.Find('txtAvidPath').Text,
"","","", # retirar para usar os campos a seguir
#win.Find('txtMotionPath').Text,
#win.Find('txtMotionFieldSep').Text,
#win.Find('spMotionFieldCount').Value
win.Find('ckExportStock').Checked,
win.Find('ckImportStock').Checked,
win.Find('txtCopyMediaPath').Text,
win.Find('ckAutoImportSourceClipsIntoMediaPool').Checked
)
# deprecated
def getEdgeProxyPath():
avidPath = getUIValues()[5]
avidPath = os.path.split(avidPath)
if len(avidPath[1]) == 0: # path have a tail separator
avidPath=os.path.split(avidPath[0])
proxyPath = os.path.join(avidPath[0],'Proxy')
if os.path.isdir(proxyPath):
return proxyPath
return None
# deprecated
def getUMEPath():
avidPath = getUIValues()[5]
avidPath = os.path.split(avidPath)
if len(avidPath[1]) == 0: # path have a tail separator
avidPath=os.path.split(avidPath[0])
umePath = os.path.join(avidPath[0],'UME')
# if os.path.isdir(umePath):
return umePath
def getAvidMXFFolder():
'''
Gets the "Avid MediaFiles/MXF" folder from the "Avid Folders" list.
If more than one exists, the first one is returned.
'''
for folder in settings.get('avidFolders',[]):
if folder.endswith("Avid MediaFiles" + os.sep + "MXF"):
return folder
print_error("Avid folders list does not contains a Avid MediaFiles" + os.sep + "MXF folder.")
def importIngestSettings(path:str,importToKey:str,importFromKey:str):
'''
Import a list from the "ReelMyFiles" application.
Arguments:
path: the path to the json file
importToKey: the dict key to here to import the list (destination key)
importFromKey: the dict key from here to import the list (source key)
'''
if os.path.exists(path):
with open(path,'r') as openFile:
ingestSettings = json.load(openFile)
currentList = [x.upper() for x in settingsJson.get(importToKey,[])]
for ext in ingestSettings.get(importFromKey,[]):
if ext.upper() in currentList:
continue
currentList.append(ext)
settingsJson[importToKey] = currentList
saveSetting()
def getAvidMedia(folderPaths : list):
'''
Scan the avid folders list for media file names.
After the collect the relevant file names, call the
importClips method to import the media to the media pool
as media pool clips.
Arguments:
folderPaths: the list of folder paths.
'''
print_info("Getting Media Files (Avid)")
fileEndings = ["_0.MXF","V.MXF","_CC.MXF","_VFX.MXF",".pmxf"]
avidFiles = []
ts = time.time()
print_info("Avid folders list:",folderPaths)
for folderPath in folderPaths:
if not folderPath or not os.path.exists(folderPath):
print_error("The folder",folderPath,"does not exist. Do you forget to mount any drive?")
continue
isUME = os.path.basename(folderPath) == "UME"
for root, dirs, files in os.walk(folderPath):
for name in files:
if not "Quarantine File" in root and not "Creating" in root and not name.startswith("."):
endOk = False
for end in fileEndings :
if name.upper().endswith(end.upper()):
endOk=True
if not endOk and isUME:
ext = os.path.splitext(name)[1]
if ext.upper() == ".MXF":
endOk = True
if endOk:
avidFiles.append(os.path.join(root,name))
now = time.time()
if ts + 1. < now:
print(end=".")
ts = now
#print(amaFiles)
print()
print_info(len(avidFiles)," Avid MediaFiles found.")
return importClips(avidFiles)
def getMediaFiles(foldersPaths:list, clipDict:dict, folderType:list):
"""
Get ama files reel names as keys and paths as values.
all OTHER folderType(s) must exist in the Camera Folders list
Arguments:
folderPath: path to the ama files root
clipDict: timeline clips
folderType: list like [ama] for MOG or the Camera Folders from the UI
Return {"reelName":"filename",...}
"""
print_info("Getting Media Files (AMA)")
print_info("Folders to search:",foldersPaths)
mimes=["." + x.upper() for x in settingsJson.get('fileExtensions',[])]
amaFiles = {}
numFiles=0
uiValues = getUIValues()
fieldSep = uiValues[1] if "ama" in folderType else None
fieldCount = uiValues[2] if "ama" in folderType else None
existingFolders = []
for folderPath in foldersPaths:
if not os.path.exists(folderPath):
print_error("Folder",folderPath,"does not exist. Do you forget to mount any drive?")
else:
existingFolders.append(folderPath)
if len(existingFolders) == 0: return amaFiles
ts = time.time()
for folderPath in existingFolders:
for root, dirs, files in os.walk(folderPath):
cameraFolderExits = False
for c in folderType:
rootArray = root.split(os.path.sep) # garante igualdade na palavra e não em parte
if c in rootArray:
cameraFolderExits = True
break
for name in files:
replace = True
filename = os.path.join(root,name)
_,ext = os.path.splitext(filename)
if cameraFolderExits and ext.upper() in mimes:
fileReel = extractReelName(name, fieldSep,fieldCount)
clip = clipDict.get(fileReel)
if clip:
if amaFiles.get(fileReel):
mpClips = mediaPool.ImportMedia([amaFiles.get(fileReel),filename])
if isMpClipHighRes(mpClips[0]) and not isMpClipHighRes(mpClips[1]):
replace = False
mediaPool.DeleteClips(mpClips)
if replace:
amaFiles[fileReel] = filename
numFiles+=1
now = time.time()
if ts + 1. < now:
print("",end=".")
ts = now
print()
print_info(numFiles,"files found in",folderPath,"...")
return amaFiles
def getMediaFolder(name, parent = None):
"""
Get media folder with "name" from the media pool root, or from parent, if given.
"""
mpRoot = mediaPool.GetRootFolder()
if parent:
mpRoot = parent
for folder in mpRoot.GetSubFolderList():
if folder.GetName() == name:
return folder
return None
def getHostName():
'''
Returns the local hostname regarding the OS.
'''
hostName = None
if platform.system() == "Windows":
hostName = platform.uname().node
else:
hostName = os.uname()[1]
return hostName
def lockBinFile(binFilePath: str):
'''
Create a lock file to prevent mutual access to the drb stock bin file.
Returns: True if the lock is created successfully. False otherwise.
'''
print_info("Locking stock bin.")
folder = os.path.dirname(binFilePath)
if not os.path.exists(folder):
print_error(f"Cant create lock file. Folder {folder} does not exist. Do you forget to mount some drive?")
return False
fileName = os.path.basename(binFilePath).removesuffix(".drb")
lockFile = os.path.join(folder,fileName+".lock")
lockDic = {}
hostName = None
if os.path.exists(lockFile):
with open(lockFile,'r') as openFile:
lockDic = json.load(openFile)
hostName = lockDic['hostName']
if hostName != getHostName():
errorPopupDialog("The bin file is locked by the workstation named \"" + hostName + "\".\n" \
"Try again later ...")
return False
else:
# it's the same machine
print_info("The stock bin it's locked but this machine is the owner of the lock.")
return True
#if not os.path.exists(binFilePath):
# print("Stock bin file noes not exist.")
# return True
lockDic['hostName'] = getHostName()
with open(lockFile,'x') as outfile:
json.dump(lockDic, outfile)
return True
def unlockBinFile(binFilePath: str):
'''
Delete the lock file thats prevent mutual access to the drb stock bin file.
Returns: True if the lock is deleted successfully. False otherwise.
'''
folder = os.path.dirname(binFilePath)
fileName = os.path.basename(binFilePath).removesuffix(".drb")
lockFile = os.path.join(folder,fileName + ".lock")
hostName = getHostName()
if os.path.exists(lockFile):
with open(lockFile,'r') as openFile:
lockDic = json.load(openFile)
if hostName == lockDic['hostName']:
try:
os.remove(lockFile)
print_info("Stock bin lock removed.")
except Exception as e:
print_error(f"Some error occurred: {e}")
return False
else:
print_error("Can't unlock stock bin file! This machine is not the owner of the lock!")
return False
else:
print_warning("Stock bin lock does not exist!")
return True
def importClips(files:list):
'''
Import the Avid media files to the media pool as media pool clips.
This method is called from in the return of the getAvidMedia method.
Arguments:
files: list of filename paths to import
'''
global stockBinPath
print_info("Importing clips to stock...")
uiValues = getUIValues()
localTs = datetime.datetime.now()
currentFolder = mediaPool.GetCurrentFolder()
mpRoot = mediaPool.GetRootFolder()
stock = getMediaFolder("stock")
#if not stock:
mediaPool.SetCurrentFolder(mpRoot)
createEmptryStock = True
if uiValues[10] and isImportExportDrbPossible():
print_info("Trying to import stock folder...")
mediaPool.DeleteFolders([stock])
if os.path.exists(stockBinPath):
try:
if mediaPool.ImportFolderFromFile(stockBinPath):
stock = getMediaFolder("stock")
if stock:
print_info("Stock folder imported.")
createEmptryStock = False
else:
print_error("Can not create the stock folder object!")
else:
print_error("Failed to import stock folder!")
except:
print_error("This DaVinci Resolve version can't import the bin folder.")
else:
print_warning("Stock folder bin file does not exist!")
else:
if stock:
print_info("Stock bin already exists...")
createEmptryStock = False
if createEmptryStock:
accepted,_,_ = genericPopupDialog("Do you want to import all Avid media files? This may take a while.","Yes","No",haveRejectButton=True)
if accepted:
print_info("Creating empty stock folder...")
stock = mediaPool.AddSubFolder(mpRoot,"stock")
else:
print_error("Stock folder creation canceled.")
return stock
print_info("Getting filenames from stock folder clips...")
currentClipsFileNames = []
ts = time.time()
for clip in stock.GetClipList():
if clip:
currentClipsFileNames.append(clip.GetClipProperty("File Name"))
now = time.time()
if ts + 1. < now:
print("",end=".")
ts = now
print()
clipsInMP = len(currentClipsFileNames)
filesNumber = len(files)
if filesNumber == 0:
print_warning("There is no files to import!")
return stock
#clipsToImport=filesNumber - clipsInMP
print_info(clipsInMP,"clips already in media pool..")
print_info("Preparing list of files to import.")
bmd.wait(0.2)
#print(files[0] if len(files) > 0 else "None")
files2Process=[]
blacklist = loadBlacklistFiles(os.path.join(getAvidMXFFolder(),BLACKLIST_FILES))
print_info(len(blacklist),"files in blacklist.")
ts = time.time()
for file in files:
basename = os.path.basename(file)
if not basename in currentClipsFileNames:
if file not in blacklist:
files2Process.append(file)
now = time.time()
if ts + 1. < now:
print("",end=".")
ts = now
print()
print_info(len(files2Process), "files to import...")
clips2ImportCounter = len(files2Process)
mediaPool.SetCurrentFolder(stock)
l_pointer=0
r_pointer=0
importedClips=[]
step=1000
print_info("Importing media (",step," files each step)...",sep="")
for l_pointer in range(0,clips2ImportCounter,step):
r_pointer = l_pointer + step
if r_pointer > clips2ImportCounter:
r_pointer = clips2ImportCounter
print_info("Importing from index ",l_pointer," to index ",r_pointer-1,".\t",clips2ImportCounter - l_pointer," files remaining...",sep="")
bmd.wait(0.2)
importedClips += mediaPool.ImportMedia(files2Process[l_pointer:r_pointer])
mediaPool.RefreshFolders()
print_info("Creating blacklist...")
blacklist = createBlackListFiles(importedClips,files2Process,blacklist)
print_info(len(blacklist),"files in blacklist.")
if not isImportExportDrbPossible():
genericPopupDialog("This DaVinci Resolve version ("+ RESOLVE_VERSION_STRING + "), can not export the stock bin folder.\nPlease, do it manualy if you want to.",
"Ok")
if (uiValues[9] or isDrbTodayFirstExport()) and isImportExportDrbPossible():
print_info("Trying to export stock bin...")
try:
if stock.Export(stockBinPath):
print_info("Stock bin exported...")
else:
print_error("Failed to export stock bin!")
except:
print_error("This DaVinci Resolve version can't export the bin folder.")
mediaPool.SetCurrentFolder(currentFolder)
if not importedClips:
return stock
print_info(len(importedClips),"clips imported of",clips2ImportCounter)
dt = datetime.datetime.now() - localTs
print_info("Processed in",str(dt))
return stock
def createBlackListFiles(importedClips:list,files2Process:list,blacklist_par:list=None):
"""
Create a json file with a list of filenames that can not be imported to the media pool.
Arguments:
importedClips: A list of imported MediaPoolItems.
files2Process: A list of filenames to import to the media pool.
blacklist_par: A list of already loaded existing blacklist
Returns:
The blacklist.
"""
localFiles2Process = files2Process.copy()
blacklist = blacklist_par
blackListFileName = os.path.join(getAvidMXFFolder(),BLACKLIST_FILES)
if not blacklist:
blacklist = loadBlacklistFiles(blackListFileName)
# remove processed files from localFiles2Process
# remaining files are the import errors
for clip in importedClips:
clipFilename = clip.GetClipProperty("File Path")
if clipFilename in localFiles2Process:
localFiles2Process.remove(clipFilename)
for file in localFiles2Process:
if file not in blacklist:
blacklist.append(file)
blacklistJson = {
'files': blacklist
}
with open(blackListFileName,'w') as f:
json.dump(blacklistJson,f)
return blacklist
def loadBlacklistFiles(blackListFileName:str):
'''
Load the blacklisted files from the blacklist file.
Returns:
A list with the blacklisted files.
'''
blacklist = []
if os.path.exists(blackListFileName):
with open(blackListFileName,'r') as f:
blacklistJson = json.load(f)
blacklist= blacklistJson.get('files',[])
return blacklist
def getTimelineClips():
'''
Returns the timeline clips (items) in all timeline video tracks.
Returns:
A list with the clips.
'''
global currentTimeline
clips = []
currentTimeline = currentProject.GetCurrentTimeline()
videoTracks = currentTimeline.GetTrackCount('video')
print_info('Video tracks in timeline:',videoTracks)
for i in range(1,videoTracks+1):
print_info("Getting clips from track",i)
for clip in currentTimeline.GetItemListInTrack('video', i):
clips.append((clip,i))
return clips
def getTimelineClipFromEditIndex():
'''
Returns the clips represented in the DR "Edit Index" as
MyMpClip (virtual media pool clip).
Please see the MyMpClip class for details.
Returns:
A dict where the key is a tuple with the video track index and the clip Record In TC.
'''
global currentTimeline
currentTimeline = currentProject.GetCurrentTimeline()
csv_path = os.path.join(os.path.expanduser("~"),"timeline.csv")
if os.path.exists(csv_path):
os.remove(csv_path) # remove to avoid false readings
currentTimeline.Export(csv_path, resolve.EXPORT_TEXT_CSV, resolve.EXPORT_MISSING_CLIPS)
if not os.path.exists(csv_path):
print_error("Edit Index failed to export!")
return {}
with open(csv_path,encoding='utf-8') as f:
csv_reader = csv.DictReader(f)
data = {}
for rows in csv_reader:
track = rows['V']
if track.startswith("V"):
rec_in = tc2Frames(rows['Record In'])
rec_out = tc2Frames(rows['Record Out'])
source_in = tc2Frames(rows['Source In'])
source_out = tc2Frames(rows['Source Out'])
key = (int(track[1:]),rec_in)
if not data.get(key,False):
data[key] = MyMpClip(rows["Reel"],
rows["Codec"],
rows["Name"],
key[1],
source_in,
source_out,
rows['Source Start'],
rows['Source End'],
key[0])
print_info(f"Edit index have {len(data)} records.")
return data
def getMpClipsFromTimeline(resolution:str = 'all'):
"""
Return all media pool clips linked to the timeline don't matter the media type.
Arguments:
resolution: one of 'all','high' or 'proxy'
"""
resolution = 'codecs' if resolution == 'high' else resolution
resolution = 'codecsProxy' if resolution == 'proxy' else resolution
timelineClips = getTimelineClips()
clips = []
currentList = [x.upper() for x in settingsJson.get(resolution,[])]
for clip in timelineClips:
mpClip = clip[0].GetMediaPoolItem()
if mpClip:
codec = mpClip.GetClipProperty("Video Codec")
if len(currentList) > 0 and codec.upper() in currentList:
clips.append(mpClip)
return clips
def getTimelineClipsMog(clipsList, timeline_names_reels):
"""
Returns the Mog media pool clips linked to the timeline.
Arguments:
clipsList: timeline clips list
timeline_names_reels: dict with the MyMpClip objects extracted from the "Edit Index"
Returns a dict as {"clipReel":(<media pool clip>,'MOG',<timelineClip>),....}
"""
print_info("Getting MOG Clips...")
clipDict = {}
numClips=0
numClipsEditIndex=0
uiValues = getUIValues()
fieldSep = uiValues[1]
fieldCount = uiValues[2]
#pprint(timeline_names_reels)
for clip_tuple in clipsList:
clip = clip_tuple[0]
track = clip_tuple[1]
mpClip = clip.GetMediaPoolItem()
if mpClip:
if len(mpClip.GetClipProperty("Clip Color")) == 0:
# Try to extract the reel name from the clipname
clipName = mpClip.GetName()
clipReel = extractReelName(clipName,fieldSep,fieldCount)
#clipReel = mpClip.GetClipProperty("Reel Name")
if clipReel:
clipDict[clipReel] = (mpClip,'MOG',clip)
numClips+=1
else:
# Try to get the reel name insted
clipReel = extractReelName(mpClip.GetClipProperty("Reel Name"),fieldSep,fieldCount)
if clipReel:
clipDict[clipReel] = (mpClip,'MOG',clip)
numClips+=1
else:
tcIn = clip.GetStart()
print_warning("Trying to get the reel name from the edit index with timeline clip name",clip.GetName())
mpClip = timeline_names_reels.get((track,tcIn),False)
if mpClip:
mpClip.setTimelineClip(clip)
clipReel = extractReelName(mpClip.GetClipProperty("Reel Name"),fieldSep,fieldCount)
if clipReel:
print_info("Adding reel name from edit index:",clipReel)
clipDict[clipReel] = (mpClip,'MOG',clip)
numClips+=1
numClipsEditIndex+=1
else:
print_error("No edit index found for that timeline clip!")
print_info(numClips,"not corformed clips found in timeline.",numClipsEditIndex,"clips detected with edit index...")
return clipDict if numClips > 0 else None
def getTimelineClipsOthers(clipsList,clipType,timeline_names_reels):
"""
Returns the Sony/OTHER media pool clips linked to the timeline.
Arguments:
clipsList: timeline clips list
clipType: clipType
timeline_names_reels: dict with the MyMpClip objects extracted from the "Edit Index"
Returns a dict as {clipReel: (<media pool clip>,clipType,timelineClip),...}
"""
mimes=["." + x.upper() for x in settingsJson.get('fileExtensions',[])]
print_info("Getting " + clipType + " Clips...")
clipDict = {}
numClips=0
numClipsEditIndex=0
for clip_tuple in clipsList:
clip = clip_tuple[0]
track = clip_tuple[1]
mpClip = clip.GetMediaPoolItem()
if mpClip:
if len(mpClip.GetClipProperty("Clip Color")) == 0:
clipReel = mpClip.GetClipProperty("Reel Name")
if not clipReel:
clipReel = extractReelName(mpClip.GetClipProperty("File Name"))
if clipReel:
# remove extension from the reel name, if exists
reelNoExt,reelExt = os.path.splitext(clipReel)
if reelExt.upper() in mimes:
clipReel = reelNoExt
clipDict[clipReel] = (mpClip,clipType,clip)
numClips+=1
else:
tcIn = clip.GetStart()
print_warning("Trying to get the reel name from the edit index with timeline clip name",clip.GetName())
mpClip = timeline_names_reels.get((track,tcIn),False)
if mpClip:
mpClip.setTimelineClip(clip)
clipReel = mpClip.GetClipProperty("Reel Name")