Closed BigRoy closed 3 weeks ago
Should we care about these warnings ?
Yes, we should! I thought I had fixed that already but maybe I forgot to push. Will continue with this.
Will also need to decide what to do with the thumbnails. Before this PR it was created to "auto-update" on context update (but especially now with those being expressions that makes even less sense.) Mark from SideFX says it best:
You should really not be "doing things" as a result of evaluating expressions.
So I guess for now the easiest way is to remove how it's "live" and then just add a "Update thumbnail" button. We can think of better fixes down the line.
Isn't this cool!
I published three products pointcacherock_1
, pointcacherock_2
and pointcacherock_3
and loading them inside a loop works! (as loops are based on context options)
Note: I don't know if my example here is favorite in production. tbh, I don't know what is the best way to publish multiple variants of my pointcache products. maybe it's the correct workflow since different variants of an AYON product are just different AYON products.
@MustafaJafar could you give it one last test-drive?
on my side,
Reload Files
then Update Thumbnail
, I get the following warning.
Clear Cache
then Update Thumbnail
, I get the following error:
Traceback (most recent call last):
File "ayon::Lop/lop_import::1.0/update_thumbnail", line 1, in <module>
File "E:\Ynput\ayon-houdini\client\ayon_houdini\api\hda_utils.py", line 189, in update_thumbnail
repre_entity = get_representation_by_id(project_name, representation_id)
File "E:\Ynput\ayon-launcher\.venv\lib\site-packages\ayon_api\_api.py", line 3449, in get_representation_by_id
return con.get_representation_by_id(*args, **kwargs)
File "E:\Ynput\ayon-launcher\.venv\lib\site-packages\ayon_api\server_api.py", line 6533, in get_representation_by_id
for representation in representations:
File "E:\Ynput\ayon-launcher\.venv\lib\site-packages\ayon_api\server_api.py", line 6489, in get_representations
for parsed_data in query.continuous_query(self):
File "E:\Ynput\ayon-launcher\.venv\lib\site-packages\ayon_api\graphql.py", line 378, in continuous_query
raise GraphQlQueryFailed(
ayon_api.exceptions.GraphQlQueryFailed: GraphQl query Failed: Invalid entity ID None on item 'project/representations' (Line 3 Column 5)
Update thumbnail is buggy, to make it reliable, I need to trigger reload every time before clicking update thumbnail.
Correct, update thumbnail is intentionally not live - since expressions should not be allowed to edit the graph aside of the return value from the expression.
As such, @MustafaJafar I suppose everything works? :)
Correct, update thumbnail is intentionally not live - since expressions should not be allowed to edit the graph aside of the return value from the expression.
yes, but I've to click two button to actually update the thumbnail.
yes, but I've to click two button to actually update the thumbnail.
Ah I see now. It's even weider because the representation id on that node doesn't seem to update? Nor does the filepath in the parameter window? (even though it does update in the view).
I guess it has to do with how Houdini applies "Context Options" only in a certain context of the display viewer which isn't necessarily the attribute visually shown in the parameter window and evaluated from node.evalParm()
or alike.
As such, this may be something that'd be hard to support regardless (to update the thumbnail correctly based on what you're displaying in the graph currently). I wouldn't bother for now.
Let's merge.
Changelog Description
Replace the Load LOPs parm callbacks with expressions on the file parms to support Solaris Context Options.
Additional info
With this PR, the LOP load nodes now LIVE update based on context options. Meaning, using context-options you can now easily do multi-shot lighting!
Fixes: https://github.com/ynput/ayon-houdini/issues/111
https://github.com/user-attachments/assets/a3807f41-eb24-4da9-94b9-1a88fca840db
Credit: Audio snippet in the background at the beginning is a few seconds of the start from this Youtube video
TODO
Testing notes: