[Closed] vrayMesh export as batch
Hi guys,
I have been struggling to write a script recently to export some geometry as vray meshes. For example if there are let’s say 3 scenes named incrementaly (scene 1 scene 2 scene 3), each one having one object in the scene, i would like to export each file as vray mesh named incrementally as per each scene name. I guess I would need a wild card that will link the the scene number to vray mesh number, where i got stuck.
I started learning a couple of days ago Maxscript so my knowledge is limited. This is what i managed to write so far and I managed to make it work for a single scene but if there are more scenes in the folder it overwrites the proxy each time .
files = getFiles (“path”) as array
For f in files do
(loadmaxFile f
for i=1 to 3 –read no of files in folder?
select objects
vrayMeshExport meshFile:(“aaa_0” + ([i] as string))
)
any help would be appreciated! thanks!
Something like this should get you there…
files = getFiles (@"C:\Temp\*.max")
for i = 1 to files.count do
(
loadmaxFile files[i] quiet:true --surpress any warning messages
select objects
vrayMeshExport meshFile:("aaa_0" + (i as string) + ".vrmesh")
)