Skip to content

Commit

Permalink
Merge branch 'WolvenKit:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Simarilius-uk authored May 4, 2024
2 parents d7e8f8c + 9688bbd commit fc6f6a6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion i_scene_cp77_gltf/exporters/glb_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def cp77_mesh_options():
def pose_export_options():
options = {
'export_animations': True,
'export_frame_range': True,
'export_anim_slide_to_zero': True,
'export_animation_mode': 'ACTIONS',
'export_anim_single_armature': True,
"export_bake_animation": True
Expand Down
19 changes: 16 additions & 3 deletions i_scene_cp77_gltf/material_types/skin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,21 @@ def create(self,Data,Mat):
CurMat.links.new(tintScale.outputs[0],albedoTintMix.inputs[0])
CurMat.links.new(aImgNode.outputs[0],albedoTintMix.inputs[6])
CurMat.links.new(tintColorGamma.outputs[0],albedoTintMix.inputs[7])
CurMat.links.new(albedoTintMix.outputs[2],pBSDF.inputs['Base Color'])


#Secondary Albedo/a
if "SecondaryAlbedo" in Data:
saImg=imageFromRelPath(Data["SecondaryAlbedo"], DepotPath=self.BasePath, ProjPath=self.ProjPath)
saImgNode = create_node(CurMat.nodes, "ShaderNodeTexImage", (-900,550), label="Secondary Albedo", image=saImg)

overlay = create_node(CurMat.nodes, "ShaderNodeMix", (-150,500), blend_type="OVERLAY", label="Overlay")
overlay.data_type = "RGBA"

CurMat.links.new(saImgNode.outputs[1], overlay.inputs[0])
CurMat.links.new(albedoTintMix.outputs[2], overlay.inputs[6])
CurMat.links.new(saImgNode.outputs[0], overlay.inputs[7])
CurMat.links.new(overlay.outputs[2], pBSDF.inputs['Base Color'])
else:
CurMat.links.new(albedoTintMix.outputs[2], pBSDF.inputs['Base Color'])

#ROUGHNESS+MASK/rm

Expand Down Expand Up @@ -185,4 +198,4 @@ def create(self,Data,Mat):

if "Bloodflow" in Data:
bldImg = imageFromRelPath(Data["Bloodflow"],DepotPath=self.BasePath, ProjPath=self.ProjPath)
bfImgNode = create_node(CurMat.nodes, "ShaderNodeTexImage", (-2000,350), label="Bloodflow", image=bldImg)
bfImgNode = create_node(CurMat.nodes, "ShaderNodeTexImage", (-2000,350), label="Bloodflow", image=bldImg)

0 comments on commit fc6f6a6

Please sign in to comment.