SafeArrayDelete MEL

From scripting
Revision as of 19:58, 24 April 2017 by Nickpisca (talk | contribs) (Created page with " //0001D LLC 2016 Nick Pisca (c) //Why? Sometimes deleting 100,000's of objects will crash Maya. This is safer. string $ll[] = `ls -tr "NM_*_*"`; int $ct = size($ll); f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
//0001D LLC 2016 Nick Pisca (c)
//Why?  Sometimes deleting 100,000's of objects will crash Maya.  This is safer.
string $ll[] = `ls -tr "NM_*_*"`;
int $ct = size($ll);
for ($x=0;$x<$ct;$x++) {
	print ("Deleting Object Name: "+$ll[$x]+"\n");
	delete $ll[$x];
}



More information on vectors and arrays, read pages 12-16 in YSYT.