ynput / ayon-maya

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

Alembic exports: Fix parenting/ancestor relationship errors when include parent hierarchy is off #108

Closed BigRoy closed 2 months ago

BigRoy commented 2 months ago

Changelog Description

On alembic export fix error on parent and child members in object set with include parent hierarchy disabled.

Additional info

Fixes error on extraction:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process
    runner(*args)
  File "E:\dev\ayon-maya\client\ayon_maya\plugins\publish\extract_pointcache.py", line 232, in process
    extract_alembic(**kwargs)
  File "E:\dev\ayon-maya\client\ayon_maya\api\alembic.py", line 341, in extract_alembic
    cmds.AbcExport(
  File "E:\dev\ayon-maya\client\ayon_maya\plugins\publish\extract_pointcache.py", line 2, in AbcExport
RuntimeError: |group1 and |group1|pCube1 have parenting relationships
|group1 and |group1|pCube1 have an ancestor relationship.

Testing notes:

  1. Create a mesh and group it (so there's parent child relationship)
  2. Add both the mesh and group into a pointcache instance.
  3. Make sure "Include parent hierarchy" is disabled on the instance.
  4. Publish should succeed.

Without this PR this would generate an error.

BigRoy commented 2 months ago

No idea why it works for you?

image

Can you please try again with develop once more? And share a JSON publish report?

LiborBatek commented 2 months ago

@BigRoy ok, so it just passed the validations ans then failed...as I havent finnished the full publish process before...sry my bad assumption...now it "correctly" fails with latest...LGTM haha

will test in this PR branch and give it review