[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58202] trunk/blender/source/blender: Fix #35586: add an option to the Z Combine compositing node to disable the Z

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Jul 12 22:15:23 CEST 2013


Revision: 58202
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58202
Author:   blendix
Date:     2013-07-12 20:15:22 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
Fix #35586: add an option to the Z Combine compositing node to disable the Z
buffer antialiasing that was restored in 2.67 after it was missing in the new
compositor implementation.

This option tends to make results worse rather then better for Cycles renders,
but is useful for Blender internal. Their Z-buffers look quite different for
antialiasing, and I'd rather not change either.

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/nodes/COM_ZCombineNode.cpp
    trunk/blender/source/blender/editors/space_node/drawnode.c
    trunk/blender/source/blender/makesrna/intern/rna_nodetree.c

Modified: trunk/blender/source/blender/compositor/nodes/COM_ZCombineNode.cpp
===================================================================
--- trunk/blender/source/blender/compositor/nodes/COM_ZCombineNode.cpp	2013-07-12 19:32:36 UTC (rev 58201)
+++ trunk/blender/source/blender/compositor/nodes/COM_ZCombineNode.cpp	2013-07-12 20:15:22 UTC (rev 58202)
@@ -34,7 +34,7 @@
 
 void ZCombineNode::convertToOperations(ExecutionSystem *system, CompositorContext *context)
 {
-	if (context->getRenderData()->scemode & R_FULL_SAMPLE) {
+	if ((context->getRenderData()->scemode & R_FULL_SAMPLE) || this->getbNode()->custom2) {
 		if (this->getOutputSocket(0)->isConnected()) {
 			ZCombineOperation *operation = NULL;
 			if (this->getbNode()->custom1) {

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/drawnode.c	2013-07-12 19:32:36 UTC (rev 58201)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c	2013-07-12 20:15:22 UTC (rev 58202)
@@ -1379,6 +1379,7 @@
 	
 	col = uiLayoutColumn(layout, TRUE);
 	uiItemR(col, ptr, "use_alpha", 0, NULL, ICON_NONE);
+	uiItemR(col, ptr, "use_antialias_z", 0, NULL, ICON_NONE);
 }
 
 

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c	2013-07-12 19:32:36 UTC (rev 58201)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c	2013-07-12 20:15:22 UTC (rev 58202)
@@ -5148,6 +5148,11 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "custom1", 0);
 	RNA_def_property_ui_text(prop, "Use Alpha", "Take Alpha channel into account when doing the Z operation");
 	RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
+	prop = RNA_def_property(srna, "use_antialias_z", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "custom2", 0);
+	RNA_def_property_ui_text(prop, "Anti-Alias Z", "Anti-alias the z-buffer to try to avoid artifacts, mostly useful for Blender renders");
+	RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
 }
 
 static void def_cmp_ycc(StructRNA *srna)




More information about the Bf-blender-cvs mailing list