Universal Layer Tool - added Universal Point Tool, also

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Universal Layer Tool - added Universal Point Tool, also

Post by 7feet »

So, I've seen any number of complaints on the lack of an easy way to get at some perameters because of the new context sensitive display. There are a few points where I heartily agree. Here is my first enty to help alleviate the difficulty -the Universal Layer Tool. This is a zip file with the Tool script and icons. If you wan't to use it, just expand the file in your Moho/Scripts/Tool folder, wherever that is.

What I've done -- I've combined all of the Layer Rotation tools and the Layer Translation tool into one package. For one, you get the numerical figures for each rotation and translation in one spot on top of the main window.

You can also change them all with the mouse. With no keys pressed, it works just as the regular Rotate Layer tool does. Press the <ALT> key, and you rotate the layer on the X axis, press the <CTRL> key and you rotate the Y axis. Press the <SHIFT> key, and you switch over to Layer Translation. <SHIFT> and <ALT> together and you traslate on the Z axis (depth).

I mostly did this because I've been doing a fair amount playing with layers in 3D space, and had to go back and forth a lot. It's also nice to just have all the info in front of you. One thing to keep in mind when you're using it. It can do some odd things when you switch back and forth between the Rotation and Translate modes without releasing the mouse button first. I'll figure that out, but it's not too much of a problem. Hope you dig it.

Oh, yeah, because of having to use the <SHIFT> key to do the translation, I had to kill the ability to use it for constraining movement. I had wanted to use the <TAB> key to do translations, and as soon as I fiigure it out I'll switch it over to that and put the constraints back in.

--Brian

p.s. Point tool is below
|
\/
Last edited by 7feet on Tue Nov 09, 2004 6:27 am, edited 2 times in total.
User avatar
cribble
Posts: 899
Joined: Wed Aug 04, 2004 12:42 pm
Location: London, UK
Contact:

Post by cribble »

Thank God. This is such a useful tool, i didn't know how i lived without it. Thanks you so much 7feet, I would crown you if i met you.
--Scott
cribble.net
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

Wow, neat -- I wonder if it would be just as simple to combine other tools into one this way?
-Keith
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Hey, just make a list. Suggestions are welcome. I know it makes sense to keep things simple for the general user, but some "power user" bit's are important. This was, from what I could see, both one of the easiest to do and one that would be immediately handy. Glad y'all like it.

One other thing I wanted to do is allow you to select multiple points, or deselect multiple points that are already selected, while you stay within the Translate Points tool. I spend a lot of time going back and forth between Select Points and Translate points, and folding them together somewhat might be a good thing. Maybe slap a Magnet mode in there too. I think that might be kinda cool.

--Brian
Benvindo
Posts: 38
Joined: Tue Aug 03, 2004 9:56 pm

Post by Benvindo »

7feet ,

The Universal Layer Tool is reeaaalllly nice !!! :D

Thanks


Benvindo
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

I was thinking a way of adding points, selecting points, translating points and adjusting the smoothness/tightness of the curve through those points all in one tool could be neat ... maybe making use of all three mouse buttons and the scroll wheel, or something. So you can do all those things without taking your eyes off the work area.
-Keith
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Part of the problem I having is, at least on PC's , the right mouse button seems to be spoken for. As far as I can tell, the Lua interface only recognizes the left mouse button. Also, there are other key shortcuts for use with one button Macs, and I want to make sure everything stays cross-platform. Us eing the scroll wheel for some things would be handy, but I can't figure it yet.

I was working on what I said, and got a blanket deselect and lasso selection into the Translate point tools, but the lasso would break if you did the deselect thing. I'm sure I could track it down. The Add Point should be posssible to get in there, but I'm afraid of it getting confusing. The same with the Curvature tool. Besides the fact that at this point, I'd probably go nuts.

One of the difficulties is that tha Lua interface still ain't documented, and work with what I can puzzle out from the existing scripts. For example, it's clear, 'cause it's used all over the place, that you can easily screen for the <CTRL> and <ALT> keys in conjuction with the mouse, but are there any other keys? I just dunno. The way you can capture other keys is a little confusing, and it's not reporting the keys as matching their defined Global Values correctly in son cases (I wanted to use the <TAB> key as the modifier for the translation for clarity, but the Global is equivelent to 9 and the function returns -3. Or maybe the reverse, I forget at the moment. That caused a fair bit of fun.) It's just a question of what I can do with what I have.

If I knew what was going on, I'd be trying to write some of the brand new tools I wan't. This is all good practice, though.

So, I should have the Translate Points thing done tonight. I was going crossed. I also thought I would try and make a button style tool ( like the Flip Layer, or Smooth and Peak) that would pop up a window with every damn parameter I could cram into it. I don't think I could make it persistant, but you could get an overall look at what's going on. Maybe one for each toolset.

--Brian
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

Curvature, there's the word I was trying to think of, heh. :)
-Keith
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

TaDahhh.

Post by 7feet »

No nifty names, but I whipped the new-and-improved Point Translation tool into decent shape. Works as usual, but <CTRL><ALT> and a mouseclick will deselect all points. Just <CTRL> puts you in Lasso selection mode. It also clears the current selection. If there's an outcry for it to add to selections instead, no problem.

Most of the code for the point curvature is already in there but I couldn't quite get it working for tonight. The rest of it seems fine. 'Night, all.

--Brian
User avatar
kdiddy13
Posts: 381
Joined: Tue Aug 03, 2004 10:26 pm
Location: New Zealand
Contact:

Post by kdiddy13 »

This is awesome! Thank you! THANK YOU!

Would it be possible to do something similar with bones (in particular the manipulation/animation aspect of it). I miss being able to see everything a bone is doing numerically at once.
________
PENNY STOCKS
Last edited by kdiddy13 on Mon Mar 07, 2011 4:54 am, edited 1 time in total.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Point Tool

Post by 7feet »

Okay, I think this one is it for a while. I just can't cram any more in there.

- Just clicking and moving works as it did, but the <ALT> switch to disable Auto-Welding won't work in this case, you have to use the checkbox.

- <CTRL> click without selecting anything new deselects everything.

- <CTRL> click(hold) puts you into Lasso mode

- <CTRL> <ALT> now puts you into Point Curvature adjustment mode

- <SHIFT> to Add Points (<ALT> with it will still disable Auto-Welding.

- <ALT> by itself puts you in Point Rotation mode. Also holding down <SHIFT> <CTRL> lets you move the current Origin for rotation to the point you move the mouse to.

- <CTRL> <SHIFT> puts you into Point Scaling mode.

Whew!

Universal Point Tool

Sorry, no more constraining, just couldn't fit it in. I think that's about it. I'll see what I can do about the Bone thing.

--Brian
teotoon
Posts: 135
Joined: Wed Aug 04, 2004 7:19 am
Location: Turkey

Post by teotoon »

This is such a nifty and useful tool. Thank you very much SF!
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Y'welcome. Just trying to get stuff tuned up to my liking so I can get down to the biz of animating, and always glad to share. I have all the bone related scripts open in my text editor ( and by the way, thanks Keith for the Textpad sytax you put up a while ago, saved me from many a dumb mistake) and I'm trying to figure it out. there are only so many perameters you can put on the top of the main window. If there's some way to store the window position (hey LM!) for a SimpleDialog box, I don't think it would be all that hard to whip up a psuedo-persistant window with all the happy little parameters you'd want that would just re-pop open automatically as you wen't between bone (and perhaps other) tools. Just as long as it could pop open in a spot that's NOT right in the middle of the main window. I think that would neatly cover the griping about the loss of the old info panels.

I'l figger if out eventually. Keep the suggestions coming. With enough praktis, I might begin to think I know whats' going on.

--Brian
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

the links to your scripts doesn't seem to work anymore.
User avatar
Green Walls
Posts: 16
Joined: Fri Sep 23, 2005 9:45 pm
Contact:

Universal Point Tool

Post by Green Walls »

7feet - Love this tool! Really makes the workflow a great deal easier. Thanks, one quick question/suggestion is it possible to make a shortcut key to turn on the Universal Point Tool?

Thanks Again!
Anxiety is the handmaiden of creativity.
- Chuck Jones
Post Reply