ynput / ayon-maya

Maya addon for AYON
Apache License 2.0
6 stars 9 forks source link

Maya: Animation FBX Export feedback #31

Open antirotor opened 7 months ago

antirotor commented 7 months ago

Is there an existing issue for this?

Current Behavior:

When publishing animation from Maya, if FBX extraction is enabled but rig isn't set properly (content of sets), Extract Animation FBX (ExtractFBXAnimation) will just inform you in the log, but that is all and the publishing will continue. Result is, that your version is missing FBX representation then and you never know until someone tries to use it.

These are the problematic lines: https://github.com/ynput/ayon-core/blob/37f11f9bba630dff98443326e87b1fc5e7908b25/client/ayon_core/hosts/maya/plugins/publish/extract_fbx_animation.py#L50-L53

Expected Behavior:

There should be validator that will trigger on this condition that is now causing "skipping' behaviour in the Extractor. And if it is really soft-fail condition, then it should at least produce warning.

Version

1.0.0

What platform you are running on?

Windows

Steps To Reproduce:

  1. Create rig in Maya that fulfills this condition (top group is not found)
  2. Publish animation with that rig with FBX workflow enabled.

Are there any labels you wish to add?

Relevant log output:

DEBUG: Top group of animated skeleton not found in ['robot_rigMain_01_:rigMain_skeletonAnim_SET'].
Skipping fbx animation extraction.

Additional context:

No response

[cuID:AY-4757]

moonyuet commented 7 months ago

There is actually a validator for skeleton rig contents, which validates the elements inside the set. Guess we can do some enhancement on top of that. https://github.com/ynput/ayon-core/blob/194e41563b66b6267d206ae8bb0b531945228e56/client/ayon_core/hosts/maya/plugins/publish/validate_rig_contents.py#L205-L260