Checking for a material name with jscript

Date : Thu, 4 Oct 2007 18:22:22 -0500
To : XSI(at)Softimage.COM
From : "Gene Crucean" <emailgeneonthelist(at)gmail.com>
Subject : Checking for a material name with jscript
So I need to check and see if a material has a specific name in my scene, if it doesn't exist, I need to create it. If it does then I need to apply it.

Can anyone help me with some jscript? Or samples. Keep in mind I'm scripting retarded :)




if(MyShader shader exists);
  (
     apply shader to partition;
   )
else
  (
     create shader and apply to partition;
  )



Cheers
Gene

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.