-
Notifications
You must be signed in to change notification settings - Fork 5
Make ayon-resolve support free DaVinci Resolve version. #61
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
Conversation
client/ayon_resolve/startup.py
Outdated
# https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=113252 | ||
ayon_resolve.api.ResolveHost.set_resolve_modules_from_app(app) # noqa: F821 | ||
|
||
host = ayon_resolve.api.ResolveHost() |
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.
Does this work?
# https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=113252 | |
ayon_resolve.api.ResolveHost.set_resolve_modules_from_app(app) # noqa: F821 | |
host = ayon_resolve.api.ResolveHost() | |
host = ayon_resolve.api.ResolveHost() | |
host.set_resolve_modules_from_app(app) |
Seems more readable. :)
Also, what you could do at the top of the file is maybe:
# App is provided when running a Resolve script from the menu
app: object # noqa: F821
Or something along those lines.
Just to indicate more clearly that it comes from somewhere - provided by e.g. Resolve running the script.
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.
So I've added your suggestion and move up some documentation so this app
thing is really straight in your face.
(had to leave some noqa because ruff still complains about further app
usage down the road, not sure why).
app: object # noqa: F821
thanks for that 👍
Regarding the code readability, I'd prefer stick with my implementation if that's OK.
I think it better enforces that this is something that needs to be cached immediatly at class level before any instance is made. Because if you don't, you might loose any possibility to create workable instance down the road.
Your suggestion looks like we are setting an attribute instance instead.
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 am not able to test it since I do not have the Free version, but code seems valid. Anybody want to try? https://swr.cloud.blackmagicdesign.com/DaVinciResolve/v20.0/DaVinci_Resolve_20.0_Windows.zip?verify=1749114089-lewdNVU86N8GMzKeY%2F2kZfqk8uSM8clhuqBwFEsEHso%3D
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 nice!
Tested in resolve 18.6
free.
- I can open all the pipeline tools
- Workfile tool works, I Can sav
8000
e, change context and upversion.
- Loading and scene inventory work
- creating instances work, triggering validation work. I was not able to publish, I guess becasue of my limited knewledge. (log mentioned
Could not retrieve otioClip for shot %r
)
I got this error when loading.. (I suspect it happens becasue I don't have a user named libor on my instance, so ignore it).
During load error happened on Product: "renderGenericMain_sh020" Representation: "h264_png" Version: 6
Error message: 'author'
Traceback (most recent call last):
File "E:\Ynput\ayon-core\client\ayon_core\tools\loader\models\actions.py", line 740, in _load_representations_by_loader
load_with_repre_context(
File "E:\Ynput\ayon-core\client\ayon_core\pipeline\load\utils.py", line 319, in load_with_repre_context
return loader.load(repre_context, name, namespace, options)
File "E:\Ynput\ayon-resolve\client\ayon_resolve\plugins\load\load_media.py", line 217, in load
item = self._import_media_to_bin(context, media_pool, representation)
File "E:\Ynput\ayon-resolve\client\ayon_resolve\plugins\load\load_media.py", line 277, in _import_media_to_bin
data = self._get_container_data(context)
File "E:\Ynput\ayon-resolve\client\ayon_resolve\plugins\load\load_media.py", line 386, in _get_container_data
data[key] = version["data"][key]
KeyError: 'author'
I still can see the product loaded but I can't find it in the scene inventory.
Changelog Description
Rework the Fusion+Resolve application gathering so it can accomodate the free version of DaVinci Resolve.
Based on: https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=113252
Many thanks to Agora Studios and Toke Jepsen for helping us make resolve free edition work with AYON.
Testing notes: