Skip to content

Commit

Permalink
Merge pull request #61 from soupday/Dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
soupday authored Aug 29, 2024
2 parents a0ef8aa + 9947ee0 commit 3e41da4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Changelog
=========

### 2.1.7
- Normal maps imported separately from batch substance import as it does not correctly assign to Normal channel under certain circumstances.
- Normal map fix for imported characters.
- Sync lights includes scene IBL from visual settings.

### 2.1.6
Expand Down
4 changes: 2 additions & 2 deletions btp/cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class SkinBoneType(IntEnum):
"Refraction": [EMaterialTextureChannel_Refraction, False, ""],
"Cube": [EMaterialTextureChannel_Cube, False, ""],
"AO": [EMaterialTextureChannel_AmbientOcclusion, True, "ao"],
"Bump": [EMaterialTextureChannel_Bump, False, "bump"],
"Normal": [EMaterialTextureChannel_Normal, False, "normal"],
"Bump": [EMaterialTextureChannel_Bump, True, "bump"],
"Normal": [EMaterialTextureChannel_Normal, True, "normal"],
}


Expand Down
11 changes: 11 additions & 0 deletions btp/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,17 @@ def import_substance_textures(self, mesh_materials):
if not M.has_json():
continue

# The FbxKey will attempt to restore old textures,
# but it wrongly restores the Normals into the Bump channel,
# and the LoadSubstancePainterTextures() does not overrule this.
# This causes major problems with texture channel loading later on,
# so we need to remove all the existing normals and bump maps now:
if True:
if M.channel_has_image(RLPy.EMaterialTextureChannel_Bump):
M.remove_channel_image(RLPy.EMaterialTextureChannel_Bump)
if M.channel_has_image(RLPy.EMaterialTextureChannel_Normal):
M.remove_channel_image(RLPy.EMaterialTextureChannel_Normal)

if not F or F.mesh_name != M.mesh_name or M.mesh_name != "CC_Base_Body":
F = M

Expand Down

0 comments on commit 3e41da4

Please sign in to comment.