Fusion 9 Rendering on macOS


#1

Hi there. I have been using Blackmagic Fusion 9 successfully with Windows render nodes. However, I can’t get it to work with mac render nodes.

Below is a render log, I have omitted personal details.

=======================================================
Log
=======================================================
2019-02-22 20:35:03:  0: Loading Job's Plugin timeout is Disabled
2019-02-22 20:35:06:  0: Executing plugin command of type 'Sync Files for Job'
2019-02-22 20:35:07:  0: Synchronization time for job files: 355.924 ms
2019-02-22 20:35:07:  0: Synchronizing Plugin Fusion from /Users/[OMITTED]/Library/Application Support/Thinkbox/Deadline10/cache/XAQpQzOjDH1Xf9xtxScHBDkxQA/plugins/Fusion took: 0 seconds
2019-02-22 20:35:07:  0: Done executing plugin command of type 'Sync Files for Job'
2019-02-22 20:35:07:  0: Executing plugin command of type 'Initialize Plugin'
2019-02-22 20:35:07:  0: INFO: Executing plugin script '[OMITTED]/Fusion.py'
2019-02-22 20:35:08:  0: INFO: About: Fusion Plugin for Deadline
2019-02-22 20:35:08:  0: INFO: Render Job As User disabled, running as current user '[OMITTED]'
2019-02-22 20:35:08:  0: INFO: The job's environment will be merged with the current environment before rendering
2019-02-22 20:35:08:  0: Done executing plugin command of type 'Initialize Plugin'
2019-02-22 20:35:09:  0: Start Job timeout is disabled.
2019-02-22 20:35:09:  0: Task timeout is disabled.
2019-02-22 20:35:09:  0: Loaded job:  ([OMITTED])
2019-02-22 20:35:09:  0: Executing plugin command of type 'Start Job'
2019-02-22 20:35:09:  0: INFO: Executing global asset transfer preload script '[OMITTED]/plugins/[OMITTED]/GlobalAssetTransferPreLoad.py'
2019-02-22 20:35:09:  0: INFO: Looking for AWS Portal File Transfer...
2019-02-22 20:35:09:  0: INFO: No File Transfer controller is available for this platform (darwin).
2019-02-22 20:35:09:  0: INFO: Could not find AWS Portal File Transfer.
2019-02-22 20:35:09:  0: INFO: AWS Portal File Transfer is not installed on the system.
2019-02-22 20:35:09:  0: INFO: Starting monitored managed process Fusion
2019-02-22 20:35:09:  0: INFO: Stdout Redirection Enabled: True
2019-02-22 20:35:09:  0: INFO: Asynchronous Stdout Enabled: False
2019-02-22 20:35:09:  0: INFO: Stdout Handling Enabled: True
2019-02-22 20:35:09:  0: INFO: Popup Handling Enabled: True
2019-02-22 20:35:09:  0: INFO: QT Popup Handling Enabled: False
2019-02-22 20:35:09:  0: INFO: WindowsForms10.Window.8.app.* Popup Handling Enabled: False
2019-02-22 20:35:09:  0: INFO: Using Process Tree: True
2019-02-22 20:35:09:  0: INFO: Hiding DOS Window: False
2019-02-22 20:35:09:  0: INFO: Creating New Console: False
2019-02-22 20:35:09:  0: INFO: Running as user: [OMITTED]
2019-02-22 20:35:09:  0: INFO: Executable: "/Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Fusion Render Node"
2019-02-22 20:35:09:  0: INFO: Argument: -quiet -listen -verbose -log "[OMITTED]/jobsData/[OMITTED]/fusionLog_tempxvAaq0/fusion.log"
2019-02-22 20:35:09:  0: INFO: Full Command: "/Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Fusion Render Node" -quiet -listen -verbose -log "[OMITTED]/jobsData/[OMITTED]/fusionLog_tempxvAaq0/fusion.log"
2019-02-22 20:35:09:  0: INFO: Startup Directory: "/Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS"
2019-02-22 20:35:09:  0: INFO: Process Priority: BelowNormal
2019-02-22 20:35:09:  0: INFO: Process Affinity: default
2019-02-22 20:35:09:  0: INFO: Process is now running
2019-02-22 20:35:09:  0: INFO: Fusion log file does not exist yet: [OMITTED]/jobsData/[OMITTED]/fusionLog_tempxvAaq0/fusion.log
2019-02-22 20:35:10:  0: INFO: Fusion log file does not exist yet: [OMITTED]/jobsData/[OMITTED]/fusionLog_tempxvAaq0/fusion.log
2019-02-22 20:35:11:  0: INFO: LOG: 
2019-02-22 20:35:11:  0: INFO: LOG: ---------------------------------------------------
2019-02-22 20:35:11:  0: INFO: LOG: Starting Fusion Render Node 9.0.2 at 22/Feb/19 20:35:10
2019-02-22 20:35:11:  0: INFO: LOG: /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Fusion Render Node
2019-02-22 20:35:11:  0: INFO: LOG: ---------------------------------------------------
2019-02-22 20:35:11:  0: INFO: LOG: Initialising QuickTime
2019-02-22 20:35:11:  0: INFO: LOG: Checking for licenses...
2019-02-22 20:35:11:  0: INFO: LOG: Loading support DLLs
2019-02-22 20:35:11:  0: INFO: LOG: Loading fusionoperators
2019-02-22 20:35:11:  0: INFO: LOG: Loading fusionformats
2019-02-22 20:35:11:  0: INFO: LOG: Loading Plugins
2019-02-22 20:35:11:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/3d.plugin
2019-02-22 20:35:11:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/alembic.plugin
2019-02-22 20:35:11:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/bins.plugin
2019-02-22 20:35:11:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/cinemaraw.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/dimension.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/fbx.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/fuses.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/Krokodove.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/opencolorio.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/openexr.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/openfx.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/paint.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/particles.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/quicktime.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/text.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Loading plugin /Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/Plugins/utilities.plugin
2019-02-22 20:35:12:  0: INFO: LOG: Initialising Class Registry
2019-02-22 20:36:09:  0: INFO: Fusion Scripting has timed out.
2019-02-22 20:36:09:  0: INFO: Starting monitored managed process StartJob
2019-02-22 20:36:09:  0: INFO: Update timeout has been set to 150 seconds
2019-02-22 20:36:09:  0: INFO: Stdout Redirection Enabled: True
2019-02-22 20:36:09:  0: INFO: Asynchronous Stdout Enabled: False
2019-02-22 20:36:09:  0: INFO: Stdout Handling Enabled: True
2019-02-22 20:36:09:  0: INFO: Popup Handling Enabled: True
2019-02-22 20:36:09:  0: INFO: QT Popup Handling Enabled: False
2019-02-22 20:36:09:  0: INFO: WindowsForms10.Window.8.app.* Popup Handling Enabled: False
2019-02-22 20:36:09:  0: INFO: Using Process Tree: True
2019-02-22 20:36:09:  0: INFO: Hiding DOS Window: True
2019-02-22 20:36:09:  0: INFO: Creating New Console: False
2019-02-22 20:36:09:  0: INFO: Running as user: [OMITTED]
2019-02-22 20:36:09:  0: INFO: Executable: "/Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/fuscript"
2019-02-22 20:36:11:  0: INFO: Argument: "[OMITTED]/StartJob.eyeonscript" "[OMITTED]" 30
2019-02-22 20:36:11:  0: INFO: Full Command: "/Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS/fuscript" "[OMITTED]/plugins/[OMITTED]/StartJob.eyeonscript" "[OMITTED]/jobsData/[OMITTED].comp" 30
2019-02-22 20:36:11:  0: INFO: Startup Directory: "/Applications/Blackmagic Fusion 9 Render Node/Fusion Render Node.app/Contents/MacOS"
2019-02-22 20:36:11:  0: INFO: Process Priority: BelowNormal
2019-02-22 20:36:11:  0: INFO: Process Affinity: default
2019-02-22 20:36:11:  0: INFO: Process is now running
2019-02-22 20:36:11:  0: STDOUT: Fusion Script Interpreter
2019-02-22 20:36:11:  0: STDOUT: Copyright (C) 2005 - 2017 Blackmagic Design Pty. Ltd.
2019-02-22 20:36:11:  0: STDOUT: Connecting to Fusion...
2019-02-22 20:36:12:  0: STDOUT: Connection timeout in 29 seconds
2019-02-22 20:36:13:  0: STDOUT: Connection timeout in 28 seconds
2019-02-22 20:36:14:  0: STDOUT: Connection timeout in 27 seconds
2019-02-22 20:36:15:  0: STDOUT: Connection timeout in 26 seconds
2019-02-22 20:36:16:  0: STDOUT: Connection timeout in 25 seconds
2019-02-22 20:36:17:  0: STDOUT: Connection timeout in 24 seconds
2019-02-22 20:36:18:  0: STDOUT: Connection timeout in 23 seconds
2019-02-22 20:36:19:  0: STDOUT: Connection timeout in 22 seconds
2019-02-22 20:36:20:  0: STDOUT: Connection timeout in 21 seconds
2019-02-22 20:36:21:  0: STDOUT: Connection timeout in 20 seconds
2019-02-22 20:36:22:  0: STDOUT: Connection timeout in 19 seconds
2019-02-22 20:36:23:  0: STDOUT: Connection timeout in 18 seconds
2019-02-22 20:36:24:  0: STDOUT: Connection timeout in 17 seconds
2019-02-22 20:36:25:  0: STDOUT: Connection timeout in 16 seconds
2019-02-22 20:36:26:  0: STDOUT: Connection timeout in 15 seconds
2019-02-22 20:36:27:  0: STDOUT: Connection timeout in 14 seconds
2019-02-22 20:36:28:  0: STDOUT: Connection timeout in 13 seconds
2019-02-22 20:36:29:  0: STDOUT: Connection timeout in 12 seconds
2019-02-22 20:36:30:  0: STDOUT: Connection timeout in 11 seconds
2019-02-22 20:36:31:  0: STDOUT: Connection timeout in 10 seconds
2019-02-22 20:36:32:  0: STDOUT: Connection timeout in 9 seconds
2019-02-22 20:36:33:  0: STDOUT: Connection timeout in 8 seconds
2019-02-22 20:36:34:  0: STDOUT: Connection timeout in 7 seconds
2019-02-22 20:36:35:  0: STDOUT: Connection timeout in 6 seconds
2019-02-22 20:36:36:  0: STDOUT: Connection timeout in 5 seconds
2019-02-22 20:36:37:  0: STDOUT: Connection timeout in 4 seconds
2019-02-22 20:36:38:  0: STDOUT: Connection timeout in 3 seconds
2019-02-22 20:36:39:  0: STDOUT: Connection timeout in 2 seconds
2019-02-22 20:36:40:  0: STDOUT: Connection timeout in 1 seconds
2019-02-22 20:36:41:  0: STDOUT: Connection timeout in 0 seconds
2019-02-22 20:36:41:  0: STDOUT: ...45/plugins/[OMITTED]/StartJob.eyeonscript:33: attempt to index global 'df' (a nil value)
2019-02-22 20:36:41:  0: INFO: StartJob returned exit code 0
2019-02-22 20:36:41:  0: Done executing plugin command of type 'Start Job'

#2

There is a bug relating to submitting a flow file (.comp file) as an auxiliary file. On macOS (at least in my case with Fusion 9), the actual loading of the comp file occurs in RenderTasks.eyeonscript. In the file there is a note about this being necessary on Linux. However, the bug is that it pulls the flow file from the jobInfo structure, which is a nil value when the flow file is provided as an auxliary file. To fix it I had to modify the main Fusion plugin to provide the path to the local copy of the auxiliary flow file to RenderTasks, and then use that path if the flowfile is not in jobInfo. Below is a diff. Line numbers likely won’t align with yours as I have made other changes not relevant to this problem.

--- a/custom/plugins/Fusion/Fusion.py
+++ b/custom/plugins/Fusion/Fusion.py
@@ -690,14 +690,22 @@ class RenderTasksProcess (ManagedProcess):
             # Get the auxiliary script, which is used for running Fusion script jobs.
             auxiliaryScript = ""
             auxiliaryFilenames = self.deadlinePlugin.GetAuxiliaryFilenames()
+            
             if len( auxiliaryFilenames ) >= 2:
                 auxiliaryScript = auxiliaryFilenames[1]
             
+            # Get the auxiliary flow file.  The path needs to be known by RenderTasks on macOS.
+
+            auxiliaryFlowFile = ""
+            if len( auxiliaryFilenames ) >= 1:
+                auxiliaryFlowFile = auxiliaryFilenames[0]
+            
             # Build the render arguments.
             renderArguments = renderArguments + " \"" + Path.Combine( self.deadlinePlugin.GetPluginDirectory(), "RenderTasks.eyeonscript" ) + "\""
             renderArguments = renderArguments + " " + str( start_fr ) + " " + str( end_fr )
             renderArguments = renderArguments + " \"" + fusionVersionToEnforce + "\""
             renderArguments = renderArguments + " \"" + pluginInfoFile + "\""
+            renderArguments = renderArguments + " \"" + auxiliaryFlowFile + "\""
             renderArguments = renderArguments + " \"" + auxiliaryScript + "\""
         
         return renderArguments

--- a/custom/plugins/Fusion/RenderTasks.eyeonscript
+++ b/custom/plugins/Fusion/RenderTasks.eyeonscript
@@ -227,8 +227,11 @@ version = arg[3]
 -- read the job info file into a structure, for easier access.
 jobInfo = ReadKeyValueFile(arg[4])
 
+-- get the filename of the flowfile if it was provided as an auxiliary file
+auxiliaryFlowFile = arg[5]
+
 -- get the auxiliary script file, could be empty
-auxiliaryFile = arg[5]
+auxiliaryFile = arg[6]
 
 fl = df:GetCompList()
 print( "There are " .. table.getn(fl) .. " comps loaded." );
@@ -254,8 +257,19 @@ if (not comp) then
 	-- On linux render node (at least this is where we noticed it) either df:LoadComp() does not persist the composition in df.CurrentComp,
 	-- df:GetCurrentComp(), or df:GetCompList(). The only way to get a reference to a comp is to capture the return value of df:LoadComp()
 	comp = nil
-	print( "Reloading comp file..." )
-	comp = df:LoadComp( jobInfo["FlowFile"], true )
+	print( "Attempting to reload flow file... " )
+	flowFile = jobInfo["FlowFile"]
+	if (not flowFile) then
+		flowFile = auxiliaryFlowFile
+	end
+	if (not flowFile) then
+		print("ERROR: Composition did not load, and the flow file is unknown.")
+		io.flush()
+		wait(5)
+		os.exit(0)
+	end
+	print( "Reloading comp file: " .. flowFile )
+	comp = df:LoadComp( flowFile, true )
 end
 
 if (comp) then