Extracting and Referencing the String Text of Input/Output File Path from TOP Network

   282   5   1
User Avatar
Member
5 posts
Joined: 7月 2017
Offline
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.

Attachments:
img4.PNG (50.1 KB)
img1.PNG (550.9 KB)
img2.PNG (73.6 KB)
img3.PNG (363.6 KB)
example.zip (2.3 MB)

User Avatar
Member
2347 posts
Joined: 9月 2011
Offline
Isn't @pdg_inputmeant for this purpose?
User Avatar
スタッフ
330 posts
Joined: 9月 2016
Offline
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`
User Avatar
Member
5 posts
Joined: 7月 2017
Offline
Thank you so much jsmack and chrisgreb! Your answers perfectly solved the problem.
User Avatar
Member
1 posts
Joined:
Offline
Hi,
i'm tryng to do exactly the same, but no luck with `@mystringattr` or pdginput
Any suggestions ?
User Avatar
スタッフ
506 posts
Joined: 9月 2012
Offline
Could you post a scene file? We can take a look to see what’s going on.
- Ken Xu
  • Quick Links