Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

BigRoy
Copy link
Contributor

@BigRoy BigRoy commented Sep 14, 2024

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 BigRoy added the type: enhancement Improvement of existing functionality or minor addition label Sep 14, 2024
@BigRoy BigRoy self-assigned this Sep 14, 2024
Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interestingly it works without any errors in latest develop...so not sure if relevant still?

I have just created simple hierarchy of

Group1 and pCube1 as a child....and set both to the Pointcache

Screenshot 2024-09-23 121330

Screenshot 2024-09-23 121311

@BigRoy
Copy link
Contributor Author

BigRoy commented Sep 23, 2024

No idea why it works for you?

image

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

@LiborBatek
Copy link
Member

@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

Copy link
Member

@LiborBatek LiborBatek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All works well, no errors shown! Good to go I guess!

image

@BigRoy BigRoy merged commit 74c0358 into ynput:develop Sep 23, 2024
1 check passed
@BigRoy BigRoy deleted the enhancement/alembic_exclude_hierarchy_ignore_children branch September 23, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants