Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Animation (https://simplymaya.com/forum/forumdisplay.php?f=14)
-   -   switching cameras while playing (https://simplymaya.com/forum/showthread.php?t=13619)

antiant 23-09-2004 06:42 AM

switching cameras while playing
 
Hi there.

What i would like to do, is to be able to press play, on the time line, and for my camera to change automatically it goes through the time line.
Ive written a script for it, but i cant quite get it too work. anyone got any ideas? is should really be quite simple, but im afraid my scripting knowledge is poor.. Thanks


play -state off;
lookThroughModelPanel rubbishCam modelPanel4;
playbackOptions -minTime 0 -maxTime 100;
play -forward true;
lookThroughModelPanel faceCam1 modelPanel4;
playbackOptions -minTime 100 -maxTime 200;
play -forward true;

antiant 23-09-2004 01:37 PM

Hi guys.. well heres the solution to the problem

first create a dummy camera
Then with that selected go to the expression editor and put this expression is
I have Four cameras setup in the scene. "Dummy" - just used for viewing, "Rubbish" "Face" and "Woman" are all cams set into position.
Then just adjust your currentTime to match when you want the camera to change. And you have real time, camera changes to get more feeling of how your animation will look.
P.S.. i didnt find the solution to this, my friend Jeff did..


if (`currentTime -q` <= 100) {
Dummy.translateX = rubbish.translateX;
Dummy.translateY = rubbish.translateY;
Dummy.translateZ = rubbish.translateZ;
Dummy.rotateX = rubbish.rotateX;
Dummy.rotateY = rubbish.rotateY;
Dummy.rotateZ = rubbish.rotateZ;
} else if (`currentTime -q` > 200 && `currentTime -q` <=300) {
Dummy.translateX = face.translateX;
Dummy.translateY = face.translateY;
Dummy.translateZ = face.translateZ;
Dummy.rotateX = face.rotateX;
Dummy.rotateY = face.rotateY;
Dummy.rotateZ = face.rotateZ;
} else {
Dummy.translateX = woman.translateX;
Dummy.translateY = woman.translateY;
Dummy.translateZ = woman.translateZ;
Dummy.rotateX = woman.rotateX;
Dummy.rotateY = woman.rotateY;
Dummy.rotateZ = woman.rotateZ;
}


All times are GMT. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018