For the following code, if I change the macroFilePath, it doesn't use the current one but the old one. For example, if in the first execution I use C:\Users\user\Downloads\comp 1.txt, and in the second execution I use C:\Users\user\Downloads\comp 2.txt, then the pasted file will be the first one instead of the updated second one; it's as if the resolver clipboard isn't updating.
Code: Select all
resolve = bmd.scriptapp('Resolve')
fusion = resolve.Fusion()
projectManager = resolve.GetProjectManager()
project = projectManager.GetCurrentProject()
timeline = project.GetCurrentTimeline()
itemList = timeline.GetItemListInTrack('video', 1)
timelineItem = itemList[0] # O índice começa em 0
comp = timelineItem.GetFusionCompByIndex(1.0)
macroFilePath = r'C:\Users\lclbl\Downloads\comp 1.txt'
compSettings = bmd.readfile(macroFilePath)
comp.Paste(compSettings) Furthermore, if you run the code and don't open the composition in Fusion (i.e., run it directly in the edit tab), it returns "AttributeError: 'NoneType' object has no attribute 'Paste'".