Skip to content

Commit

Permalink
Bugfix on eye slot and duplicate default overlay when applying so as …
Browse files Browse the repository at this point in the history
…not to alter original resource
  • Loading branch information
Matt Seaton committed May 26, 2024
1 parent bec232a commit 49a401a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scripts/auto_updating_humanizer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ func set_skin_color(color: Color) -> void:
func set_eye_color(color: Color) -> void:
eye_color = color
for slot in [&'RightEye', &'LeftEye', &'Eyes']:
if not human_config.body_parts.has(slot):
continue
var bp: HumanBodyPart = human_config.body_parts[slot]
if bp.node is HumanizerMeshInstance:
bp.node.material_config.update_material
Expand Down
2 changes: 1 addition & 1 deletion scripts/humanizer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ func _setup_overlay_material(asset: HumanAsset, existing_config: HumanizerMateri
overlay_dict['ao'] = mi.get_surface_override_material(0).ao_texture.resource_path
var overlay = HumanizerOverlay.from_dict(overlay_dict)
mi.material_config.set_base_textures(HumanizerOverlay.from_dict(overlay_dict))
mi.material_config.add_overlay(asset.default_overlay)
mi.material_config.add_overlay(asset.default_overlay.duplicate(true))

#### Animation ####
func set_rig(rig_name: String) -> void:
Expand Down

0 comments on commit 49a401a

Please sign in to comment.