PDA

View Full Version : A weird problem



Charles Z
03-27-2011, 04:15 AM
Hi everyone,

I am an beginner learning MEL. I study MEL following one of digital-tutors video which named "Introduction to MEL", very basic one. When I complete all my script, the flowerMaker, as the video does, I can not get the result as the video shows to us. By the way, I use the Maya 2011.

I have double-checked my script and make sure they are all correct.

And the weird thing is that I can get the correct result in Maya 2008, but I put the same script into Maya 2011, the result is totally different.

In addition, I separately test the script of the example from the DT training DVD in Maya 2008 and Maya 2011. I get the same result, one is right and one is wrong.

So, I would like to know what the problem cause this issue. Has the MEL changed in different visions of Maya?

7031

BrianHoard
03-27-2011, 02:22 PM
Can you upload the Mel script? I'll give it a try and see if I get the same result as you.

Charles Z
03-28-2011, 04:12 PM
Hi there,

Here is the project file that come from "introduction to MEL" DVD.

I do not behind my personal computer now, so I upload the project file which I just download from DT website. I test this script in MAYA 2011, and get the same result as I did.

Charles Z
03-29-2011, 03:32 PM
Sorry for I can not upload the project files, cos the system seems not allow me to do so.
So, the friends who concerned this question can log-in the DT website and get the project file from "Introduction to MEL".
I've tested this file and got the same wrong result in Maya 2011 on different computers.

BrianHoard
03-30-2011, 07:05 AM
Looks like they don't allow uploading those files.

chrisg
03-30-2011, 08:48 AM
Hi Charles Z,

I just ran the script directly from our project files and it worked in Maya 2011 64-bit. Can you copy your script into the reply text box in between two code tags? For example:


global proc flowerMaker () {

int $numPetals = `rand 10 20`;
$createShader = 1;



global proc flowerMaker () {

int $numPetals = `rand 10 20`;
$createShader = 1;

Charles Z
04-02-2011, 12:08 AM
Thank you for concerning this question.

I've found what the problem is and have already solved it. Both DT script and my script are correct and both work well in any vision of MAYA.

I made a careless mistake. Due to I am doing the rigging staff in my Maya 2011, the check boxes of rotate and scale in Transformations panel are turned off. And I did not reset Transformations before I run the script. So, that is the problem comes from.

And right now, I change the script to avoid the problem comes again. I replace all the code "Transformations;" with the code "makeIdentity -apply true -t 1 -r 1 -s 1;" in the script.