RE: Re[2]: deleting cluster

Date : Thu, 4 May 2006 09:51:07 +0100
To : "'XSI(at)Softimage.COM'" <XSI(at)Softimage.COM>
From : Juan Brockhaus <Juan(at)glassworks.co.uk>
Subject : RE: Re[2]: deleting cluster
you're welcome!

one little thing I noticed in the script:
change
 sel_list.Count
to
 sel_list_array.length
in line 58 in the for loop.

that's the more correct way of doing it.

reason is, that if you do something in the loop, which creates new objcects,
then xsi often puts those objects as current selection and then the
'sel_list.Count' is changed!
because 'var sel_list = Application.Selection' just points to
Application.Selection, which is dynamic.
this is why you first have to store the selection into a new array to have
it 'safe'.

(hope that is somehow clear... my english/script-language terms are not the
best...)

cheers,

Juan





-----Original Message-----
From: Frank Lenhard [mailto:franky(at)ixdream.com]
Sent: 03 May 2006 20:52
To: XSI(at)Softimage.COM
Subject: Re[2]: deleting cluster


its not an understatement when i say i LOVE this list :)
thanks a lot Juan, the script did the trick and it gives me the basic
"i do something with all selected objects" loop that i can develop
for all kind of tasks. thanks a lot! being a totaly JS newbie this
gives me a great start!


ciao
franky


Wednesday, May 3, 2006, 8:21:37 PM, you wrote:

JB> hi,

JB> this script removes all clusters from selected objects.
JB> you should be able to change ... cls.* to
JB> "cls.User_Normal_Cluster" in line
JB> 62 perhaps.

JB> don't have time to test it now...

JB> hope that helps,

JB> Juan


JB> -----Original Message-----
JB> From: Frank Lenhard [mailto:franky(at)ixdream.com]
JB> Sent: 03 May 2006 19:09
JB> To: XSI
JB> Subject: deleting cluster


JB> Hi,

JB> is there a way (or script) that allows me to delete a
JB> "User_Normal_Cluster" from each (selected) object? right now my only
JB> way seems to select them all and press the cluster button and select
JB> each cluster to finally delete them. a bit painstaking with several
JB> thousand objects :/

JB>   

JB> ciao
JB> franky

JB> ---
JB> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
body:
JB> unsubscribe xsi


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


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.