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:
authorMartijn Versteegh <Baardaap>2022-04-08 18:43:44 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-04-10 17:31:11 +0300
commit811371a6bddd5c3d7ea33fa8a5ccb7d3d36baf43 (patch)
tree152b110f2f9aa82331a611590f97e9835fe413ea /source/blender/editors/object/object_bake_api.c
parent1db3e26c743a1c914b6db985ee11073248d0baf9 (diff)
Fix T96942: disable Adjacent Faces margin for UVs and tangent space bake
Use the Extend method for these, as these do not work correctly. For UVs it's better to extend the UVs from the same face, and for tangent space the normals should be encoded in a matching tangent space. Later the Adjacent Faces method might be improved to support these cases. Ref T96977 Differential Revision: https://developer.blender.org/D14572
Diffstat (limited to 'source/blender/editors/object/object_bake_api.c')
-rw-r--r--source/blender/editors/object/object_bake_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index fec87fbfa95..3060a1ecf62 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -1670,6 +1670,11 @@ static void bake_init_api_data(wmOperator *op, bContext *C, BakeAPIRender *bkr)
if (bkr->save_mode == R_BAKE_SAVE_EXTERNAL) {
bkr->save_mode = R_BAKE_SAVE_INTERNAL;
}
+
+ if (((bkr->pass_type == SCE_PASS_NORMAL) && (bkr->normal_space == R_BAKE_SPACE_TANGENT)) ||
+ bkr->pass_type == SCE_PASS_UV) {
+ bkr->margin_type = R_BAKE_EXTEND;
+ }
}
static int bake_exec(bContext *C, wmOperator *op)