Skip to content

Commit

Permalink
[F3D] Fixed two issues with ex3 cellshading (#380)
Browse files Browse the repository at this point in the history
Check for f3dex3 GBI before for writing cel levels, and remove the icon="Error" keyword argument that was causing the exception raise to fail
  • Loading branch information
Lilaa3 authored Jul 19, 2024
1 parent db91def commit 67de45d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fast64_internal/f3d/f3d_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ def processGeometry(self):
triCmds = createTriangleCommands(
self.vertexBufferTriangles, self.vertBuffer, not self.triConverterInfo.f3d.F3D_OLD_GBI
)
if not self.material.f3d_mat.use_cel_shading:
if not self.triConverterInfo.f3d.F3DEX_GBI_3 or not self.material.f3d_mat.use_cel_shading:
self.triList.commands.extend(triCmds)
else:
if len(triCmds) <= 2:
Expand All @@ -1021,8 +1021,7 @@ def writeCelLevels(self, celTriList: Optional[GfxList] = None, triCmds: Optional
# first before switching to decal.
if f3dMat.rdp_settings.zmode != "ZMODE_OPA":
raise PluginError(
f"Material {self.material.name} with cel shading: zmode in blender / rendermode must be opaque.",
icon="ERROR",
f"Material {self.material.name} with cel shading: zmode in blender / rendermode must be opaque."
)
wroteLighter = wroteDarker = usesDecal = False
if len(cel.levels) == 0:
Expand Down

0 comments on commit 67de45d

Please sign in to comment.