PDA

View Full Version : How to get all the image sources filenames with VBScript


Tazz
07-13-2012, 09:04 AM
Hey, guys

I'm a novice to scripting with Softimage's VBScript. I 'm wondering how to get all the image sources filenames. In maya, it's quite easy, but with softimage, seems need a lot of skill to do that. Any help would be very appreciated.

Tazz
07-18-2012, 03:05 AM
ok, i got it after several days study.
first u need to get all the 3dobjects, then u can retrieve the properties of the object, then with property "material", u can use a paramter to accomplish it.
the code is like this:

item.Material.ImageClips.Source.Parameters("FileName").Value

luceric
07-23-2012, 03:39 PM
that's not the best way.

in XSI, all the material are in the material library. there is no need to enumerate all objects, you can enumerate all the materials directly.

but even better, all the image clips and image sources are in their own respective containers, called Sources.Image or Clips.Image

The EnumElements command creates collection from the children of something

set ImageSourceList = EnumElements( "Sources.Image", TRUE, 0 )
for each source in ImageSourceList
LogMessage source.Filename
next

CGTalk Moderation
07-23-2012, 03:39 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.