[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40742] trunk/blender/source/blender: Fix [#28436] ID mask creates 'feather' around ID even with AA turned off.
Bastien Montagne
montagne29 at wanadoo.fr
Sun Oct 2 14:57:49 CEST 2011
Revision: 40742
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40742
Author: mont29
Date: 2011-10-02 12:57:49 +0000 (Sun, 02 Oct 2011)
Log Message:
-----------
Fix [#28436] ID mask creates 'feather' around ID even with AA turned off.
Perhaps not the ideal solution, but it works, is easy to undo if/when we have a better one, and I?\226?\128?\153m pretty sure it won?\226?\128?\153t break anything...
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
trunk/blender/source/blender/nodes/composite/nodes/node_composite_idMask.c
Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/drawnode.c 2011-10-02 12:34:41 UTC (rev 40741)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c 2011-10-02 12:57:49 UTC (rev 40742)
@@ -1538,6 +1538,7 @@
static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "index", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "smooth_mask", 0, NULL, ICON_NONE);
}
static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2011-10-02 12:34:41 UTC (rev 40741)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2011-10-02 12:57:49 UTC (rev 40742)
@@ -1874,6 +1874,11 @@
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Index", "Pass index number to convert to alpha");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "smooth_mask", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "custom2", 0);
+ RNA_def_property_ui_text(prop, "Smooth Mask", "Apply an anti-aliasing filter to the mask");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_map_uv(StructRNA *srna)
Modified: trunk/blender/source/blender/nodes/composite/nodes/node_composite_idMask.c
===================================================================
--- trunk/blender/source/blender/nodes/composite/nodes/node_composite_idMask.c 2011-10-02 12:34:41 UTC (rev 40741)
+++ trunk/blender/source/blender/nodes/composite/nodes/node_composite_idMask.c 2011-10-02 12:57:49 UTC (rev 40742)
@@ -99,7 +99,7 @@
stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */;
- if(rd->scemode & R_FULL_SAMPLE)
+ if((rd->scemode & R_FULL_SAMPLE) || node->custom2 == 0)
do_idmask_fsa(stackbuf, cbuf, (float)node->custom1);
else
do_idmask(stackbuf, cbuf, (float)node->custom1);
More information about the Bf-blender-cvs
mailing list