Input items order, is it an unordered list?

   1816   6   1
User Avatar
Member
72 posts
Joined:
Offline
So I have a carefully crafted ordered Output list via the python node.


Now when I later down the pipe want to pick up the 1st file in that list I should be able to use
`@pdg_input.0`
also
`pdginput(0,'',1)`
results in the same outcome

But the result is not correct, I get the result as if the list was alphabetically ordered.
Am I doing something wrong, is this as expected and can't we depend on the order of the output files?
Using production build .499.

Thanks,
-Johan
Edited by Johan Boekhoven - 2020年7月23日 11:54:38

Attachments:
order_error.jpg (90.1 KB)

User Avatar
Member
72 posts
Joined:
Offline
Sorry for the bump.

I'd really like to know if we can have dependable resultdata order or not.

Thanks!
User Avatar
スタッフ
585 posts
Joined: 5月 2014
Offline
Do you have an example file you can attach? Most TOP nodes don't do any reordering of files, unless they have options to do so. Do the files appear in the correct order in the MMB?
User Avatar
Member
72 posts
Joined:
Offline
Hi @tpetrick,

If you look at the screenshot above you can see I've manually reordered the output files in a python node, they appear in correct order in the correct order with MMB debug window, but when I use @pdg_input.0, it gets the file that is alphabetically the first instead of the order as shown.



Here's a test file. Looking at it now I think somehow the python node that sort output items causes the real issue.
But after that node issues occur.

See attachment for the file.

Attachments:
pdg_issue.jpg (66.8 KB)
pdg_sort_output.hiplc (2.2 MB)

User Avatar
スタッフ
585 posts
Joined: 5月 2014
Offline
By default, the code in the Python Script node runs when the work item cooks. It's the “job” of that work item. The attribute create node is static in that file, though – it generates work items before the graph begins to cook. That means that when it generates, there won't be any reordered files on the input work item. That's also why it has warnings on the node.

You need to change your Python Script so the “Evaluate Script During” to “Generate” instead of “Cook (In-Process)”.
Edited by tpetrick - 2020年7月27日 11:34:17
User Avatar
Member
72 posts
Joined:
Offline
This makes a lot of sense, thanks it works fine now.
PDG is quite a beast to learn the ins and outs, but I will get there!

Cheers,
-Johan
User Avatar
Member
72 posts
Joined:
Offline
While you're browsing the forum, could you perhaps have a quick glance at this post : https://www.sidefx.com/forum/topic/74851/ [www.sidefx.com]
Looking for a reliable way to run a houdini instance where I'm constantly listening to input data.
Thanks!
  • Quick Links