Rotate Points tool with a changeable center of rotation
Moderators: Víctor Paredes, Belgarath, slowtiger
Rotate Points tool with a changeable center of rotation
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
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
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
--Brian
Re: Rotate Points tool with a changeable center of rotation
Nifty! Thanks, Brian, this is a useful modification, particularly for drawing.7feet wrote:So I, among others, wanted to be able to change the origin for rotating points, so here it is.
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.
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
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
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!
-
- Posts: 28
- Joined: Sun Nov 27, 2005 8:58 pm
- Location: uk
- Contact:
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
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.
-
- Posts: 28
- Joined: Sun Nov 27, 2005 8:58 pm
- Location: uk
- Contact:
I'm not sure that you can do what I think you're describing, which is: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.
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=
-
- Posts: 28
- Joined: Sun Nov 27, 2005 8:58 pm
- Location: uk
- Contact:
moving rotation point
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????
hilarity begins at home...