@@ -1644,6 +1644,14 @@ def get_valid_filepath(img, use_hdr):
16441644
16451645 return img .filepath
16461646
1647+ def is_baked_normal_without_bump_needed (root_ch ):
1648+ yp = root_ch .id_data .yp
1649+
1650+ return (
1651+ (not is_overlay_normal_empty (yp ) and (any_layers_using_disp (yp ) or any_layers_using_vdisp (yp ))) or
1652+ (root_ch .enable_subdiv_setup and (any_layers_using_disp (yp ) or any_layers_using_vdisp (yp )))
1653+ )
1654+
16471655def bake_channel (
16481656 uv_map , mat , node , root_ch , width = 1024 , height = 1024 , target_layer = None , use_hdr = False ,
16491657 aa_level = 1 , force_use_udim = False , tilenums = [], interpolation = 'Linear' ,
@@ -1942,8 +1950,8 @@ def bake_channel(
19421950
19431951 if not target_layer :
19441952
1945- ### Normal overlay only
1946- if ( is_overlay_normal_empty ( yp ) or ( not any_layers_using_disp ( yp ) and not any_layers_using_vdisp ( yp ))) and not root_ch . enable_subdiv_setup :
1953+ ### Normal without bump only
1954+ if not is_baked_normal_without_bump_needed ( root_ch ) :
19471955 # Remove baked_normal_overlay
19481956 remove_node (tree , root_ch , 'baked_normal_overlay' )
19491957 else :
@@ -2025,7 +2033,7 @@ def bake_channel(
20252033 if end_linear :
20262034 create_link (tree , ori_soc , end .inputs [root_ch .name ])
20272035
2028- # Set baked normal overlay image
2036+ # Set baked normal without bump image
20292037 if baked_normal_overlay .image :
20302038 temp = baked_normal_overlay .image
20312039 img_users = get_all_image_users (baked_normal_overlay .image )
0 commit comments