Search - User list
Full Version: Input items order, is it an unordered list?
Root » PDG/TOPs » Input items order, is it an unordered list?
Johan Boekhoven
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
Johan Boekhoven
Sorry for the bump.

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

Thanks!
tpetrick
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?
Johan Boekhoven
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.
tpetrick
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)”.
Johan Boekhoven
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
Johan Boekhoven
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!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB