selecting direct light but not its target in a maxscript

selecting direct light but not its target in a maxscript

avolution
Advocate Advocate
830 Views
3 Replies
Message 1 of 4

selecting direct light but not its target in a maxscript

avolution
Advocate
Advocate
I want to control a direct light for an extremely (I thought) script.

Basically I say (inside a pflow script)

foo=$myvolite* as array
foo.falloff=170

problem is; the script will error out as it selects two nodes

a)myvolite
b)myvolite.target


Is there a way; bar disabling the target function on the light; which acts
as umm, the target, and a parent pivot point for the light to have this
script select ONLY the light AND NOT the target.

Sunbmitted humbly
0 Likes
831 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Seems like you have two options...

1) don't select it as array... foo = $myvolite should return the light as a single object.

2) specify the light element of the array foo.falloff = 170

Make sense?
0 Likes
Message 3 of 4

avolution
Advocate
Advocate
I was hoping, as there will be lots of lights in the array (I tested for one) that maxscript
would allow me to isolate the two.

My workaround for this is to have all the lights untargetted, and instead each is linked to
a control dummy, and then control is passed to pflow



Seems like you have two options...

1) don't select it as array... foo = $myvolite should return the light as a single object.

2) specify the light element of the array foo.falloff = 170

Make sense?
0 Likes
Message 4 of 4

Anonymous
Not applicable
I was hoping, as there will be lots of lights in the array (I tested for one) that maxscript
would allow me to isolate the two.

My workaround for this is to have all the lights untargetted, and instead each is linked to
a control dummy, and then control is passed to pflow


You can always filter your array to skip any Target objects (or other undesired objects):

foo=for o in $myvolite* where classof o != TargetObject collect o
foo.falloff=170
0 Likes