Hi,
Another basic scripty question (in VB).
I'm looping through the Partitions in a Pass and printing out the Material names.
This is fine if there is a Material, but falls over if none exists.
How do I check to see if it exists at all before I hit an error?
E.g.
for each oPartition in oPartitionList
logmessage oPartition.name
if oPartition.Material <> false then logmessage "MATERIAL : " & oPartition.Material.Name
next
Will give
'INFO : Background_Objects_Partition
'INFO : MATERIAL : Scene_Material
'INFO : Background_Lights_Partition
'ERROR : Object variable not set - [line 27]
Thanks again,
Adam.
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.467 / Virus Database: 269.7.6 - Release Date: 20/05/2007 00:00
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi