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

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

Re: MR Curve Tool 3.0.1

Post by KuzKuz »

mmmaarten wrote: Mon Jul 24, 2023 8:43 pm
KuzKuz wrote: Sat Jul 08, 2023 3:19 pm Thank you for the explanation.
I believe this could be possible, but certainly not as part of the MR Curve Tool.
Personally, I rarely use this approach. If anyone else needs such a tool, please let me know.
Hi KuzKuz,

Happy user of your MR Curve Tool here!
Would it be possible to make the tool automatically select the just created shape to directly use it in the Styles panel (put the Styles panel in SHAPE mode)?
That would prevent us from needing to use the Select SHape tool after creating a shape just to switch the style.
(So like the Add Points tool does)

That would be awesome!

Thanks for considering! :D
Hello, thank you for the feedback. I have updated the script at https://mohoscripts.com/script/mr_curve_tool so that newly created shapes remain selected.
User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: MR Curve Tool 3.0.1

Post by mmmaarten »

KuzKuz wrote: Mon Jul 24, 2023 11:26 pm Hello, thank you for the feedback. I have updated the script at https://mohoscripts.com/script/mr_curve_tool so that newly created shapes remain selected.
Hey thanks for the quick action! Going to check it out! :D
Adults should play more often
User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: MR Curve Tool 3.0.1

Post by mmmaarten »

KuzKuz wrote: Mon Jul 24, 2023 11:26 pm Hello, thank you for the feedback. I have updated the script at https://mohoscripts.com/script/mr_curve_tool so that newly created shapes remain selected.
Hi, I just downloaded the script from the link (I tried both 'Download for Install Script Command' as well as 'Download Lua File'), but it's not working. The Styles panel remains in DEFAULT mode after drawing a closed shape with the tool. So the shape is not selected.

I do have auto weld turned on and I see the shape being closed.

Looking inside the script file it shows v3.0 again, while the previous latest was higher, at 3.0.1. But when comparing the script with the original 3.0 file it shows different content. Also compared to the 3.0.1 version, so either you intentially changed the version from 3.0.1 down to 3.0 again, which I wouldn't expect, or something went wrong somewhere?

Hope we're not having a miscommunication here; what I meant was that I wished that after drawing a closed shape with the tool this new shape gets selected so that the styles panel switches to SHAPE mode for that shape, making it much quicker to directly after drawing the shape set the fill and stroke (etc.) for it. Just like the native Add Points tool does. Hope this makes sense.


(BTW by testing this I just noticed a small issue in the tool that might interest you; when having two points and wanting to auto-weld the green dot for auto welding isn't popping up, only when adding another point it seems to work, but not with 2 in total?:) Image
Adults should play more often
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: MR Curve Tool 3.0.1

Post by KuzKuz »

mmmaarten wrote: Tue Jul 25, 2023 8:13 am
KuzKuz wrote: Mon Jul 24, 2023 11:26 pm Hello, thank you for the feedback. I have updated the script at https://mohoscripts.com/script/mr_curve_tool so that newly created shapes remain selected.
Hi, I just downloaded the script from the link (I tried both 'Download for Install Script Command' as well as 'Download Lua File'), but it's not working. The Styles panel remains in DEFAULT mode after drawing a closed shape with the tool. So the shape is not selected.

I do have auto weld turned on and I see the shape being closed.

Looking inside the script file it shows v3.0 again, while the previous latest was higher, at 3.0.1. But when comparing the script with the original 3.0 file it shows different content. Also compared to the 3.0.1 version, so either you intentially changed the version from 3.0.1 down to 3.0 again, which I wouldn't expect, or something went wrong somewhere?

Hope we're not having a miscommunication here; what I meant was that I wished that after drawing a closed shape with the tool this new shape gets selected so that the styles panel switches to SHAPE mode for that shape, making it much quicker to directly after drawing the shape set the fill and stroke (etc.) for it. Just like the native Add Points tool does. Hope this makes sense.


(BTW by testing this I just noticed a small issue in the tool that might interest you; when having two points and wanting to auto-weld the green dot for auto welding isn't popping up, only when adding another point it seems to work, but not with 2 in total?:) Image
I'm sorry, I'm not sure why the version reverted back to an older one, but it seems that the current version is now available on the website.
Try downloading it again.

I have limited the 'weld points' function so that it doesn't work with just two points, as Moho doesn't correctly handle curves made this way.
In such cases, the Bezier handles get twisted and it's impossible to fix until a third point is added.
You can try doing this with the Add Point tool and see what happens.
Last edited by KuzKuz on Tue Jul 25, 2023 9:08 am, edited 1 time in total.
User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: MR Curve Tool 3.0.1

Post by mmmaarten »

KuzKuz wrote: Tue Jul 25, 2023 8:59 am I'm sorry, I'm not sure why the version reverted back to an older one, but it seems that the current version is now available on the website.
Try downloading it again.
Yes! Now it works! Sweet :D
KuzKuz wrote: Tue Jul 25, 2023 8:59 am I've restricted the weld points function to only work with two points, as Moho doesn't correctly handle curves made this way.
In such cases, the Bezier handles get twisted and it's impossible to fix until a third point is added.
You can try doing this with the Add Point tool and see what happens.
Ah ok, all clear!

Thanks for the quick action!
Adults should play more often
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: MR Curve Tool 3.0.2

Post by Greenlaw »

Hi KuzKuz,

The latest MR Curve Tool update is to working well here. After creating a shape with it, I can immediately edit the style or continue drawing with the tool.

Thank you for continuing to make a great tool even better!
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: MR Curve Tool 3.0.2

Post by KuzKuz »

Thank you, I'm working on the next version. I'm hopeful that I'll be able to bring my ideas to fruition.
User avatar
EricTheFish
Posts: 85
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: MR Curve Tool 3.0.2

Post by EricTheFish »

Excellent update! Thanks Eugene! :D
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: MR Curve Tool 3.0.2

Post by mmmaarten »

KuzKuz wrote: Wed Jul 26, 2023 12:22 am Thank you, I'm working on the next version. I'm hopeful that I'll be able to bring my ideas to fruition.
Hi KuzKuz,

When drawing with the curve tool everything feels exactly as expected, except for the last part; that's working in reverse in comparisson with the pen tools I'm familiar with in other software.
As an example I just recorded a video to compare Affinity and Vectorstyler as an example with the Moho script to show you what I'm mean. It's been a while since I used Adobe Illustrator and Photoshop, but I'm pretty certain these have the same behaviour as the other programs mentioned (as well as some other applications I use here).

I'm using the handles while closing the curve pretty much always and it feels disruptive to need to twist the handles around on that last bit because these are rotated in the curve tool for some reason. It also changes the already set curve at the beginning while doing it, so we're basically doing double work there. While you're working on a new version may I please ask you if it would be possible to change the behaviour there to match the other pen tools around? That would streamline the workflow quite a bit here and make the tool even more fluid and fun to use! :D

Thanks for considering!

Adults should play more often
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: MR Curve Tool 3.0.3

Post by KuzKuz »

I've updated the script to version 3.0.3 and made the curve closing behavior as close as possible to how it works in Clip Studio.
If you hold Shift while closing the curve, the initial handle will not change its length.

User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: MR Curve Tool 3.0.3

Post by mmmaarten »

KuzKuz wrote: Thu Jul 27, 2023 12:53 pm I've updated the script to version 3.0.3 and made the curve closing behavior as close as possible to how it works in Clip Studio.
If you hold Shift while closing the curve, the initial handle will not change its length.
Cool! That's perfection! Pretty cool to even have both options available now!
You did this quick too, thanks a ton!! :D
Adults should play more often
ilvmgct
Posts: 4
Joined: Sat Dec 03, 2022 5:56 am

Re: MR Curve Tool 3.0.3

Post by ilvmgct »

Can a node be divided into two non welded nodes?
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: MR Curve Tool 3.0.3

Post by KuzKuz »

ilvmgct wrote: Wed Aug 02, 2023 10:08 am Can a node be divided into two non welded nodes?
Hello. Just use copy and paste to separate the curves from each other.

ilvmgct
Posts: 4
Joined: Sat Dec 03, 2022 5:56 am

Re: MR Curve Tool 3.0.3

Post by ilvmgct »

KuzKuz wrote: Wed Aug 02, 2023 11:54 am
ilvmgct wrote: Wed Aug 02, 2023 10:08 am Can a node be divided into two non welded nodes?
Hello. Just use copy and paste to separate the curves from each other.

Thank you for your answer. However, when the control handle is fixed, the curvature will change after re welding.
User avatar
KuzKuz
Posts: 483
Joined: Mon Aug 19, 2013 5:12 pm
Location: Ukraine

Re: MR Curve Tool 4

Post by KuzKuz »

Hello! I've updated this script not only for Moho 14 support but also to version 4.0. There is no video yet, but it will be available soon. So, new features:

1. Support for Moho 14.

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. For example, to draw only on frame 0, and use the other frames only for transforming the points. If the drawing mode is turned off, you can select points without having to press any hotkeys.

4. Full support of the FBF layers. Moho 14 has introduced some improvements for FBF, so it’s a great moment to try to use them together with this tool.

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. Also, you can use this tool not just for drawing but for point animation as well.

6. Bug fixes and code optimization.

Download link: https://mohoscripts.com/script/mr_curve_tool
Post Reply