Python or VEX to load fbx mesh(es) from a folder?

   983   3   0
User Avatar
Member
12 posts
Joined: 12月 2016
Offline
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?
User Avatar
Member
8573 posts
Joined: 7月 2007
Offline
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
User Avatar
Member
193 posts
Joined: 12月 2016
Offline
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
print(file_work_item))

?
(just to get the locations of the files)
Edited by NicTanghe - 2023年1月1日 09:59:12
User Avatar
Member
193 posts
Joined: 12月 2016
Offline
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 + "   |  ")
  • Quick Links