How to make a view active?

Hi all
I have just written my first real script, a tetris clone.
Everything is working fine except that when i start the script by
entering Meltris in the command line, i lose focus from the front view
with i use for the game. So the player most mouseclick in the view to
be able to control the falling block with the arrow keys.

So if there is any way to set a view to active thru a script, i really
want to know

Meltris

David H

you are sure you didn`t key the front camera transformation or one of its attributes??

thx for the reply hansesurfer

and i am sure that i didn

then, when you positioned the front camera correctly, set a key for the translation values at frame 0...

ups...or for the attribute whose values change...

woah! kudos, that is the most amazing MEL script I have ever seen or downloaded.

How the hell did you do it? I've had a quick scan through the MEL code and I have no idea how it works... any chance you could post a brief explanation of how the key mechanics work...?

I'm sure I could figure it out given long enough...Looks like it's gonna be a long night...

:nathaN

I get a Fatal Error when I try to start it. I simply draged & dropped it over maya... rattle rattle rattle... and PLOP : the Error. Typing "Meltris" won't work either.

I got maya 6.0.1, and even tryed it on other versions.

Yeah... I dropped it onto Maya 6.5 and I got a fatal error too...
however, I drop it onto Maya 6.0.1 and it auto-runs fine every time...

I hope you get it working, cos as an example of MEL it is fabulous.. (imho)

:nathaN

Works fine on 6.5 for me!

Ps. if someonbe has problems understanding how it works chek out the outliner, its just a expression node that is run every frame. Coupled with timer x to know how much time has elapsed sce last loop.

Hi all

i found how to do it setFocus, dont know how i could miss that command

@ewerybody I got maya 6.0.1 and and it auto-runs fine so
dont know whats the problem

and how it works has joojaa already explain the most important part

Ah it works! I started over with a fresh user-folder, by renaming mine. Don't know what i got in there that the crash occurs. Maybe I have a procedure with the same name or something.. It crashs just before it starts. first it seems like calculating or creating something and then ..: plop. Fatal error.

Maybe I find time to take a look at it.

But now the shouting: WOOOAAR!! ^^ whatta cool script man!! 3 thumbs up!!!