ViewInfo position data omitted from .comp file when saving through fuscript
OS and version:
Windows 7, servicepack 1
Additional relevant system info:
Description of the bug:
We run a composition update script by starting a server and import BlackmagicFusion and get a new Fusion instance to work in.
We open a comp made by an artist and update the paths of all the loaders in the comp and the output of the saver if needed.
After we have updated all the Loaders in the composition file and saved it as a new version we experience the issue of all the loaders being
stacked atop of each other in the exact same spot.
After testing this manually by opening a comp in fuscript (args -i -l py2) and save as another then comparing both files
we found that the ViewInfo's position data is omitted from the file, there for, after opening it again in Fusion.exe it shows as described
Severity (Trivial, Minor, Major, Critical)
Steps to reproduce:
Code: Select all
import subprocess import time import BlackmagicFusion as bmf def get_fusion_instance(pid, srv, timeout=10): """Get the fusion instance which has been launched Args: pid (int, long): process id srv (PyObject): fusion server instance timeout (float): how long the function needs to time out in between attempts Returns: fusion """ count = 0 host = None while not host: if count > timeout: break fusion_hosts = srv.GetHostList().values() host = next((i for i in fusion_hosts if int(i["ProcessID"]) == pid), None) if not host: print("Find Fusion host... (%ss)" % count) time.sleep(0.5) count += 0.5 assert host, "Fusion not found with pid: %s" % pid return bmf.scriptapp(host["Name"], "localhost", 2, host["UUID"]) # Start console node proc = subprocess.Popen("C:/Program Files/Blackmagic Design/Fusion Render Node 9/fusionconsolenode.exe", args="/listen") # Start server srv = srv = bmf.scriptapp("", "localhost", 1) if not srv: srv = bmf.startserver() fusion = get_fusion_instance(proc.pid, srv) # Load comp comp = fusion.LoadComp("C:/comp_a.comp") # Lets assume all loaders have file which are from "C:/images/v001" # and we want to update them to "C:/images/v002" (all image files are present in both version folder) comp.Lock() for tool in comp.GetToolList(False, "Loader").values(): current_clip = tool["Clip"] new_clip = current_clip.replace("v001", "v002") tool["Clip"] = new_clip comp.Unlock() comp_filename = comp.GetAttrs("COMPS_FileName") new_comp_filename = "C:/comp_b.comp"
Please, if possible, provide a Fusion setup to help demonstrate the behaviour, either as an attachment or between