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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-03-01 19:37:15 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-03-01 19:37:15 +0400
commitf186f89a42575622a9939a6fbe3f240d2a1ba85a (patch)
tree97fb62739b7efb67694d78ed54d38ea59578c10d /source/blender/makesrna/intern
parent69f746d04cdb87d701f0e9ccc56f2fc236f8dd95 (diff)
Fix #34461: Inconsistent behavior of "Color Mix Node" and "Alpha Over Node"
Added compatibility option "Straight Alpha Output" to image input node When this option is enabled, image input node will convert float buffer to straight alpha. This is not what you'll usually want with new alpha pipeline, nit this is needed to preserve compatibility with older files saved in 2.65. In that version byte image are resulting with straight alpha passing to the compositor and alpha-overing required extra premultiplication of inputs. So, that's why Straight Alpha Output is needed -- it's set in versioning code for byte node images so they'll still output straight alpha. This option is currently only available in N-panel. Additional change: added Alpha Mode for image input node to N-panel.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 1fff567f25c..73fe5f3a48d 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2412,7 +2412,12 @@ static void def_cmp_image(StructRNA *srna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
-
+
+ prop = RNA_def_property(srna, "use_straight_alpha_output", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "custom1", CMP_NODE_IMAGE_USE_STRAIGHT_OUTPUT);
+ RNA_def_property_ui_text(prop, "Straight Alpha Output", "Put Node output buffer to straight alpha instead of premultiplied");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
/* NB: image user properties used in the UI are redefined in def_node_image_user,
* to trigger correct updates of the node editor. RNA design problem that prevents
* updates from nested structs ...