ID 531812 - Exports fail saying Non-existent channel used for mask when using fade in/fade out transitions with mask blend by alpha enabled on a blend track

Follow

Problem summary
Exports fail saying Non-existent channel used for mask when using fade in/fade out transitions with mask blend by alpha enabled on a blend track.
 
Looking at the Nuke script exported, the issue happens because the Constant node in the FadeIn/FadeOut group only has rgb channels, so when the Dissolve mix is 0, no alpha channel is output, causing the Merge node to error, as it's expecting an upstream alpha channel.,
 
Customer reported version
nuke.13.2v5
 
Customer reported platform
 
Steps to reproduce
 
1) Open Nuke Studio

2) Import two clips and add them to two tracks vertically on the timeline

3) On the top Video track, check enable blend and mask blend by alpha
 
4) Select then the top clip> Right click > Editorial > Add Transition > Fade In or Fade Out
 


 
5) In the Project Bin, select the Sequence > Right Click > Export
 
6) In the Export dialog, select Process as Sequence, then use the Log10 Cineon DPX default preset, and press Export, providing a Export path if needed. The render errors.
 
Expected behaviour
For the sequence to be exported
 
Actual behaviour
The export fails and the error message says Non-existent channel used for mask
 

 
Workaround
If you change the Constant node use in the exported Nuke script to have rgba channels, then the script can be rendered. 
 
This can be done pythonically in Nuke Studio before export with the following code:
 

import hiero.core OriginalScriptWriter = hiero.core.nuke.ScriptWriter class CustomScriptWriter(OriginalScriptWriter):   def __init__(self):     OriginalScriptWriter.__init__(self)       def addNode(self, node):     # List of nodes that should actually be added to the script     nodesToAdd = []         # node might actually be a list of nodes.  If it is, call onNodeAdded for each one     if isinstance(node, hiero.core.nuke.Node):       nodesToAdd.append( self.onNodeAdded(node) )     else:       try:         for n in node:           nodesToAdd.append( self.onNodeAdded(n) )       except:         pass             # Call base class to add the node(s)     OriginalScriptWriter.addNode(self, nodesToAdd)       def onNodeAdded(self, node):     if node.type() == "Group":      for n in node.getNodes():         if n.type() == "Constant":             n.setKnob("channels", "rgba")     return node              hiero.core.nuke.ScriptWriter = CustomScriptWriter
 
Reproduced by support
This bug has been reproduced in:
Nuke Studio 14.0v1 - Windows 10, CentOS 7, macOS Monterey
Nuke Studio 13.2v1 - Windows 10, CentOS 7 - regression
 
Unable to reproduce bug in:
Nuke Studio 13.1v5 - Windows 10, CentOS 7, macOS Monterey
 
Earliest version tested
Nuke Studio 13.1v5 - This issue doesn't appear in this version and has regressed
 
 

    We're sorry to hear that

    Please tell us why