Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-09-06 11:39:25 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-06 12:26:19 +0300
commitb07d866cf6d206d2e8012e1286c3c205eba0f24e (patch)
tree4683b3ca00a4b18efd3da68af41cceed86a4bf35 /source
parentf5daa58242a1b42fea7a15039968499318978842 (diff)
Compositor: Always use AA on masks
In a real world it is very weird to disable AA on a mask, it will give ugly looking result. For some fast preview passes (like in the node preview) the system can decide to disable AA without asking user to do anything. One thing we can consider doing is to remove Feather option as well. If real compo becomes measurably slower in cases when mask has no real feather, we can disable feather internally, without user input. Disabling feather in the interface is like making things faster but giving a wrong result, which doesn't sound that helpful either. Reviewers: brecht Reviewed By: brecht Subscribers: hype, sebastian_k Differential Revision: https://developer.blender.org/D3677
Diffstat (limited to 'source')
-rw-r--r--source/blender/compositor/nodes/COM_MaskNode.cpp1
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.h2
-rw-r--r--source/blender/editors/space_node/drawnode.c1
-rw-r--r--source/blender/makesdna/DNA_node_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c5
6 files changed, 3 insertions, 12 deletions
diff --git a/source/blender/compositor/nodes/COM_MaskNode.cpp b/source/blender/compositor/nodes/COM_MaskNode.cpp
index be05840f601..7e29674f9aa 100644
--- a/source/blender/compositor/nodes/COM_MaskNode.cpp
+++ b/source/blender/compositor/nodes/COM_MaskNode.cpp
@@ -62,7 +62,6 @@ void MaskNode::convertToOperations(NodeConverter &converter, const CompositorCon
operation->setMask(mask);
operation->setFramenumber(context.getFramenumber());
- operation->setSmooth((bool)(editorNode->custom1 & CMP_NODEFLAG_MASK_AA) != 0);
operation->setFeather((bool)(editorNode->custom1 & CMP_NODEFLAG_MASK_NO_FEATHER) == 0);
if ((editorNode->custom1 & CMP_NODEFLAG_MASK_MOTION_BLUR) &&
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp
index caafdfe8f0c..efc9f6edd5b 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -54,7 +54,7 @@ void MaskOperation::initExecution()
BKE_maskrasterize_handle_init(this->m_rasterMaskHandles[0], this->m_mask,
this->m_maskWidth, this->m_maskHeight,
- true, this->m_do_smooth, this->m_do_feather);
+ true, true, this->m_do_feather);
}
else {
/* make a throw away copy of the mask */
@@ -88,7 +88,7 @@ void MaskOperation::initExecution()
BKE_maskrasterize_handle_init(this->m_rasterMaskHandles[i], mask_temp,
this->m_maskWidth, this->m_maskHeight,
- true, this->m_do_smooth, this->m_do_feather);
+ true, true, this->m_do_feather);
frame_iter += frame_step;
}
diff --git a/source/blender/compositor/operations/COM_MaskOperation.h b/source/blender/compositor/operations/COM_MaskOperation.h
index a586a91682e..02c0e61c31e 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.h
+++ b/source/blender/compositor/operations/COM_MaskOperation.h
@@ -48,7 +48,6 @@ protected:
float m_frame_shutter;
int m_frame_number;
- bool m_do_smooth;
bool m_do_feather;
struct MaskRasterHandle *m_rasterMaskHandles[CMP_NODE_MASK_MBLUR_SAMPLES_MAX];
@@ -80,7 +79,6 @@ public:
this->m_mask_px_ofs[1] = this->m_maskHeightInv * 0.5f;
}
void setFramenumber(int frame_number) { this->m_frame_number = frame_number; }
- void setSmooth(bool smooth) { this->m_do_smooth = smooth; }
void setFeather(bool feather) { this->m_do_feather = feather; }
void setMotionBlurSamples(int samples) { this->m_rasterMaskHandleTot = min(max(1, samples), CMP_NODE_MASK_MBLUR_SAMPLES_MAX); }
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 6e52af2898e..46172da6b04 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -2411,7 +2411,6 @@ static void node_composit_buts_mask(uiLayout *layout, bContext *C, PointerRNA *p
bNode *node = ptr->data;
uiTemplateID(layout, C, ptr, "mask", NULL, NULL, NULL, UI_TEMPLATE_ID_FILTER_ALL);
- uiItemR(layout, ptr, "use_antialiasing", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "use_feather", 0, NULL, ICON_NONE);
uiItemR(layout, ptr, "size_source", 0, "", ICON_NONE);
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 5c692cf85da..91dc58ed1d4 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -500,7 +500,7 @@ enum {
};
enum {
- CMP_NODEFLAG_MASK_AA = (1 << 0),
+ /* CMP_NODEFLAG_MASK_AA = (1 << 0), */ /* DEPRECATED */
CMP_NODEFLAG_MASK_NO_FEATHER = (1 << 1),
CMP_NODEFLAG_MASK_MOTION_BLUR = (1 << 2),
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 847de75c604..68f0272c035 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -6327,11 +6327,6 @@ static void def_cmp_mask(StructRNA *srna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Mask", "");
- prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_NODEFLAG_MASK_AA);
- RNA_def_property_ui_text(prop, "Anti-Alias", "Apply an anti-aliasing filter to the mask");
- RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
prop = RNA_def_property(srna, "use_feather", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "custom1", CMP_NODEFLAG_MASK_NO_FEATHER);
RNA_def_property_ui_text(prop, "Feather", "Use feather information from the mask");