This should do what you want; select a bunch of objects and execute the
script. All selected objects are tested against each other and sorted
into groups beneath the scene root if their global position is the same.
Cheers!
-André
var cObjs = new ActiveXObject("XSI.Collection");
cObjs.AddItems(Selection);
while(cObjs.Count != 0){
var cOut = new ActiveXObject("XSI.Collection");
cOut.Add(cObjs(0));
vBase = cObjs(0).Kinematics.Global.Transform.Translation;
for(var i=1; i<cObjs.Count; i++){
vTest = cObjs(i).Kinematics.Global.Transform.Translation;
if(vBase.Equals(vTest)){
cOut.Add(cObjs(i));
}
}
if(cOut.Count > 1){
ActiveSceneRoot.AddGroup(cOut, "PosGroup");
}
cObjs.RemoveItems(cOut);
}
Matt Lowery wrote:
Hi all,
I need a script that will select objects that have the same global
transforms. Basicly objects that are on top of one another. Anyone
happen to have a script like that lying around?
m(at)
---
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