Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Novice at MEL

Novice at MEL

2003-11-26       - By Dobson, Jeff

 Back
Reply:     1     2     3  

Here is an commented example of a procedure I use in one of my scripts to
build a listbox from the contents of a particular directory.  I hope it
helps.


proc msb_buildListbox () //Builds my effects listbox from contents of a
directory
{
  //I need to use these globals
  global string $SOE_EFFECTPATH;
 
  //Put my files into an array
  string $effectList[] = sort(`getFileList -fld $SOE_EFFECTPATH -fs
"*.eft"`);
 
  //Begin building textScrollList command for eval later
  string $appendList = "textScrollList";
 
  //Loop on contents of my directory and append each onto my command
  for ($effect in $effectList)
  {
    $appendList = $appendList + " -a \"" + $effect + "\"";
  }
 
  //Finish off command with other flags
  $appendList = $appendList + " -sc \"msb_getEffectInfo\"
effectListbox";
 
  //DEBUG - this is here so I can check that the command gets created
properly
  print ($appendList +"\n");
 
  //Eval the command to create the actual control
  eval ($appendList);

} //end msb_buildListBox


--JeffD


-- --Original Message-- --
From: David Mart�nez Carrasco [mailto:david@(protected)]
Sent: Tuesday, November 25, 2003 9:07 PM
To: maya-dev@(protected)
Subject: Novice at MEL


Hi,
I�m a student of Alias Maya and I just started with MEL Scripting.

I have a question about how can i do some things... but one is making me
specially crazy!

I have a "textScrollList" and i don�t wanna to put flags manually. Before to
enter to the definition of this control, i define a string and I assign the
text of the flag like this:
---
string $texto = "-append \"1a\" -append \"1b\" -append \"1c\"";
---

So later, i dunno how to put inside of the control. I tried this but script
editor says me that the flag is invalid (I have a layout and a window but I
will don�t show the code here):

---
textScrollList -numberOfRows 8 -allowMultiSelection true
-p estBaseVentana
($texto);
---

My question is... how can i put this string and not recibe an error ? I
tried to put the same text manually and it works perfectly. I need this
because i will make a "while" to determine all the elements to put on this
list.

The other question is how can i do a loop like a "While" inside a control ?
it�s making me crazy! The control thinks that i�m putting flags and always
give me error

any help will be appreciated


Sorry for my english, it�s a little difficult for me. Hope u understand me!
:P

---
David Mart�nez Carrasco - Thorse
E-Mail: david@(protected)
Temporal Gallery: http://thorse3d.tripod.com/
---


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-archive: <http://www.highend3d.com/maya/devarchive/>


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-archive: <http://www.highend3d.com/maya/devarchive/>