[Closed] wild card a string path to a file
Hi All ,
Carrying on other threads is it all possible to wild card a path to a texture map . I have changing names of texture files , if I add a * to the path name of a texture file the wild card gets stamped into the path in the material editor …
for i = 4 to 6 do
(
newmat = VRayMtl()
newmat.name = (“m_ar_con_type_” + i as string)
newmat.texmap_diffuse = Bitmaptexture fileName:(@”\foo\foobar\blah\blahblah\concrete-” + i as string + “_d*.jpg”)
)
ie after d I have various int values , so thinking I could wild card to complete the rest of the string.
b
No and it wouldn’t make sense – by what kind of logic is the texturemap supposed to pick one? If you want to have different textures for different frames, use ifl and set your desired starttime/playbackrate/etc. for the texture. And for future threads, it’s best to tell us your intent first, only after that tell us what you tried (I have no idea what you’re trying to do here so I’m left guessing – chances are you’re trying to do something completely different).
You can use getfiles to get all files that match a wildcard pattern as an array. You will then need to work with the array to do whatever you need.
I agree with swordslayer please outline what you are attempting to do.
-Eric