Search - User list
Full Version: Extracting and Referencing the String Text of Input/Output File Path from TOP Network
Root » PDG/TOPs » Extracting and Referencing the String Text of Input/Output File Path from TOP Network
lzl
Hi everyone!

Newbie here. I am trying to extract and reference the file path of each work item from “filepattern” node in the TOP network, the file path string is needed in the geometry network for further operation. Unlike numbers in wedges, it seems strings could not be referenced by the @ sign, so I am kinda stuck at the moment. Here is what I did:

1. Accessed the folder where the reference files are, and obtained the directory and filename of each work item.


2. Passed the data down to a wedge to add a new float attribute “number”. This attribute could be referenced in the geometry network. However, the string attribute “directory” or “filename” could not be referenced with the @ sign.


3. I managed to reference and print the string of text in TOP network with Python Script node, using strData package. However, this does not really solve the problem, and does not work in the geometry network.


Could anyone shine some light on how could I extract the string attribute to use it in the geometry network? In the ideal world, I would love to extract the file path string directly from the “Input”?/“Output” file path information of each work item, but I have no idea how to do that at all.


Thanks for your time and attention!! I have attached an example file for reference.
jsmack
Isn't @pdg_inputmeant for this purpose?
chrisgreb
lzl
the file path string is needed in the geometry network for further operation. Unlike numbers in wedges, it seems strings could not be referenced by the @ sign,

You can reference an attribute, including string attributes in a string parm using backticks to tell houdini you want the expression to be evaluated as such:

`@mystringattr`
lzl
Thank you so much jsmack and chrisgreb! Your answers perfectly solved the problem.
Leopardob
Hi,
i'm tryng to do exactly the same, but no luck with `@mystringattr` or pdginput
Any suggestions ?
kenxu
Could you post a scene file? We can take a look to see what’s going on.
adrianmeyerart
Did you use `@pdg_input` ?
That should actually work.

This stuff is nicely documented here:
https://www.sidefx.com/docs/houdini/tops/attributes.html [www.sidefx.com]
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