Sorry, code needs to be in a function to use a ‘return’ statement.

Main();
Function Main()
{
var oSelectedItems = SIFilter( null, siObjectFilter, true, siQuickSearch );

if ( !oSelectedItems || oSelectedItems.Count <= 0 ) {
return;
}

for ( var i = 0; i < oSelectedItems.Count; i++ ) {
                var oSelectedItem = oSelectedItems(i);
CopyAllAnimation2( oSelectedItem, siAnySource, siAllParam );
                }

                return;
}



Matt




From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Francisco Criado
Sent: Tuesday, June 24, 2014 12:04 PM
To: softimage@listproc.autodesk.com
Subject: Re: simple script

Hi guys, thanks again,
what do you mean by a "valid selection"?

Matt if i change to jscript it drops an error on line 4:
// ERROR : 'return' statement outside of function - [line 4]

just thought there was a simple internal command for "my current selection"

thanks again!

F.


Reply via email to