The forum is active for archival purposes only.
Join our discord communityย for new topics.
Nuke Studio "Shot Adder"/ Python "api"?
Quote from petertimberlake on 4. February 2021, 2:59Hi Richard - thanks so much for your incredible open source tool! I'm just now diving in, so forgive me if I'm retracing steps here.
I'm reaching out for a bit of support, and perhaps offer a bit of support with adding a Nuke Studio / Hiero feature.
As I'm sure you're well aware, Nuke Studio has the incredibly useful tool which creates an entire directory structure, render plates, creates nuke scripts, etc. And you can also sneak in python commands for each shot. At our little studio, we've created a Nuke Studio Uploader to our custom shot tracker, which will render and upload each shot to our online dashboard, alongside all of the requisite info for that shot (similar to shotgun).
My question is this:
Does Prism have any kind of python 'API'/library we might use to enter all shot data into the the Prism shot data .yml files? The nuke studio API can also acknowledge tags, so we may also be able to tag shots to automatically create maya, houdini, or nuke files upon creation. We could also bundle this with some of the Kitsu sync people have been playing with.
I think this would be incredibly valuable - we may be able to offer this to the Prism community, but we may need a bit of preliminary guidance.
Thank you so much Richard!
Hi Richard - thanks so much for your incredible open source tool! I'm just now diving in, so forgive me if I'm retracing steps here.
I'm reaching out for a bit of support, and perhaps offer a bit of support with adding a Nuke Studio / Hiero feature.
As I'm sure you're well aware, Nuke Studio has the incredibly useful tool which creates an entire directory structure, render plates, creates nuke scripts, etc. And you can also sneak in python commands for each shot. At our little studio, we've created a Nuke Studio Uploader to our custom shot tracker, which will render and upload each shot to our online dashboard, alongside all of the requisite info for that shot (similar to shotgun).
My question is this:
Does Prism have any kind of python 'API'/library we might use to enter all shot data into the the Prism shot data .yml files? The nuke studio API can also acknowledge tags, so we may also be able to tag shots to automatically create maya, houdini, or nuke files upon creation. We could also bundle this with some of the Kitsu sync people have been playing with.
I think this would be incredibly valuable - we may be able to offer this to the Prism community, but we may need a bit of preliminary guidance.
Thank you so much Richard!
Uploaded files:- You need to login to have access to uploads.
Quote from RichardF on 4. February 2021, 12:45Hello Peter,
that's sounds great and I'm really curious to see what you will develop with this.
Yes you can access the Prism API, which Prism uses internally to create shots and query data. There is no documentation though so you would have to go through the Prism code or ask here in the forum.
You can take a look how Prism is loaded in Nuke to load it in Nuke Studio:
https://github.com/RichardFrangenberg/Prism/blob/development/Prism/Plugins/Apps/Nuke/Integration/menu.py
Once you loaded Prism in Nuke Studio you can use the PrismCore instance to access the Prism API.
For example:
pcore.entities.setShotRange("seq01-sh0020", 1000, 1100)
Most functions related to shots you can find here:
https://github.com/RichardFrangenberg/Prism/blob/0519b79190e6adc932a3d7daa2dad618c90c9452/Prism/Scripts/PrismUtils/ProjectEntities.py#L101
I'm not sure how tags are working in Nuke Studio. Prism doesn't use tags for shots, but you could add your own shotinfos to any existing or new config and read it from there.
If you need to modify any existing functions in Prism you can create a Prism plugin which monkeypatches a Prism function with your own custom function. That way you can basically add your custom code to every function in Prism and still keep all your modifications in a plugin, which makes it easier to distribute your changes to other people.
I hope that gives you some information to get started. I'm looking forward to hear more about your plans to integrate these features into Prism.
Cheers,
Richard
Hello Peter,
that's sounds great and I'm really curious to see what you will develop with this.
Yes you can access the Prism API, which Prism uses internally to create shots and query data. There is no documentation though so you would have to go through the Prism code or ask here in the forum.
You can take a look how Prism is loaded in Nuke to load it in Nuke Studio:
Once you loaded Prism in Nuke Studio you can use the PrismCore instance to access the Prism API.
For example:
pcore.entities.setShotRange("seq01-sh0020", 1000, 1100)
Most functions related to shots you can find here:
I'm not sure how tags are working in Nuke Studio. Prism doesn't use tags for shots, but you could add your own shotinfos to any existing or new config and read it from there.
If you need to modify any existing functions in Prism you can create a Prism plugin which monkeypatches a Prism function with your own custom function. That way you can basically add your custom code to every function in Prism and still keep all your modifications in a plugin, which makes it easier to distribute your changes to other people.
I hope that gives you some information to get started. I'm looking forward to hear more about your plans to integrate these features into Prism.
Cheers,
Richard
Quote from petertimberlake on 4. February 2021, 17:47Amazing, thank you Richard!
We'll get right to work!
Again, thanks for such a cool opensource tool!
Amazing, thank you Richard!
We'll get right to work!
Again, thanks for such a cool opensource tool!
Quote from petertimberlake on 8. February 2021, 20:00Hi again Richard!
So far we've successfully implemented Prism with Nuke studio, (screenshots attached). It's a nuke studio exporter which:
- renders exr sequences for all relevant shots in a project
- creates prism shots w/ frame ranges for each
- creates a prism comp and editorial task for each shot
- creates and links a nuke script for each, with the plate included in the nuke script
- creates correct write paths to be picked up by both nuke studio and prism, after comps have been rendered within nuke
I'm reaching out because we've also been working on Kitsu support for this. @danell - I've noticed in your kitsu/prism integration there is a place in the UI for the user's kitsu login / password. I'm wondering if we could collaborate in order to store the kitsu user's API key in a config file where any prism user can access it? Honestly I'm new to kitsu, but it seems like their API is robust enough to support logins without storing the user's username/password as plaintext. (even though I've noticed that some kitsu config files require us to do so ๐ )
We'll work on getting this prism stuff a bit tidier and then we can release it to the community- Richard, please let us know if you have any recommendations on how you'd like us to release it.
Thanks, lemme know!
Hi again Richard!
So far we've successfully implemented Prism with Nuke studio, (screenshots attached). It's a nuke studio exporter which:
- renders exr sequences for all relevant shots in a project
- creates prism shots w/ frame ranges for each
- creates a prism comp and editorial task for each shot
- creates and links a nuke script for each, with the plate included in the nuke script
- creates correct write paths to be picked up by both nuke studio and prism, after comps have been rendered within nuke
I'm reaching out because we've also been working on Kitsu support for this. @danell - I've noticed in your kitsu/prism integration there is a place in the UI for the user's kitsu login / password. I'm wondering if we could collaborate in order to store the kitsu user's API key in a config file where any prism user can access it? Honestly I'm new to kitsu, but it seems like their API is robust enough to support logins without storing the user's username/password as plaintext. (even though I've noticed that some kitsu config files require us to do so ๐ )
We'll work on getting this prism stuff a bit tidier and then we can release it to the community- Richard, please let us know if you have any recommendations on how you'd like us to release it.
Thanks, lemme know!
Uploaded files:- You need to login to have access to uploads.
Quote from Danell on 8. February 2021, 20:54That looks awesome!
To answer your question I have some questions to you. Why do you want to save the API key?
Gazu (the API that talks to Kitsu) just needs the username, password and the URL to kitsu itself.
Once you login you will be logged in until you close your python instance (like if you restart Prism). But as the user has written their url, username and password into Prism it's saved in the users config file. Every time there is a call to Kitsu I check if there is any saved login-keys saved. If not, then login with the saved information.
That looks awesome!
To answer your question I have some questions to you. Why do you want to save the API key?
Gazu (the API that talks to Kitsu) just needs the username, password and the URL to kitsu itself.
Once you login you will be logged in until you close your python instance (like if you restart Prism). But as the user has written their url, username and password into Prism it's saved in the users config file. Every time there is a call to Kitsu I check if there is any saved login-keys saved. If not, then login with the saved information.
Quote from petertimberlake on 8. February 2021, 21:23Oh okay great! Thanks @danell !
I'm so sorry if I'm not doing all of my research here, but what config file are you using to store that login data?
re API key: I was thinking we'd want to avoid using username/passwords in plaintext and instead use an API key login, though it might not be possible as you suggest. I'll look into it on my end too.
Thanks for the reply!
Oh okay great! Thanks @danell !
I'm so sorry if I'm not doing all of my research here, but what config file are you using to store that login data?
re API key: I was thinking we'd want to avoid using username/passwords in plaintext and instead use an API key login, though it might not be possible as you suggest. I'll look into it on my end too.
Thanks for the reply!
Quote from ronald-a on 8. August 2023, 13:20@petertimberlake
Hi there,
we are evaluating prism right now and where also looking for a way to integrate it with nuke studio. Did you ever release your integration to the public?
Cheers,
Ronny
Hi there,
we are evaluating prism right now and where also looking for a way to integrate it with nuke studio. Did you ever release your integration to the public?
Cheers,
Ronny
Quote from postoffice on 21. November 2023, 16:38We'd also be happy with a nuke studio integration ๐
We'd also be happy with a nuke studio integration ๐