-
Notifications
You must be signed in to change notification settings - Fork 36
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: Implement Load Asset LOP HDA #294
Houdini: Implement Load Asset LOP HDA #294
Conversation
@iLLiCiTiT this also uses some logic to store a temporary thumbnail alongside the scene so that Houdini can display it - in the screenshot with the PR for example the checkerboard image above the node bottom right. There may be much better ways, but for now I just wanted to highlight this uses some version thumbnails logic from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to make these changes on my side to make it work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two suggestions to make this HDA more fun.
- A button to select folder path (which is the same as the button in the publisher UI)
This logic works on my side.
"""Select a folder path."""
from ayon_core.pipeline import get_current_project_name
from ayon_core.tools.publisher.widgets.folders_dialog import FoldersDialog
from ayon_core.tools.utils.host_tools import get_tool_by_name
from ayon_core.hosts.houdini.api.lib import get_main_window
project_name = get_current_project_name()
main_window = get_main_window()
publisher_window = get_tool_by_name( tool_name="publisher", parent=main_window)
dialog = FoldersDialog(publisher_window.controller, main_window)
dialog.exec_()
selected_folder_path = dialog.get_selected_folder_path()
print ("asset name:", selected_folder_path)
- A button to select a USD product name.
This snippet works. it gets a list of usd products within a particular folderpath
import ayon_api
project_name = "Robo"
folder_path = "/Assets/Character/bigrobo"
my_product_type = "usd"
id_only = ["id"]
folder_entity = ayon_api.get_folder_by_path(project_name,
folder_path,
fields=id_only)
my_folder_id = folder_entity["id"]
my_usd_products = ayon_api.get_products(
project_name,
folder_ids = [my_folder_id],
product_types = [my_product_type]
)
print(list(map(lambda p: p["name"], my_usd_products)))
irrelevant to this PR.
- I think adding a product type selector in the HDA can be used to enhance the previous code snippet. which can be a starting point to have a generic loader. where the digital asset acts as a container and nodes inside it are created based on the data in each loader.
I'm not sure if I rephrased it correctly. but, I hope you get me.
Yes, please. I'd love there to be buttons that show a mini-list dialog to pick from. Feel free to make a PR to my branch with those features. it'd be greatly appreciated 😍 - I looked into it in OpenPype but the dialogs then weren't to trivial to hijack into but if you have a good hack for AYON, go for it! Would you be able to contribute? It would be a major help for this loader HDA tooling anywhere in Houdini. :)
Interesting, seems like I might have missed pushing a few commits - because it did work for me. |
Co-authored-by: Mustafa Taher <mustafataherzaky@outlook.com>
…om/BigRoy/ayon-core into enhancement/houdini_load_asset_lop
I was born ready to contribute 🤓.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super cool and it works.
I didn't test some of its features : thumbnails (I don't have products with thumbnails) and load options (look fine as it's just straight forward copied parameters).
…t_representation(node, repre_id): in order to avoide error shadowing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some things I found.
Sorry for the one commit I made; I will leave it as comments from now on.
Also, I have one question in case you tested it. In the on_save() function in pipline.py, there is a call to a function that apparently only exists in the Maya lib.py, and it errors on save. I'm not sure if it does that for you, too.
Lovely stuff btw.
…ancement/houdini_load_asset_lop
...t/ayon_houdini/startup/otls/ayon_lop_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript
Show resolved
Hide resolved
…_import.hda/ayon_8_8Lop_1lop__import_8_81.0/DialogScript Co-authored-by: Mustafa Taher <mustafataherzaky@outlook.com>
…add_product_selection Houdini: Asset LOP HDA: Add products drop down menu
…ancement/houdini_load_asset_lop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested successfully in Houdini 19.5
Co-authored-by: Mustafa Taher <mustafataherzaky@outlook.com>
…Pype lingo, `folderPath` is where all the cool kids are at.
Sorry @moonyuet @MustafaJafar I accidentally re-requested the review on the wrong PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working as cool as before
Changelog Description
Implements a LOPs (Solaris / USD) asset loader to reference or payload in files into the Solaris stage.
$AYON_PROJECT_NAME
and$AYON_FOLDER_PATH
representing the project and folder of your current context.Additional info
This is a further enhancement from this OpenPype PR ynput/OpenPype#5831
Some of that can also be seen in the presentation I gave at the Ynput Summit 2024 here.
We have actually used an OpenPype-equivalent in production. Nonetheless I still expect many bugs (and feature requests) so input is greatly welcomed. I'm inviting you to break it and provide feedback. Also provide screen recordings if you get stuck so we can see how "other users" try to use it. @fabiaserra @MustafaJafar @moonyuet @antirotor you are cordially invited.
I did a pretty quick refactor to AYON, so testing is greatly appreciated! :)
Other visual reference of a 'similar' implementation by @fabiaserra here.
Testing notes: