Is there a way to check for the existence of a map in vex? I'd like to be able to try to load a texture map and use a default value if the map doesn't exist (rather than the reddish pink that shows up normally).
I can check if the attribute is bound to the geometry, but I can't find a way to check if the file exists before loading it.
In python you can do:
import os
os.path.exists(filename)
And then do something with the boolean.
Dave
Test for missing maps
2167 2 2- davedjohnson
- Member
- 221 posts
- Joined: 7月 2005
- Offline
- sidenimjay
- Member
- 702 posts
- Joined:
- Offline
have a look at the teximport vex function
http://www.sidefx.com/docs/houdini12.5/vex/functions/teximport [sidefx.com]
http://www.sidefx.com/docs/houdini12.5/vex/functions/teximport [sidefx.com]
- davedjohnson
- Member
- 221 posts
- Joined: 7月 2005
- Offline
-
- Quick Links