Box/Ellipse Mask nodes are not applied correctly on output operations when they have no inputs. Specially when you change render percentage as it's affecting the result when it shouldn't. If using images with different resolution than scene output resolution is not applied correctly either.
The reason is this old patch -> https://developer.blender.org/rBed792b5de08258f3c906d36381d67da55456ec34
ScaleFixedOperation is being used to set an input fixed resolution based on current scene resolution with its percentage applied. I see the reason why this was done but by forcing it as an input resolution breaks the rest of cases. Users may want the mask to be applied to another input of any resolution that is connected in an outer node.
This patch takes into account the case described in the old patch and the rest of cases to make it work as expected in all cases by using determineResolution to set a default preferred resolution that will be applied when these 2 points are not met:
- The node/operation doesn't have an input from which it can take a resolution or all of them has no resolution.
- The operation receives in determineResolution an output "preferredResolution" of 0 and cannot set any resolution if input resolution is 0 too.
With this patch we can set a third condition for determineResolution method so that it achieves what the old patch wants and keeps the right behaviour for the rest of cases:
- We optionally can set a preferred resolution for the cases where there is no output preferred resolution, so that generated inputs which have no resolution by themselves, may be rendered with that resolution.
This is the case of these mask nodes when they don't have inputs connected, they become generated inputs.