__PDG_DIR__ not resolving

   2637   5   1
User Avatar
Member
50 posts
Joined: May 2015
Offline
I have a setup where I have some environment varible defined that reference pathes. Say @ASSETS_DIR is H:\Documents\asset_library. I'm opening a new Houdini scene and dropping down a TOPnet, then I'm dropping down a filepattern TOP, and SOPnet, and a Alembic ROP TOP. I want to do some modification in the SOPnet and have the Alembic ROP TOP export them. This has worked in the past without too much trouble, but lately whenever I make new scene and go through this workflow the __PDG_DIR__ environment doesn't resolve. My filepattern cooks ok, but it has __PDG_DIR__ list as @directory instead of the proper location, the Alembic ROP simply fails on cook. In the file SOP inside the SOPnet I'm using `@pdg_output` to grab the filename generated form the filepattern TOP. The Alembic TOP doesn't seem to pick this up during cooking saying file is invalid. Using `@directory`\`@filename` in the file SOP produces an error as the @directory resolves to __PDR_DIR__.
User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
Could you please attach a hip file that reproduces this, or log a bug if that's easier.
User Avatar
Member
50 posts
Joined: May 2015
Offline
Here's the simplest network I could put together given the environment variables are specific to our production network. This has a FilePattern TOP, and a Alembic ROP TOP. running cook on the Alembic ROP should generate alembic versions of the assets in the alembic folder, but it fails on my machine.

Attachments:
top_convert.zip (8.1 MB)

User Avatar
Member
603 posts
Joined: Sept. 2016
Offline
Thanks. I think what you want is to use `@pdg_input` instead of `@pdg_output` in the file sop.
User Avatar
Member
50 posts
Joined: May 2015
Offline
That worked. I was visualizing my results via the FilePattern TOP and @pdg_output was working fine. I guess the way the ROP works it pushes its input into SOPs land instead of grabbing the processed SOP after the FilePattern?
User Avatar
Staff
585 posts
Joined: May 2014
Offline
When a work item cooks, the attributes and inputs from that work item are available using the @ syntax. So @pdg_input resolves to the cooking work items input files, and @pdg_output resolves to its outputs. Since the work item is in the process of cooking, it doesn't have any outputs yet and @pdg_output will be empty.

When you select a work item in TOPs it's doing the same thing. The selected items input files are available as @pdg_input, the output files are available using @pdg_output and any other attributes can be access with @<attribute_name>.

Edit to clarify further:

When you select a File Pattern work item in the UI, @pdg_output resolves to whatever output file is associated with that selected work item. So if you have a file SOP displaying @pdg_output and the file is geometry, it'll show up in the viewport. But from the perspective of the corresponding work item in a downstream ROP node, that file is the input to that work item. When the ROP cooks it's as if you had selected that ROP work item in the UI and then cooked the target SOP chain. So in that case, the SOP chain needs to be loading @pdg_input in order to pull in the file from the File Pattern work item.
Edited by tpetrick - Nov. 19, 2019 16:35:43
  • Quick Links