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
path: root/intern
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 /intern
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 'intern')
-rw-r--r--intern/cycles/blender/addon/ui.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 2c6788b867b..739a555f037 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1916,13 +1916,20 @@ class CYCLES_RENDER_PT_bake_output_margin(CyclesButtonsPanel, Panel):
cbk = scene.render.bake
rd = scene.render
- if rd.use_bake_multires:
- layout.prop(rd, "bake_margin_type", text="Type")
- layout.prop(rd, "bake_margin", text="Size")
+ if (cscene.bake_type == 'NORMAL' and cbk.normal_space == 'TANGENT') or cscene.bake_type == 'UV':
+ if rd.use_bake_multires:
+ layout.prop(rd, "bake_margin", text="Size")
+ else:
+ if cbk.target == 'IMAGE_TEXTURES':
+ layout.prop(cbk, "margin", text="Size")
else:
- if cbk.target == 'IMAGE_TEXTURES':
- layout.prop(cbk, "margin_type", text="Type")
- layout.prop(cbk, "margin", text="Size")
+ if rd.use_bake_multires:
+ layout.prop(rd, "bake_margin_type", text="Type")
+ layout.prop(rd, "bake_margin", text="Size")
+ else:
+ if cbk.target == 'IMAGE_TEXTURES':
+ layout.prop(cbk, "margin_type", text="Type")
+ layout.prop(cbk, "margin", text="Size")