rotaryman
02-01-2005, 12:30 AM
Hey all,
I am trying to write a function in JScript that checks to see if a material exists or not but I am not having any luck. What I am trying to do is this:
if(GetValue("Passes.MyPass.MyPartition.Material == null))
{
do something;
}else{
do something else;
}
now this function works perfectly fine if a material already exists and the rest of my script will work. However if no material exists on the partition, the script will error out:
//ERROR : 2000 - Argument 0 (Target) is invalid
//ERROR : 2001-GetValue - Argument 0 is invalid
//ERROR : Invalid procedure call or argument - [line 1]
Does anyone know of another way to inspect a partition if it has a material or not?
Thanks
I am trying to write a function in JScript that checks to see if a material exists or not but I am not having any luck. What I am trying to do is this:
if(GetValue("Passes.MyPass.MyPartition.Material == null))
{
do something;
}else{
do something else;
}
now this function works perfectly fine if a material already exists and the rest of my script will work. However if no material exists on the partition, the script will error out:
//ERROR : 2000 - Argument 0 (Target) is invalid
//ERROR : 2001-GetValue - Argument 0 is invalid
//ERROR : Invalid procedure call or argument - [line 1]
Does anyone know of another way to inspect a partition if it has a material or not?
Thanks
