You probably want to use `ls -sl -fl` to make sure each item in the array has its own index before performing the loop. Tokenize works like this: $selectionArray = `ls -sl -fl`; string $newArray []; tokenize $selectionArray[0] "." $newArray; print $newArray;
Hi, I'm working on a script to place cylinders on selected faces for booleans. I need to place the first selected object into a token so I can call it up, but am confused on how I can bring the selection into a string to tokenize between the "." The script is meant to allow me to select adjacent components on a poly…
Does anyone have anything to isolate it to just 1 object? So if I choose some faces on psphere 1, but want to keep it to psphere1 and not have it include psphere 2 if selected to trap it, what do I do in the For/If command? And if anyone can help plug in a trap so it only works on component selection, that would also be…