Python or VEX to load fbx mesh(es) from a folder?
983
3
0
trtrlfx
Member
12 posts
Joined: 12月 2016
Offline
2022年3月31日 1:09
Is there a way to programatically load a fbx mesh from a folder through VEX or Python? So the folder contains an n amount of meshes I would like to loop through it and load them up per iteration. Each folder can have a different amount of meshes and I want to load one or more based on an attribute. What's the most houdiniesque way of doing this?
tamte
Member
8573 posts
Joined: 7月 2007
Offline
2022年3月31日 1:24
You can use TOPs for that FilePattern TOP within TOP Geometry SOP
Edited by tamte - 2022年3月31日 01:25:21
Tomas Slancik FX Supervisor Method Studios, NY
NicTanghe
Member
193 posts
Joined: 12月 2016
Offline
2023年1月1日 9:47
I cant figure out how to use the found files in a python script below it ?
(same problem with nodes and nodepattern)
how whound i run
?
(just to get the locations of the files)
Edited by NicTanghe - 2023年1月1日 09:59:12
NicTanghe
Member
193 posts
Joined: 12月 2016
Offline
2023年1月1日 10:17
I think is the solution i ws looking for.
dir = self . scheduler . localizePath ( strData ( work_item , 'directory' ))
#file = self.scheduler.localizePath(strData(work_item, 'filename'))
extention = self . scheduler . localizePath ( strData ( work_item , 'filename' ))
print ( dir + "/" + extention + " | " )