Skip to content

Commit

Permalink
Fix: Using transition bump with add blend type will produce wrong max…
Browse files Browse the repository at this point in the history
… height value
  • Loading branch information
ucupumar authored and Kareemov03 committed Sep 1, 2024
1 parent ddcb16f commit 0f0780b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Binary file modified lib.blend
Binary file not shown.
2 changes: 2 additions & 0 deletions lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@
TB_DELTA_CALC = '~yPL Transition Bump Delta Calculation'
CH_MAX_HEIGHT_CALC = '~yPL Layer Channel Max Height'
CH_MAX_HEIGHT_TB_CALC = '~yPL Layer Channel Max Height with Transition Bump'
CH_MAX_HEIGHT_TB_ADD_CALC = '~yPL Layer Channel Max Height with Transition Bump Add'
CH_MAX_HEIGHT_TBC_CALC = '~yPL Layer Channel Max Height with Transition Bump Crease'
CH_MAX_HEIGHT_TBC_ADD_CALC = '~yPL Layer Channel Max Height with Transition Bump Crease Add'

EMULATED_CURVE = '~yPL Emulated Curve'
EMULATED_CURVE_FLIP = '~yPL Emulated Curve Flip'
Expand Down
8 changes: 6 additions & 2 deletions subtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,9 +1809,13 @@ def check_channel_normal_map_nodes(tree, layer, root_ch, ch, need_reconnect=Fals
# Max Height calculation node
if ch.enable_transition_bump:
if ch.transition_bump_crease and not ch.transition_bump_flip:
lib_name = lib.CH_MAX_HEIGHT_TBC_CALC
if ch.normal_blend_type == 'OVERLAY':
lib_name = lib.CH_MAX_HEIGHT_TBC_ADD_CALC
else: lib_name = lib.CH_MAX_HEIGHT_TBC_CALC
else:
lib_name = lib.CH_MAX_HEIGHT_TB_CALC
if ch.normal_blend_type == 'OVERLAY':
lib_name = lib.CH_MAX_HEIGHT_TB_ADD_CALC
else: lib_name = lib.CH_MAX_HEIGHT_TB_CALC
else:
lib_name = lib.CH_MAX_HEIGHT_CALC

Expand Down

0 comments on commit 0f0780b

Please sign in to comment.