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

Extract Layout: Add repre_type as json element #104

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

moonyuet
Copy link
Member

@moonyuet moonyuet commented Sep 11, 2024

Changelog Description

This PR is to add extension of the loaded asset as part of the elements in the json published from extract layout.
Resolve #100

Additional info

The adjustment of the codes does not mean the transformation data of alembic has been fixed (The related code still hasn't been touched)

Testing notes:

  1. Extract Layout
  2. Should be published successfully

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.

Did produce new Layout and compared it to the older JSON and seems working nicely...

Screenshot 2024-09-12 093544

also loads normally into UE

Screenshot 2024-09-12 093817

@moonyuet moonyuet marked this pull request as ready for review September 12, 2024 07:52
@@ -99,13 +96,15 @@ def process(self, instance):
"instance_name": cmds.getAttr(
"{}.namespace".format(container)),
"representation": str(representation_id),
"version": str(version_id)
"version": str(version_id),
"extension": representation["name"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that the representation name does not have to be the extension. A representation may also have representation["ext"], right @iLLiCiTiT ? Not sure if that is ALWAYS set though.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess it's not supported yet?
image

Copy link
Member

@iLLiCiTiT iLLiCiTiT Sep 16, 2024

Choose a reason for hiding this comment

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

@moonyuet the error is not because it is not supported, but because you don't fill it (not your, but who implemented repre creation). You can fill "ext" with extension and "name" with whatever you want -> name can be "algebraic_theorem", but ext would be "txt".

NOTE: I don't know full context, let me know If I'm off.

BTW I see line above there is stored version id, why is not stored representation id here too? It is not yet known? How is the version id known in that case?

Copy link
Member

@iLLiCiTiT iLLiCiTiT Sep 16, 2024

Choose a reason for hiding this comment

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

I just looked and you're working with existing representation entity. So the ext is in representation["context"]["ext"].

NOTE: And also found out that it takes product type from representation context too, which is not really good idea. It should fetch product entity and use productType from it (not related to this PR).

client/ayon_maya/plugins/publish/extract_layout.py Outdated Show resolved Hide resolved
client/ayon_maya/plugins/publish/extract_layout.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extract Layout: Representation Type
4 participants