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

Houdini: Support multiple representations in batch publishing #6

Conversation

MustafaJafar
Copy link

@MustafaJafar MustafaJafar commented May 23, 2024

Changelog Description

Support multiple representations in batch publishing
This PR extends ynput#542

Additional info

I used this script https://gist.github.com/MustafaJafar/bd2a388e4a6aa3613d64a186ebb6660c to test this PR

Testing notes:

  1. Launch Houdini via AYON Launcher
  2. Do some batch publishing. you can use my example script.

Comment on lines +144 to +147
files = eval_files_from_output_path(
output_path,
instance_data["frameStart"],
instance_data["frameEnd"])
Copy link
Owner

Choose a reason for hiding this comment

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

By doing this here - instead of requiring an explicit list of files as input to the creator basically means that this logic with resolving e.g. $F4 which is essentially Houdini-specific now makes this Creator houdini targeted only whereas it would be great that this could work as an even lower-level generic creator ... anywhere.

So basically I do like this - but let's keep thinking about how, by design, this exact same lower level logic can run anywhere without being houdini specific. This "runtime instance" may very well run in a python process on the farm outside of Houdini for example.

Copy link
Author

Choose a reason for hiding this comment

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

what about passing the representation to the creator.
and in each DCC we should compute it and pass it to the creator.
taking reference from fabia's demo.
image

and then creator can compute frame start and end from the input files.

Comment on lines +136 to +141
files = pre_create_data.get("files", [])
if files:
representations = [create_representation_data(files)]

output_paths = pre_create_data.get("output_paths", [])
if output_paths:
Copy link
Owner

Choose a reason for hiding this comment

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

We should remove one of these two - have a single entry point that is used for the creator which we use as the "API". By exposing more ways we're just adding complexity ;)

By the way, output_paths really got me confused because I see these files actually as the 'input files' for the created instance (since basically this runtime instance expects the files to pre-exist hehe). Anyway, just files or paths or filepaths should suffice.

@@ -20,11 +22,75 @@ def create_representation_data(files):
return {
"name": ext,
"ext": ext,
"files": files if len(files) > 1 else first_file,
"files": files if len(files) > 1 else filename,
Copy link
Owner

Choose a reason for hiding this comment

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

Ah, yes - that fixes a bug. Thanks!

@MustafaJafar MustafaJafar marked this pull request as draft May 28, 2024 17:24
@BigRoy
Copy link
Owner

BigRoy commented Jun 3, 2024

@MustafaJafar would you like me pick this up?

@MustafaJafar
Copy link
Author

@MustafaJafar would you like me pick this up?

feel free to do so ^^

@MustafaJafar
Copy link
Author

This PR was made to test supporting multiple representations in a wip feature generic publish.
closing this PR as it doesn't solve the issue in a favorite way.

@BigRoy
Copy link
Owner

BigRoy commented Jul 10, 2024

Thanks - actually some of it is still very relevant. I just need to fix it the right way 😄 so still thanks a lot for generating this draft!

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.

2 participants