File pattern - Specific files selection
1656 8 1- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
i'd like to use File Pattern TOP to select specific files from a folder, there is no pattern though, no similarities in naming.
Something like a multi parm menu would be super useful. Is there a way to do this with another node or do i have to built it myself?
Maybe File pattern is not the only node that reads files from disk?
Something like a multi parm menu would be super useful. Is there a way to do this with another node or do i have to built it myself?
Maybe File pattern is not the only node that reads files from disk?
- alexwheezy
- Member
- 318 posts
- Joined: Jan. 2013
- Offline
Pattern allows wild cards such as ? (match any character), * (match any string of characters), and (match any one of the characters inside the square brackets). For example, *.png matches any file that ends with .png. But I don't think it's going to be flexible.
You can first read all the files from the disc using the *.extension template, and then filter the desired files using Filter by Expression.
You can first read all the files from the disc using the *.extension template, and then filter the desired files using Filter by Expression.
- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
alexwheezyhow can i filter based on specific files? i'd like to have a controller where i select the specific files so filter would have to read the filepaths from the controller and keep only those, discard the rest workitems
You can first read all the files from the disc using the *.extension template, and then filter the desired files using Filter by Expression.
i have made an attempt here but this has to be automated somehow. maybe python?
- alexwheezy
- Member
- 318 posts
- Joined: Jan. 2013
- Offline
Then we can consider 2 more options to solve this problem.
Use Filter by Attribute or Labs Filter by Value, which is actually written in Python Script.
https://www.sidefx.com/docs/houdini/nodes/top/labs--filter_by_value-1.1.html [www.sidefx.com]
Use Filter by Attribute or Labs Filter by Value, which is actually written in Python Script.
https://www.sidefx.com/docs/houdini/nodes/top/labs--filter_by_value-1.1.html [www.sidefx.com]
- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
- alexwheezy
- Member
- 318 posts
- Joined: Jan. 2013
- Offline
The File Pattern node knows how to create attributes from a path such as directory, filename, extension.
https://www.sidefx.com/docs/houdini/nodes/top/filepattern.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/nodes/top/filepattern.html [www.sidefx.com]
- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
- alexwheezy
- Member
- 318 posts
- Joined: Jan. 2013
- Offline
Why not use the Labs Filter by Value node itself as a control node? It seems that so far there is no problem to replace it.
All I've changed here is a setting in the asset that allows you to select files on disk rather than populate a line, then you don't have to create a new layer of data indirection and avoid the hassle of writing code.
All I've changed here is a setting in the asset that allows you to select files on disk rather than populate a line, then you don't have to create a new layer of data indirection and avoid the hassle of writing code.
Edited by alexwheezy - March 24, 2024 01:22:24
- papsphilip
- Member
- 385 posts
- Joined: July 2018
- Offline
-
- Quick Links