Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5524 from BigRoy/bugfix/maya_validate_shape_zero_…
Browse files Browse the repository at this point in the history
…repair

Maya: Validate Shape Zero fix repair action + provide informational artist-facing report
  • Loading branch information
iLLiCiTiT authored Sep 1, 2023
2 parents 9cf21b7 + afebe08 commit 6f683ee
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions openpype/hosts/maya/plugins/publish/validate_shape_zero.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from openpype.pipeline.publish import (
ValidateContentsOrder,
RepairAction,
PublishValidationError
)


Expand Down Expand Up @@ -67,5 +68,30 @@ def process(self, instance):

invalid = self.get_invalid(instance)
if invalid:
raise ValueError("Shapes found with non-zero component tweaks: "
"{0}".format(invalid))
raise PublishValidationError(
title="Shape Component Tweaks",
message="Shapes found with non-zero component tweaks: '{}'"
"".format(", ".join(invalid)),
description=(
"## Shapes found with component tweaks\n"
"Shapes were detected that have component tweaks on their "
"components. Please remove the component tweaks to "
"continue.\n\n"
"### Repair\n"
"The repair action will try to *freeze* the component "
"tweaks into the shapes, which is usually the correct fix "
"if the mesh has no construction history (= has its "
"history deleted)."),
detail=(
"Maya allows to store component tweaks within shape nodes "
"which are applied between its `inMesh` and `outMesh` "
"connections resulting in the output of a shape node "
"differing from the input. We usually want to avoid this "
"for published meshes (in particular for Maya scenes) as "
"it can have unintended results when using these meshes "
"as intermediate meshes since it applies positional "
"differences without being visible edits in the node "
"graph.\n\n"
"These tweaks are traditionally stored in the `.pnts` "
"attribute of shapes.")
)

0 comments on commit 6f683ee

Please sign in to comment.