Page 1 of 2

Rotate Points tool with a changeable center of rotation

Posted: Mon Oct 11, 2004 2:59 am
by 7feet
Hey folks.

So I, among others, wanted to be able to change the origin for rotating points, so here it is. If you want to move the center, press the <alt> key and move the center moves with the cursor. Everything is the same. Took me far too long to figure it out, I started out far too complicated (as usual) and having to guess at how the API works is a pain, but it seems to work fine. Just replace the original (renaming the original first for a backup) in the Moho\scripts\tool folder.

Also, LM, I don't know if you have any policy on submissions, but I think this is a handy mod and if you wanted to throw it in the Moho release, feel free. If you wanted to I'd be happy to send you any kinda waiver needed.

--Brian

Posted: Mon Oct 11, 2004 9:11 pm
by Postality
Thanx 7feet, I thought you had forget about me, haha

Posted: Tue Oct 12, 2004 4:39 am
by 7feet
Nope, hadn't forgotten, just had to wait for a break in the 16 hour days at work. Don't know when I'll have a chance to write anything else. I had the strange thought to try and write something that would take motion capture files and convert them into bone rotations and scaling. Dunno, maybe I'll just do something actually useful.

--Brian

Re: Rotate Points tool with a changeable center of rotation

Posted: Tue Oct 12, 2004 5:29 am
by myles
7feet wrote:So I, among others, wanted to be able to change the origin for rotating points, so here it is.
Nifty! Thanks, Brian, this is a useful modification, particularly for drawing.

Heh :) - when testing it out I re-discovered why bones are such a great idea for 2D animation - I rotated the points on a keyframe, but of course the actual direct point movement from one keyframe to the next is linear - so I got a chuckle out of the result and my assumptions.

Regards, Myles.

Posted: Tue Oct 12, 2004 7:21 am
by 7feet
Hmmm. Hadn't thought of that part, there, Myles. I wouldn't want to muck up a basic tool that much, but as I get a better handle on the math of the rotations (most of my high school geometry has vaporized over the years), I mighgt as well make a whole 'nother tool. Maybe have it add keyframes over a specified period to describe the arc. I was thinking of it more for drawing.

However, that gave me an idea. Perhaps alternate to the Layer Rotation tool to allow you to change the "apparent" origin within the tool would be a good thing. Since the layer origin isn't keyframable (and i would think that could cause some unexpected mayhem itself), this would also have to create keyframes for layer rotation and translation, but for the Flash folks it would at least keep the layer optimized. You create a lot of keyframes, but you could also incorporate some control of the ease in and out and such on the move.

Don't really want to make the basics too bulky, but theres no harm in sets of specialized tools you can patch in when you need them.

--Brian

Posted: Wed Jan 12, 2005 5:46 pm
by Rai López
Before nothing I must say that this script modification is the most usefull thing that I've seen! (THANKS again 7feet) and now add that it'll be usefull can modificate the center of rotation in all point modification tools... Well, I have a question about changeable center of rotation: there is a way to reset the center of rotation to his original position then of that I modificate it with ALT key? I don't Know if this is possible and actualy I close the program and re-open to reset the modificate center of rotation... Is this the one option? THANKS in advance!

Posted: Wed Jan 12, 2005 7:41 pm
by 7feet
Easy enough to throw in a Reset, the tool normally just figures a center automatically. I'll do it as soon as I have the chance.

--Brian

Posted: Sat Jan 15, 2005 8:36 pm
by Rai López
WOW!! I´ll be waiting just here... THANK YOU VERY MUCH!! :D

Posted: Wed Dec 28, 2005 7:52 pm
by hard as snails
erm hi!!!! how do i get that script into my moho????have downloaded it but then can't open it....i'm probably being stupid! happy new year from the u.k.

Posted: Wed Dec 28, 2005 8:16 pm
by Rai López
Copy it into this directory: "C:\Archivos de programa\Moho\scripts\tool" for me, or more probably for you: "C:\Program Files\Moho\scripts\tool" (you can make a Backup of your original file before overwrite it if you want), then open, RE-open or Press Ctrl+F5 for refresh the program and you'll can use it :) ...ENJOY of this SUPER USEFUL script!

Re: Rotate Points tool with a changeable center of rotation

Posted: Wed Dec 28, 2005 8:18 pm
by Rai López
Jaja, just now I've read this, ermmm...
7feet wrote:Just replace the original (renaming the original first for a backup) in the Moho\scripts\tool folder.

Posted: Wed Dec 28, 2005 8:32 pm
by hard as snails
cheers got it!

Posted: Wed Dec 28, 2005 9:38 pm
by bupaje
Hey 7feet thanks! Seems useful and will try it tonight.

EDIT: Tested it out - it is great. Thanks!

Posted: Thu Dec 29, 2005 8:18 am
by macton
7feet wrote:However, that gave me an idea. Perhaps alternate to the Layer Rotation tool to allow you to change the "apparent" origin within the tool would be a good thing. Since the layer origin isn't keyframable (and i would think that could cause some unexpected mayhem itself), this would also have to create keyframes for layer rotation and translation, but for the Flash folks it would at least keep the layer optimized. You create a lot of keyframes, but you could also incorporate some control of the ease in and out and such on the move.
I'm not sure that you can do what I think you're describing, which is:
1. Subtract pivot point from layer translation
2. Rotate layer
3. Add pivot point to layer translation

Since Moho only supports one translation per frame (if it supported both a pre and post translation, we wouldn't really need an origin) this method would need two frames to carry out.

However, the other option is to rotate the points on the layer based on a selected pivot point. It's not optimized for Flash, but it will work fine (Although as noted above, the interpolation will be different)

I whipped up a script that does that - look under Extras here:
http://www.lostmarble.com/forum/viewtop ... highlight=

moving rotation point

Posted: Sun Jan 08, 2006 8:51 pm
by hard as snails
hi,i'm trying to swing a door open using the perspective points h tool it works fine but the door swings open on an axis that runs down the middle not where it meets the door frame(where the hinges would be),i need to move the rotation point to the left....i have tried using the alt key.any ideas????