Create intermediate directory & Overwrite existing .usd file

   1893   4   1
User Avatar
Member
143 posts
Joined: Jan. 2016
Offline
Please, I am new to the TOPs and I have four questions about file and directory permissions.

Overwriting existing .usd files:

ROP USD Output TOP node - does NOT overwrite an existing .usd file (after I "Dirty and Cook This Node")
USD ROP LOP node - DOES overwrite an existing .usd file (after I manually press the "Save to Disk" button)

1. Should I use the "File Remove TOP node" to delete the .usd file first?
2. Or should I set the permissions somewhere?


Creating intermediate directories:

USD Render TOP node - does NOT create missing intermediate directories (after I "Dirty and Cook This Node")
Karma LOP node - DOES create missing directories (after I manually press the "Save to Disk" button)

3. Should I use the "Make Directory TOP node"?
4. Or should I set the permissions somewhere?


Best regards,
J.
User Avatar
Member
143 posts
Joined: Jan. 2016
Offline
As regards creating intermediate directories with USD Render TOP node, I stumbled upon this solution:

https://www.sidefx.com/docs/houdini/ref/utils/husk.html [www.sidefx.com]
--make-output-path

Attachments:
husk.png (71.3 KB)

User Avatar
Staff
581 posts
Joined: May 2014
Offline
ikoon
ROP USD Output TOP node - does NOT overwrite an existing .usd file (after I "Dirty and Cook This Node")

This is because the file already exists on disk. PDG processor nodes typically have an option to enable caching of output files -- by default, if the file exists the work item cooks from cache on the next cook. If you Ctrl+MMB on a work item dot, you'll see the status is set to "Cooked from Cache" instead of "Cooked". The different cache mode options are documented here: https://www.sidefx.com/docs/houdini/nodes/top/ropfetch.html#pdg_cachemode [www.sidefx.com]

You can change the cache mode parameter to Write Files so that the node will always write outputs, and never cook from cache. Normally, Cache files are invalidated if the relevant parts of the scene are changed, if they're manually deleted on disk, or if an upstream dependency invalidates it cache files.

ikoon
USD Render TOP node - does NOT create missing intermediate directories (after I "Dirty and Cook This Node")

This is likely just an oversight. We can expose that as an option on the node.
User Avatar
Staff
581 posts
Joined: May 2014
Offline
Alright, the USD Render issue been fixed in the next daily build of H19.0. There's a new toggle (which defaults to on) that ensures that intermediate directories are created for the output image path.
User Avatar
Member
143 posts
Joined: Jan. 2016
Offline
Thank you very much Petrick! Now I understand the logic behind it. Also I finally installed the new Daily Build, everything is clear and directories are created (with the default settings).

Thanks a lot again for explaining it to me.
  • Quick Links