Hi all. First off, put hands up Im a complete noob so go easy on me.
I have a quick question. When you want to use expressions in script editor, how do you get information thats like date -format?
For example, Ive got this which is a part of a clock:
CODE
//Used to set the minute hand position.
int $minute = date -format "mm"
;
int $rotateMinute = $minute * -6;
setAttr "minuteHand.rotateZ" $rotateMinute;
The expression is where Im struggling.
CODE
//Expression which makes the minute hand move.
expression -o minuteHand -s "minuteHand.rotateZ = $rotateMinute + (time / -10)";
^This is what I want, but the syntax is wrong because of $rotateMinute. It works without a procedure, but with a procedure it doesnt work.
So my question is, how can I replace $rotateMinute in the expression to have real life minutes or is there a way for the expression to access $rotateMinute? Thanks in advance.