Compositor: Add option to extend image bounds when blurring
It is handy when doing some roto work and it's required to blur some mask or overaly before alpha-overing it on top of the footage. Quite straightforward option with the only limitation that variable size blur is not supported. Reviewers: campbellbarton Subscribers: hype, sebastian_k Differential Revision: https://developer.blender.org/D1663
This commit is contained in:
@@ -41,6 +41,7 @@ void BokehBlurNode::convertToOperations(NodeConverter &converter, const Composit
|
||||
NodeInput *inputSizeSocket = this->getInputSocket(2);
|
||||
|
||||
bool connectedSizeSocket = inputSizeSocket->isLinked();
|
||||
const bool extend_bounds = (b_node->custom1 & CMP_NODEFLAG_BLUR_EXTEND_BOUNDS) != 0;
|
||||
|
||||
if ((b_node->custom1 & CMP_NODEFLAG_BLUR_VARIABLE_SIZE) && connectedSizeSocket) {
|
||||
VariableSizeBokehBlurOperation *operation = new VariableSizeBokehBlurOperation();
|
||||
@@ -58,6 +59,7 @@ void BokehBlurNode::convertToOperations(NodeConverter &converter, const Composit
|
||||
else {
|
||||
BokehBlurOperation *operation = new BokehBlurOperation();
|
||||
operation->setQuality(context.getQuality());
|
||||
operation->setExtendBounds(extend_bounds);
|
||||
|
||||
converter.addOperation(operation);
|
||||
converter.mapInputSocket(getInputSocket(0), operation->getInputSocket(0));
|
||||
|
||||
Reference in New Issue
Block a user