Skip to content

Commit

Permalink
Fixed Mario wings. Clarified error messages for skinning across switc…
Browse files Browse the repository at this point in the history
…h node. Fixed TL preview.
  • Loading branch information
kurethedead committed Dec 6, 2019
1 parent 81e3239 commit 548a515
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
11 changes: 7 additions & 4 deletions fast64_internal/f3d_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def update_node_values_of_material(material, context):
update_tex_values_manual(material, context)

def update_tex_values_field(self, fieldProperty, texCoordNode, pixelLength,
isTexGen, uvBasisScale, scale, autoprop):
isTexGen, uvBasisScale, scale, autoprop, reverseValues):
clamp = fieldProperty.clamp
mirror = fieldProperty.mirror

Expand All @@ -679,7 +679,10 @@ def update_tex_values_field(self, fieldProperty, texCoordNode, pixelLength,
mask = fieldProperty.mask
shift = fieldProperty.shift

texCoordNode['Normalized L'].outputs[0].default_value = L / pixelLength
if reverseValues:
texCoordNode['Normalized L'].outputs[0].default_value = -L / pixelLength
else:
texCoordNode['Normalized L'].outputs[0].default_value = L / pixelLength
texCoordNode['Normalized H'].outputs[0].default_value = (H + 1)/pixelLength
texCoordNode['Normalized Mask'].outputs[0].default_value = \
(2 ** mask) / pixelLength if mask > 0 else 0
Expand Down Expand Up @@ -708,10 +711,10 @@ def update_tex_values_index(self, context, texProperty, texNodeName,
].default_value = 1024 / tex_size[1]
update_tex_values_field(self, texProperty.S, tex_x, tex_size[0],
self.rdp_settings.g_tex_gen or self.rdp_settings.g_tex_gen_linear,
uvBasisScale[0], scale[0], texProperty.autoprop)
uvBasisScale[0], scale[0], texProperty.autoprop, False)
update_tex_values_field(self, texProperty.T, tex_y, tex_size[1],
self.rdp_settings.g_tex_gen or self.rdp_settings.g_tex_gen_linear,
uvBasisScale[1], scale[1], texProperty.autoprop)
uvBasisScale[1], scale[1], texProperty.autoprop, True)

texFormat = texProperty.tex_format
ciFormat = texProperty.ci_format
Expand Down
3 changes: 2 additions & 1 deletion fast64_internal/sm64_geolayout_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,8 @@ def addSkinnedMeshNode(armatureObj, boneName, skinnedMesh, transformNode, parent
highestChildCopy = highestChildCopyParent
#isFirstChild &= checkIfFirstNonASMNode(highestChildNode)
if highestChildNode.parent is None:
raise ValueError("There shouldn't be a skinned mesh section if there is no deform parent. This error may have ocurred if a switch option node is trying to skin to a parent but no deform parent exists.")
raise ValueError("Issue with \"" + boneName + "\": You cannot skin a mesh across a switch node.")
#raise ValueError("There shouldn't be a skinned mesh section if there is no deform parent. This error may have ocurred if a switch option node is trying to skin to a parent but no deform parent exists.")

# Otherwise, remove the transformNode from the parent and
# duplicate the node heirarchy up to the last deform parent.
Expand Down
Binary file modified mario.blend
Binary file not shown.

0 comments on commit 548a515

Please sign in to comment.