FORUMS: list search recent posts

Maya expression; random attribute value with padding?

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrew Ludovico
Maya expression; random attribute value with padding?
on Feb 7, 2016 at 4:08:50 pm

Hi all,

I'm trying to do something with maya's expression that I'm not even sure it could work.

I want to change randomly some atribute values so that they will change every 56.25frame, with smooth transition.

I now nothing of coding and such, so I've looked on the internet for something similar to what I'm trying to do, and addapt it for my needs (here's the link: http://www.digitaltutors.com/forum/showthread.php?6065-Random-Rotation-Expr... (its in the last post))

So here is my take on the expression;

$KL_frame_padding=56.25
float $KL_next_number
float $KL_next_attribute_value
float $KL_incrementer
If (frame % $KL_frmae_padding==1)
{
$KL_next_number=rand (-2,2)
$KL_incrementer=$KL_next_number-nurbsCircle.twist
$KL_incrementer=$KL_incrementer/($KL_frame_padding-1)
}
else {
$KL_nextAttribute_value + $KL_incrementer
}
nurbsCircle1.twist = $KL_next_attribute_value;

I know nothing of writting expressions, and I get this error;
expression -s "$KL_frame_padding=56.25\nfloat $KL_next_number\nfloat $KL_next_attribute_value\nfloat $KL_incrementer\nIf (frame % $KL_frmae_padding==1)\n{\n$KL_next_number=rand (-2,2)\n$KL_incrementer=$KL_next_number-nurbsCircle.twist\n$KL_incrementer=$KL_incrementer/($KL_frame_padding-1)\n}\nelse {\n$KL_nextAttribute_value + $KL_incrementer\n}\nnurbsCircle1.twist = $KL_next_attribute_value;" -o nurbsCircle1 -ae 1 -uc all ;
// Error: float $KL_next_number //
// Error: Syntax error //

I might be well off track here...
Cheers!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]