--/////////////////////////////////////////////////////////////////////////////////////////////////////////// -- -- :!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- :!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Copyright (c) Rockstar, San Diego -- !!!!!!!!!!!!!!!RRRRRRRRRRRR!!!!!!!!!!!!!!!! A division of Rockstar Games Inc. & Take Two Interactive -- !!!!!!!!!!!!!!!R RR!!!!!!!!!!!!!! -- !!!!!!!!!!!!!!!R R!!!!!!!!!!!!! -- !!!!!!!!!!!!!!R RRRRRR R!!!!!!!!!!!!! sdDuplicate.ms -- !!!!!!!!!!!!!!R RRRRRR R!!!!!!!!!!!!! -- !!!!!!!!!!!!!!R ```` .R!!!!!!!!!!!!!! Version: Max 2009 -- !!!!!!!!!!!!!R RR!!!!!!!!!!!!!!! -- !!!!!!!!!!!!!R RRRRR R!!!!!!!!!!!!!!! -- !!!!!!!!!!!!R R!!!!R R!!! !!!!!!!!!!! -- !!!!!!!!!!!!R R!!!!R R!! *!!!!!!!!!!! ROCKSTAR SAN DIEGO DISCLAIMS ALL WARRANTIES WITH REGARD -- !!!!!!!!!!!!R....R!!!!R. RX **'!!!!!!!!!! TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF -- !!!!!!!!!!!!RRRRRR!!!!RRRRRR.***.... .!!!!! MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ROCKSTAR -- !!!!!!!!!!!!!!!!!!!!!!!!! ********":!!!!!!! SAN DIEGO BE LIABLE FOR ANY SPECIAL, INDIRECT OR -- !!!!!!!!!!!!!!!!!!!!!!!!!! ****** !!!!!!!!! CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING -- !!!!!!!!!!!!!!!!!!!!!!!!! *** ***'!!!!!!!!! FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -- !!!!!!!!!!!!!!!!!!!!!!!!! *:!!!.* !!!!!!!!! OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -- !!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!:!!!!!!!!! OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! THIS SOFTWARE. -- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -- `~!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~ MODIFY AT YOUR OWN RISK! -- --/////////////////////////////////////////////////////////////////////////////////////////////////////////// fn sdDuplicate = ( --check that the user has something selected if $ != undefined then ( --get the current panel and store it, change the panel to "create" to avoid screen flicker during script execution currPanel = getCommandPanelTaskMode() setCommandPanelTaskMode #create --store the current object selection and create an empty array to store the new duplicates nodeBuffer = getCurrentSelection() newnodeBuffer = #() --step through each node in the selection and duplicate with attributes for eachNode in nodeBuffer do ( select eachNode actionMan.executeAction 2027959730 "3" --plugin command to copy attributes from original object maxOps.cloneNodes $ cloneType:#copy newNodes:&newclone -- duplicate object select newclone actionMan.executeAction 2027959730 "4" --plugin command to paste attributes onto new object append newNodeBuffer $ --add the newly created duplicates to the selection buffer ) --set the panel back to the original panel the user had selected and select the newly duplicated objects setCommandPanelTaskMode currPanel select newNodeBuffer ) ) sdDuplicate()