RE: scripting lights... associated models group

Date : Wed, 30 Aug 2006 15:52:56 -0400
To : <XSI(at)Softimage.COM>
From : Martin Bélanger <martinb(at)Softimage.COM>
Subject : RE: scripting lights... associated models group
I just helped someone recently with this issue. The idea was to add a selected Model in Branch mode into the Associated model group list. I cheated when it was time to get the associated model group as you can see.
 
My vb script looked something like this:
 
'oModelLight is defined has a Model which contains all the scene ligths amongs other things...
 
set oLights = oModelLight.FindChildren("*",siLightPrimType, ,True)

for each light in oLights

    'We just want to process the spot lights...

    if light.ActivePrimitive.Parameters("Type").value = 2 then

    set groupAL = Dictionary.GetObject(light&".light.Associated Models")

    groupAL.AddMember oModel2Add ,True

    End if

Next

-Martin

From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Steven Caron
Sent: Wednesday, August 30, 2006 2:40 PM
To: xsi(at)Softimage.COM
Subject: scripting lights... associated models group

Hey
 
can someone recommend a way to work with the associated models group under a light?
 
i am creating the light in scripting so i have the object, i dont see a simple OM shortcut or any method to return the associated models group.
 
thank
steven

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.