MR Curve Tool 4.1

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

MR Curve Tool 4.1

Post by KuzKuz »

This tool allows you to create points in Moho by just clicking the left mouse button instead of dragging and holding.



Version 2.0 new features:
1. Bezier Handles support
2. Auto-Weld option
3. Auto-Fill and Auto-Stroke options



Version 2.1 new features:
1. Use Bezier Handles option
2. Threshold option to activate Bezier handles

Version 2.2 new features:
1. Bug fixes
2. Added the ability to select points by holding Shift + Alt
3. Added the ability to delete selected points with the Delete key

Version 2.3 new features:
1. Bug fixes



Version 3.0 new features:
1. Added support for non-zero frame tool operation
2. Added Sharp corners option
3. Added the ability to use Shift for moving a point horizontally or vertically only
4. Added the ability to use Esc to end the curve at the last point created
5. Added grid snapping support for points
6. Added option to disable Bezier handles activation while drawing
7. Added ability to set cursor distance for activating Bezier handles
8. Added ability to select point by clicking on it
9. Added ability to delete selected points using Del key
10. Added the ability to move a selected point
11. Added the ability to weld a point by moving it onto another point or curve
12. Enter key now welds point to another point or curve in drawing mode
13. Now you can move the just-created point on the segment
14. Added ability to use Ctrl key to adjust curvature while moving a point
15. Added ability to use Alt key for unlocking neighboring Bezier handles when moving a point
16. You can control Bezier handles when one point is selected
17. Added an option to show Bezier handles for all points or just the selected one
18. Now, to continue an existing curve, double-click the existing point
19. Added the ability to select multiple points using Shift + Alt keys
- Add to selection using Ctrl + Shift + Alt keys
- Remove from selection using Ctrl + Alt keys
20. Added the ability to transform multiple points at once
- Added Skew transformation mode
- Added Distort transformation mode
- Added the ability to reset the pivot position with a double-click
- Added ability to deselect points by double-clicking away from pivot
21. Added options to enable/disable Transform Box controllers for Skew and Distort
22. Bug fixes



Version 4.0 new features:
1. Moho 14 support.
2. New Single Curve Mode in which you can modify the curvature and how many points the curve should be split into.
3. Added options to turn off the drawing mode.
4. Full support of the FBF layers.
5. No more “jumping” points or Bezier handles! This tool’s transformation works with points that are affected by smartbones and bones that are flipped.
6. Bug fixes and code optimization.

Download link: https://mohoscripts.com/script/mr_curve_tool
Last edited by KuzKuz on Sat Jan 20, 2024 12:45 pm, edited 17 times in total.
User avatar
SimplSam
Posts: 1048
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: MR Curve Tool

Post by SimplSam »

Great script. I think I would also like ESC to end the 'curve' at the last set point.

And I think the whole auto-weld, auto-fill, sharp-corners options might be required (in ver 2.0) :D

Good Stuff.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: MR Curve Tool

Post by KuzKuz »

Thank you! Yes, I plan to develop this tool further. I'm also thinking about Bezier mode, like Photoshop's Pen Tool.
Auto-weld and sharp-corners are already working via shortcuts. How important is it to have them as options on the panel?
User avatar
SuperSGL
Posts: 364
Joined: Wed Mar 11, 2015 2:55 am
Location: New Hampshire
Contact:

Re: MR Curve Tool

Post by SuperSGL »

Looks great very much needed! Should be standard in the next version of Moho. Being able to click and drag to create the curve your looking for would be nice too, that would definitely become bezier though.
"Animation is not the art of drawings that move but the art of movements that are drawn."
Norman McLaren


My Animations
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: MR Curve Tool

Post by DK »

KuzKuz this script is brilliant! You just made the Moho drawing tool even better!
Thank you so much once again and take care over there.

Cheers
D.K
User avatar
EricTheFish
Posts: 85
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: MR Curve Tool

Post by EricTheFish »

Wow! Eugene, Moho just gets better and better thanks to your incredible scripts!
This is exactly what I was missing from using other drawing software.

Thank you so much for sharing this. :)
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: MR Curve Tool

Post by Lukas »

KuzKuz wrote: Sun Jun 19, 2022 6:32 pmI'm also thinking about Bezier mode, like Photoshop's Pen Tool.
I would love that!
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: MR Curve Tool

Post by davoodice2 »

KuzKuz wrote: Sun Jun 19, 2022 3:46 pm This tool allows you to create points in Moho by just clicking the left mouse button instead of dragging and holding.



Download link: https://mohoscripts.com/script/mr_curve_tool
you are awesome . it's absolutely needed. especially when we use pen to draw. also ctrl usage in default tool is painful , you bring it to life. thank you again for sharing this.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: MR Curve Tool

Post by Daxel »

Great mod! And yeah the peak shortcut (ctrl) works much better here than in the original tool.

The original has a big flaw: when you are going to create the next point and hold ctrl, Moho doesn't seem to activate the peak mode until you move the mouse a little bit before adding the point (if you look the path you can notice the slight change in curvature when you move the mouse that indicates that the point you are about to add is going to be peaky). So many times the user holds ctrl without moving the mouse and the added point is normal. That should be fixed in the built in tool.
BigBoiiiJones
Posts: 77
Joined: Sun Mar 22, 2020 11:33 pm

Re: MR Curve Tool

Post by BigBoiiiJones »

It'd be cool to have a option where right click acts as a enter button as well similar to CACANis way of handling it.

Edit:

Also is there any way to get the vector to automatically fill in the stroke so we can see the stroke be filled in per click or that a bigger limitation with Moho itself? Like basically the stroke is created during each click so we have a actual preview of the line while adding more points.
Last edited by BigBoiiiJones on Tue Jun 28, 2022 2:20 am, edited 1 time in total.
rocken
Posts: 28
Joined: Wed Mar 21, 2018 1:30 am

Re: MR Curve Tool

Post by rocken »

Thanks to the Great Developer of this scripts
Great script. has made me love drawing in Moho.
a little feature i would request for a version 2:
ability to change the line that is dangling ( the line that has not been clicked down) from curve to straight line
Thanks for your efforts
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: MR Curve Tool

Post by davoodice2 »

BigBoiiiJones wrote: Tue Jun 28, 2022 1:42 am It'd be cool to have a option where right click acts as a enter button as well similar to CACANis way of handling it.

Edit:

Also is there any way to get the vector to automatically fill in the stroke so we can see the stroke be filled in per click or that a bigger limitation with Moho itself? Like basically the stroke is created during each click so we have a actual preview of the line while adding more points.
as far as I know right click not available through scripting.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: MR Curve Tool

Post by KuzKuz »

Version 2.0 is released. The link in the first post is updated.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: MR Curve Tool

Post by Greenlaw »

Wow! MR Curve 2.0 is fantastic Eugene!

In the short time I've been using it, it's already become a game changer for the way I draw in Moho. For point-by-point drawing, this is so much faster and more fluid than using Add Pont tool (and I'd gotten pretty good with Add Point over the years.)

Thank you so much for creating and sharing this tool.
User avatar
JoelMayer
Posts: 285
Joined: Sun Apr 05, 2009 8:29 pm

Re: MR Curve Tool

Post by JoelMayer »

This is basically what the default tool should be like! A modern and fast way of putting down points. Thanks a lot Eugene!
Post Reply