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

Maya: Validate Shape Zero fix repair action + provide informational artist-facing report #5524

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.")
)