Complex UV Layout in Maya
Over the last couple of years UV layout in Maya has changed for the better. In this course we're going to be taking a look at some of those changes as we UV map an entire character
# 1 26-03-2008 , 11:32 AM
Tammy's Avatar
Registered User
Join Date: Apr 2007
Posts: 32

mel plugin scripting help

I have some questions regarding making a plugin for Maya in the Maya 8.0 Script Editor. But first I would like to show you what I have so far in the Maya Script Editor:
--------------------------------------------------------------
// Made by Spludge Interactive
// Create a window with a some fields for entering text.
string $window = `Custom PaintFX Maker`;
text -label "Load Mesh: ";
string $Mesh = `textField`;
text -label "Load Texture 1: ";
string $Texture1 = `textField`;
text -label "Load Texture 2: ";
string $Texture2 = `textField`;
text -label "Load Texture 3: ";
string $Texture3 = `textField`;
text -label "Load Texture 4: ";
string $Texture4 = `textField`;
text -label "Load Texture 5: ";
string $Texture5 = `textField`;
//Store the file names of the textures and mesh in their own variables.
textField -edit ( $Mesh) $Mesh;
textField -edit ($Texture1) $Texture1;
textField -edit ($Texture2) $Texture2;
textField -edit ($Texture3) $Texture3;
textField -edit ($Texture4) $Texture4;
textField -edit ($Texture5) $Texture5;
showWindow $window;
//Done with window and text fields.

// Make dialog boxes to open mesh and textures.

//Mesh
{
file -import $Mesh;
return 1;
}
fileBrowserDialog -m 0 -fc "$Mesh" -ft ".x, .3ds, .obj, .fbx" -om "Import" -ds 1, -wt "Load Mesh";


//Texture1
global proc int importImage( string $Texture1, string $fileType, int -dialogstyle, string -windowTitle )
{
file -import $Texture1;
return 1;
}
fileBrowserDialog -m 0 -fc "Texture1" -ft ".bmp, .jpg, .tga, .png" -an "Import_Image" -om "Import" -ds 1, -wt "Open Texture 1 image";

//Texture2
global proc int importImage( string $Texture2, string $fileType, int -dialogstyle, string -windowTitle )
{
file -import $Texture2;
return 1;
}
fileBrowserDialog -m 0 -fc "Texture2" -ft ".bmp, .jpg, .tga, .png" -an "Import_Image" -om "Import" -ds 1, -wt "Open Texture 2 image";


//Texture3
global proc int importImage( string $Texture3, string $fileType, int -dialogstyle, string -windowTitle )
{
file -import $Texture3;
return 1;
}
fileBrowserDialog -m 0 -fc "Texture3" -ft ".bmp, .jpg, .tga, .png" -an "Import_Image" -om "Import" -ds 1, -wt "Open Texture 3 image";
-------------------------------------------------------------------
I am trying to make a mel script in Maya 8.0 that will have a window where you can open a mesh file (like .x, and .3ds), and load up to 5 textures for the mesh (.bmp, .jpg, .tga, .png). Then I want there to be a button that makes the mesh into Maya PaintFX. I have never scripted anything before, even in Maya 8.0. So I am a total noobie at this.

Questions:
1. Is there a command in the Maya Scipting language that can convert mesh files to paintFX?

2. If there is a command for converting meshes to PaintFX, what is it, and can you give me an example of how to use it please?

3. Are there any "if...then", or "if...then...else" statements/commands in Maya Scripting? If there aren't, is there a workaround for those?

4. How do you make the script into a .mel or .mll file? What's the difference between these two files?
-------------------------------------------------
By the way, the top part that says "Made by Spludge Interactive" - Spludge Interactive is just the name of a home business I am starting with my family. We haven't made any complete games to sell yet, and the website i'm working on isn't published yet either. I have started work on some games and graphics for them though.

Thank you
-Tammy

# 2 27-03-2008 , 09:07 AM
t1ck135's Avatar
Registered User
Join Date: May 2004
Location: UK
Posts: 1,991
1 + 2) as far as I'm aware paintfx creates meshes but I dont think you can create a mesh and use it in paint effects (I might be wrong)

3) an invaluable 'basics' in mel to get you up and running is at:
https://www.robthebloke.org/mel/index.html

4) A mel file is just the code that you write and is accessible in maya. A .mll (maya link library) file is a compiled machine code file that does not let you see the underlying code. It is done to substantially speed up the file's execution time.

Simon


Examples of bTraffic - a traffic animation tool for Maya
bFlocking - a tool for Maya 8.5+ to generate flocking and swarming behaviours
Jan/Feb Challenge 2007 Entry and W.I.P
May/Jun Challenge 2006 Entry and W.I.P
Mar/Apr Challenge 2006 Entry and W.I.P
Jan/Feb Challenge 2006 Entry and W.I.P
Nov/Dec Challenge 2005 Entry and W.I.P
Sep/Oct Challenge 2005 Entry and W.I.P
Jul/Aug Challenge 2005 Entry
www.flash-fx.net
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