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:
authorBastien Montagne <bastien@blender.org>2020-11-17 19:39:47 +0300
committerBastien Montagne <bastien@blender.org>2020-11-17 19:39:47 +0300
commit75dbbaeda6c02972ee8f6fb8ababf0fbe6dd657f (patch)
tree16a8b7ecadaece9b29a15dbbfd0ac1617d47196c /source/blender
parentea7aae88cfe13ae55c1c9c91e968d55c89e1a3b2 (diff)
parent22161b645127b163d7267d2ab95df1d46feffaf7 (diff)
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/image_gpu.c29
-rw-r--r--source/blender/makesrna/intern/rna_animation.c2
2 files changed, 20 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/image_gpu.c b/source/blender/blenkernel/intern/image_gpu.c
index 4d4013e5d1d..026edb0850b 100644
--- a/source/blender/blenkernel/intern/image_gpu.c
+++ b/source/blender/blenkernel/intern/image_gpu.c
@@ -52,16 +52,25 @@ static void image_free_gpu(Image *ima, const bool immediate);
/* Is the alpha of the `GPUTexture` for a given image/ibuf premultiplied. */
bool BKE_image_has_gpu_texture_premultiplied_alpha(Image *image, ImBuf *ibuf)
{
- const bool type_is_premultiplied = (image == NULL) || ELEM(image->type,
- IMA_TYPE_R_RESULT,
- IMA_TYPE_COMPOSITE,
- IMA_TYPE_UV_TEST);
- const bool store_premultiplied =
- type_is_premultiplied ||
- ((ibuf != NULL) &&
- (ibuf->rect_float ? (image ? (image->alpha_mode != IMA_ALPHA_STRAIGHT) : false) :
- (image ? (image->alpha_mode == IMA_ALPHA_PREMUL) : true)));
- return store_premultiplied;
+ if (image) {
+ /* Render result and compositor output are always premultiplied */
+ if (ELEM(image->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) {
+ return true;
+ }
+ /* Generated images use pre multiplied float buffer, but straight alpha for byte buffers. */
+ if (image->type == IMA_TYPE_UV_TEST && ibuf) {
+ return ibuf->rect_float != NULL;
+ }
+ }
+ else if (ibuf) {
+ if (ibuf->rect_float) {
+ return image ? (image->alpha_mode != IMA_ALPHA_STRAIGHT) : false;
+ }
+ else {
+ return image ? (image->alpha_mode == IMA_ALPHA_PREMUL) : true;
+ }
+ }
+ return false;
}
/* -------------------------------------------------------------------- */
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index a50d27a726b..0a9f2ff4819 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -1160,7 +1160,7 @@ static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_pointer_funcs(
prop, "rna_NlaTrack_active_get", "rna_NlaTrack_active_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Constraint", "Active Object constraint");
+ RNA_def_property_ui_text(prop, "Active Track", "Active NLA Track");
/* XXX: should (but doesn't) update the active track in the NLA window */
RNA_def_property_update(prop, NC_ANIMATION | ND_NLA | NA_SELECTED, NULL);
}