Fireworks
I'm messing with Maya's fireworks. I want to use a MEL script to control the colors as described in the docs, but cannot figure it out.
Remake Color Palette Quote:
global proc vector[] myFireworksColors( int $numColors ); I get an error though // Error: global proc vector[] myFireworksColors( int $numColors );arksColor[1], $sparksColor[2]>>; // // Error: Syntax error // Any thoughts on what I should be doing? |
You have to do something like this:
Code:
global proc vector[] myFireworksColors( int $numColors ) |
Hey kBrown,
Thanks for the assist, but a wierd thing is happening. When I created a script with that text called myworks02.mel, I get an error message // Error: Cannot find procedure "myworks02". // If I remove that text and go back to the simple command I had before that did nothing, it finds the script but of course doesn't work. I'm guessing it's a bogus error message meaning something else is wrong. As I try to dissect and understand your MEL, might there be an error in the "for" condition? Doesn't it set $i to 0 every time? should it for $i ==0? Also, $i is defined as an integer, but with no value. Does that automatically make it's value 0? Thanks again, -dann |
Quote:
One way would have been to copy-paste the script in to the script editor and execute it. This way the global procedure would have persisted in the memory until you quit Maya... Quote:
Quote:
The $i is defined as an integer and because I didn't assign it a value maya initializes it to 0. The for loop is alright too. Please excuse my bad explanation but it's like: Code:
// for( <iterator and initial value>, <test condition>, <what to do on every round ) |
Thanks K!!!
|
K,
First, let me say thank you for your help and patience with me. However I still cannot get this to work. Quote:
Any thoughts on what else I could be doing wrong? I'm still in Maya 4. Could that be the problem? Attached is my mel file. Maybe I did something wrong there, but it's just your code pasted in I think. Thanks again. -dann |
You're right about the sourcing. It just loads the script in to memory (and checks it for errors).
In the fireworks thing you need to point it to your procedure, not the mel file (the file could contain a number of other procedures). So in this case you should enter "myFireworksColors". |
ohhhhhhhhhhhh...
You're my new hero. Thanks K!!! |
No problem :)
Learned myself something too in the process :) |
I love it when you're messin with mel, and in my situation, dynamics in general, and youve been bangin your head against a wall for hours/days/weeks, when all of a sudden, CLICK!
...the lightbulb turns on, and a flood of excitement rushes over you as you are either: -glad the hard-part of the project is over or -jumping to that next level of knowledge about our wonderfull industry:) Happy, happy, joy, joy:) |
I totally agree with you Rage :)
After the CLICK you feel the adrenaline flowing and you could almost rule the world. You think to yourself "damn, i'm good!" :D The next second you start looking around if someone noticed the wide grin on you face and you realize that they propably think you're nuts :D |
LOL! no kidding:)
When that stuff happens to me, I jump up and shout: "I am the smartest man alive!" .. it's usualy then that my gf laughs at me, and tells me that I still suck... hehe.. |
All times are GMT. The time now is 07:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018