Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 09-06-2012 , 08:39 PM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525

MEL command: ls

Starting to experiment with MEL scripting to automate some repetitive, brain killing operations.

Is there a limitation to the number of items that can be placed into an array using "ls -selection"?
string $arrayOfObjects[];
$arrayOfObjects = `ls -selection`;

# 2 09-06-2012 , 08:43 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I doubt it... you'll probably run out of memory for your scene before you run out of memory in the list... haha.

# 3 10-06-2012 , 01:32 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Hi PixalZA, no; there is no limit to my knowledge. If there is, I haven't hit it yet :p


Imagination is more important than knowledge.
# 4 10-06-2012 , 04:05 PM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
Thank you all. What had me ask the question was the resultset that was returned to me for a set of selected vertices.

A 10x10 polyplane returned a vertices list of just pPlane1.vtx[0:120]. I expected 121 entries and not the abbreviated version(Vertex 0 to 120).

But I got sorted out. Adding -fl returns a discreet list of individual entries.

@stwert Knowing me I'll end up coding an infinite loop that will blow the memory user added image (I've killed a mainframe with it before so I'm sure I can do it again)

# 5 10-06-2012 , 07:25 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988

@stwert Knowing me I'll end up coding an infinite loop that will blow the memory user added image (I've killed a mainframe with it before so I'm sure I can do it again)

A quicker way would be to do the following:

Code:
while (1)
    fork();


Imagination is more important than knowledge.
# 6 10-06-2012 , 07:39 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
# 7 10-06-2012 , 08:00 PM
PixalZA's Avatar
Lifetime Member
Join Date: May 2011
Location: Riyadh, Saudi Arabia
Posts: 525
LOL, the "fork while fork" does have a nice ring to it.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads