Re: OM: Image Sources

Date : Fri, 20 Jan 2006 12:07:09 +0100
To : XSI(at)Softimage.COM
From : André Adam <a_adam(at)49games.de>
Subject : Re: OM: Image Sources
Beautiful, many thanks!

   -André

 function ooGetImages(){
   var oImages = EnumElements("Project.Sources.Image");
   if(oImages){
     return oImages;
   }
   else
     return false;
 }



guillaume laforge wrote:

Something like this ?

sources = EnumElements("Project.Sources.Image")
var e = new Enumerator(sources)
for(;!e.atEnd();e.moveNext())
{
oSource = e.item();
}



Cheers

Guillaume Laforge


2006/1/20, André Adam <a_adam(at)49games.de <mailto:a_adam(at)49games.de>>:

    Hi everybody!

    Since I still miss my first cup of coffee this morning, anyone
    having a
    quick suggestion how to access the scenes' Image Sources list through
    the object model?

    My current attempt looks as nasty as this:

    var oImages = new ActiveXObject("XSI.Collection");
    oImages.AddItems("Sources.Image.*");

    The problem is, I collect all sorts of garbage this way in case there
    are no image sources at all in the scene... (see below for the
    collections' contents in such a case):

    //INFO : Scene.Sources.Audio
    //INFO : Scene.Sources.Animation
    //INFO : Scene.Sources.Model
    //INFO : Sources.Materials

    Many thanks in advance for a quick hint! Cheers!

        -André

    ---
    Unsubscribe? Mail Majordomo(at)Softimage.COM
    <mailto:Majordomo(at)Softimage.COM> with the following text in body:
    unsubscribe xsi



--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.