Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/multires_bake.c
| Show First 20 Lines • Show All 1,298 Lines • ▼ Show 20 Lines | |||||
| static void bake_ibuf_filter(ImBuf *ibuf, char *mask, const int filter) | static void bake_ibuf_filter(ImBuf *ibuf, char *mask, const int filter) | ||||
| { | { | ||||
| /* must check before filtering */ | /* must check before filtering */ | ||||
| const bool is_new_alpha = (ibuf->planes != R_IMF_PLANES_RGBA) && BKE_imbuf_alpha_test(ibuf); | const bool is_new_alpha = (ibuf->planes != R_IMF_PLANES_RGBA) && BKE_imbuf_alpha_test(ibuf); | ||||
| /* Margin */ | /* Margin */ | ||||
| if (filter) { | if (filter) { | ||||
| IMB_filter_extend(ibuf, mask, filter); | IMB_filter_extend(ibuf, mask, filter, false); | ||||
| } | } | ||||
| /* if the bake results in new alpha then change the image setting */ | /* if the bake results in new alpha then change the image setting */ | ||||
| if (is_new_alpha) { | if (is_new_alpha) { | ||||
| ibuf->planes = R_IMF_PLANES_RGBA; | ibuf->planes = R_IMF_PLANES_RGBA; | ||||
| } | } | ||||
| else { | else { | ||||
| if (filter && ibuf->planes != R_IMF_PLANES_RGBA) { | if (filter && ibuf->planes != R_IMF_PLANES_RGBA) { | ||||
| ▲ Show 20 Lines • Show All 182 Lines • Show Last 20 Lines | |||||