Hey sal2...
I tried to find the medullas operator in Maya Help, but couldn't.
Maya help is limited...
Medullas Operator is " % "
int $x = base % mod; // or float $y
If your base or mod is a float then calculations are in floats.
If the output is an int then the float is converted (rounded down) to int.
In your example: mod(2334-1,9)+1
becomes in Maya: int $y = ((2334 - 1) % 9) + 1;
Mel scripting is not bad, but it was designed as a general utility for
Maya's
node based interpreter. Mel is only scripting and not an actual
programming
language. It lacks some very basic features of a language such as simple
bitwise
logical operators (****ft left,****ft right, and, or, not) . Sometimes you
need
access to a large data space, in such conditions (AI search spaces) a
bitwise
hash is the fastest and simplest generic programming method.
Python (available with Maya 8.5) is a full computer language and does have
bitwise operators. Python in Maya seems to be working OK.
hth's aen...
-----------------------------------------------------
Digital Tutor has some good basic Mel video tutorials.
Gnomon has a good intermediate series on creating a complete UI:
MEL FOR EFFECTS ARTISTS
MEL FOR Animators
"The MEL Companion - Maya Scripting for 3D Artists" is a good ebook but
some of
the downloaded examples scripts had to be modified to work with 8.5.
>Greets All
>I'm trying to find out if maya has the Mod trig function if not how can I
get it or find a subsitute.
>example:
>mod(2334-1,9)+1 would equal 3
>
>It's to be used in a counter where the numbers only goes from1-9.
>
>tia
>sal2


|