Stash in an HDA

   5848   16   3
User Avatar
Member
26 posts
Joined: 6月 2019
Offline
I'm trying to put a Stash SOP before the output of my HDA so I can only evaluate my tree and Lock/freeze/cache the data before outputting the result. My HDA is pinging our database for information and I want to cache out the result so it can freeze that info before sending it out into the renderfarm. At first, I was using a File SOP so I could cache out my result on disk, but it's not very user friendly to chose where to cache that info in an external file, so I decided a Stash SOP would do a better job.

My problem is when I expose the “Stash Input” button on my HDA, it gives me this error :

Error: Permission denied: Channel /obj/instance1/hyb_load_assembly1/stash1/stash.

If I unlock my HDA, it works fine.

Why is Stash not working inside locked HDAs? What can I do to make it work?
User Avatar
Member
106 posts
Joined: 6月 2011
Offline
Hi there,

It's because you're trying to modify something inside a locked digital asset. You need to put your Stash SOP as an Editable node. Go to your HDA's Type properties => Node tab => Editable Nodes and put your Stash sop under Editable nodes.

Hope it helps

-J
User Avatar
Member
26 posts
Joined: 6月 2019
Offline
Yes it does. Thank you.
User Avatar
Member
897 posts
Joined: 7月 2018
Offline
You don't actually need to make it editable. The stash geometry is a parameter on the stash node and you can promote this to the hda and set this in your python code to a geometry object.
B.Henriksson, DICE
User Avatar
Member
26 posts
Joined: 6月 2019
Offline
I'm not sure how you “set this in your python code to a geometry object”? Can you elaborate on that?
User Avatar
Member
897 posts
Joined: 7月 2018
Offline
HybrideRD
I'm not sure how you “set this in your python code to a geometry object”? Can you elaborate on that?
I took for granted that you did your database query in a python script then you could do something like in the hip.

Attachments:
pythonStash_v01.hipnc (64.2 KB)

B.Henriksson, DICE
User Avatar
Member
899 posts
Joined: 2月 2016
Offline
so one can store only 1 geometry at time?

I tried something like
bucket = [geo, geo2]
parm.set(bucket)

But I got an error.. it seems not possible
I imagine a workaround would be to use a multiparm stash instance, right?
Edited by Andr - 2019年7月15日 16:57:51
User Avatar
Member
897 posts
Joined: 7月 2018
Offline
yeah, that would break. Multiparm sounds like a good idea. Never combined them with data attributes myself but why not?
B.Henriksson, DICE
User Avatar
Member
26 posts
Joined: 6月 2019
Offline
I did do my database query in Python, but I then do various modifications in VEX and using other SOP nodes before I want to stash the results… and that's why I want to expose a button to just evaluate the entire tree just when the artist clicks the load button, which in itself invokes the Stash Input.

Now I'm still not sure what your script/set-up is doing. Is it copying the data that comes in to the python node into the floating stash node? So I should put an output after the stash node and create a button on the Python node to just call the evaluation of the tree when I click that button? I'm not sure I follow.
User Avatar
Member
897 posts
Joined: 7月 2018
Offline
HybrideRD
I did do my database query in Python, but I then do various modifications in VEX and using other SOP nodes before I want to stash the results… and that's why I want to expose a button to just evaluate the entire tree just when the artist clicks the load button, which in itself invokes the Stash Input.
I have used a very similar setup before and if it works for you I don't want to say it's wrong. I personally try to stay away from editable nodes as I feel I have less control of the setup and are better prepared for debugging but that's more a flavor thing.
HybrideRD
Now I'm still not sure what your script/set-up is doing. Is it copying the data that comes in to the python node into the floating stash node?
Exactly. So in your setup your button would instead copy the geo from one node and put it in the data attribute on the hda. The stash nodes data would be referencing this.
B.Henriksson, DICE
User Avatar
Member
26 posts
Joined: 6月 2019
Offline
Yeah, I'm going to keep it as an editable node because it works perfectly fine… it's for my own personal knowledge that I'm trying to understand your approach. It's an interesting way of doing this. Thanks for the feedback.
User Avatar
Member
8838 posts
Joined: 7月 2007
Offline
HybrideRD
Yeah, I'm going to keep it as an editable node because it works perfectly fine… it's for my own personal knowledge that I'm trying to understand your approach. It's an interesting way of doing this. Thanks for the feedback.

keep in mind that with editable nodes you are up for a lot of pain and suffering down the line especially connected to asset updates, so if you can try to avoid them or at least be mindful of the consequences for particular uses
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
26 posts
Joined: 6月 2019
Offline
Why? What kind of consequences am I looking at when I'll try to update the HDA?
User Avatar
Member
8045 posts
Joined: 9月 2011
Offline
When you save an hda, the contents are saved, including the contents of editable nodes that you may not want saved to the definition.
User Avatar
Member
8838 posts
Joined: 7月 2007
Offline
I don't remember the behavior exactly in case of editable nodes that are not subnets, but these things may happen:
- you may loose your stashed geo if updated to new definition as even editable nodes will be updated from definition (at leas thats the case of contents of editable subnets)
- your stashed geo may be baked in the definition if you continue updating the HDA from the node that has it editable and stashed
- simply whatever is not on the parameters outside of HDA is at risk, therefore using Data parameters for geometry is encouraged

on the other hand if promoting stash button alongside with data parameter to your HDA errors still results in permission errors then I'd consider it a bug as in such case it should be smart enough to tunnel through to promoted parameter
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
26 posts
Joined: 6月 2019
Offline
OK. Thanks for the info. I will keep this in mind.
User Avatar
Member
1 posts
Joined: 7月 2019
Offline
jjayakumar
Hi there,

It's because you're trying to modify something inside a locked digital asset. You need to put your Stash SOP as an Editable node. Go to your HDA's Type properties => Node tab => Editable Nodes and put your Stash sop under Editable nodes.

Hope it helps

-J
Thanks Man... i did an hda and i cant drive the STASH from outside... with this trick works great !! ???
  • Quick Links