Page 9 of 13

Re: MR Curve Tool 3.0 BETA

Posted: Sun Apr 02, 2023 11:21 pm
by KuzKuz
Thank you for your reply, I'll be looking forward to your animated short film.

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 9:50 am
by SimplSam
Point selection mode: For me everything appears to be working great with all before and the new feature.

Mac crazy edit problem: I hadn't even tried it on Mac before the issue was re-raised by Hoptoad the other day, but after some digging - it looks like the issue is related to a couple of g:ApplyMatrix(matrix) statements (around lines 1453 and 1599 on my version) which are not protected by g:Push() / g:Pop() and endup influencing the drawingStartVec values. Why it doesn't break the Windows version - is a mystery.

Fixing functionality for Points controlled by Smart Bones: Do you mean allowing it to work in Action editing? I guess that could be useful, especially if we get used to using this for 'normal' point editing. But equally not high-priority for me.

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 12:13 pm
by KuzKuz
Thank you for your help! I added g:Push() and g:Pop(), but it needs someone with a Mac to check it.

Regarding points controlled by Smart Bones, I meant the undesired jumps in point positions and Bezier handles due to the mismatch between the actual on-screen position and the values in the keyframes.

Example in the video:



You can already use this tool in transform mode while being inside an action.

Download: https://drive.google.com/file/d/1Jafrrl ... sp=sharing

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 1:50 pm
by SimplSam
KuzKuz wrote: Mon Apr 03, 2023 12:13 pm Thank you for your help! I added g:Push() and g:Pop(), but it needs someone with a Mac to check it.
...
The fix appears to address the crazy edit problem on Mac.

However - it also negates the applied Matrix on g before it is used in the mouseDist CurrentScale calc.

Code: Select all

g:ApplyMatrix(matrix)
g:Pop()
local mouseDist = self:GetDistance(mouseEvent.drawingStartVec, mouseEvent.drawingVec)
mouseDist = mouseDist * g:CurrentScale(false)

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 2:05 pm
by KuzKuz
Thanks! I hope this is correct.

Code: Select all

local g = mouseEvent.view:Graphics()
g:Push()
local matrix = LM.Matrix:new_local()
moho.drawingLayer:GetFullTransform(moho.frame, matrix, moho.document)
g:ApplyMatrix(matrix)
local currentScale = g:CurrentScale(false)
g:Pop()
local mouseDist = self:GetDistance(mouseEvent.drawingStartVec, mouseEvent.drawingVec)
mouseDist = mouseDist * currentScale
Download: https://drive.google.com/file/d/1Jafrrl ... sp=sharing

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 2:12 pm
by Hoptoad
SimplSam wrote: Mon Apr 03, 2023 9:50 am Mac crazy edit problem: I hadn't even tried it on Mac before the issue was re-raised by Hoptoad the other day, but after some digging - it looks like the issue is related to a couple of g:ApplyMatrix(matrix) statements (around lines 1453 and 1599 on my version) which are not protected by g:Push() / g:Pop() and endup influencing the drawingStartVec values. Why it doesn't break the Windows version - is a mystery.
KuzKuz wrote: Mon Apr 03, 2023 12:13 pm Thank you for your help! I added g:Push() and g:Pop(), but it needs someone with a Mac to check it.
The script is working on my Mac computer now.

Thank you SimplSam for locating the problem and KuzKuz for quickly updating the script.

This script will save me time, as I can use less points while drawing shapes. When using the core drawing tools, I would often add a lot of extra points to a shape rather than switch to the curvature tool, so many of my shapes had a LOT of points. With this script, I use far less points.

Thanks for making this useful script KuzKuz.

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 3:06 pm
by KuzKuz
Great news, thank you for the feedback!

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 3:31 pm
by Greenlaw
KuzKuz wrote: Mon Apr 03, 2023 12:13 pm Regarding points controlled by Smart Bones, I meant the undesired jumps in point positions and Bezier handles due to the mismatch between the actual on-screen position and the values in the keyframes.
Ah, I see! This hasn't been a problem for me because I simply avoid using Bezier points in these situations. When I know this is going to happen, I make sure to use only regular Moho points and everything is fine.

So, while it would be nice to have this capability, it isn't currently a big priority me either.

I'm curious though: I would have assumed a fix for this needed to occur within Moho's core Smart Bones technology. Can a drawing/point-editing tool really solve this? (Not that I know anything about how any of this actually works.) :D

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 3:45 pm
by KuzKuz
Thanks!
Greenlaw wrote: Mon Apr 03, 2023 3:31 pm I'm curious though: I would have assumed a fix for this needed to occur within Moho's core Smart Bones technology. Can a drawing/point-editing tool really solve this? (Not that I know anything about how any of this actually works.) :D
Yes, it would be great to have special API methods to facilitate the calculation of the impact of Smart Bones on points and Bezier curves. However, it is possible to do this with what is available, although it is much more complicated.

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 6:55 pm
by KuzKuz
It seems that version 3.0 is ready.

Please share your experience by this Friday, whether everything is working as it should.
If no issues are found, I will publish the final version of the script on mohoscripts. Thank you all for your help.

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 9:30 pm
by Greenlaw
Congratulations Eugene!

MR Curve Tool is an exciting new way to draw with Moho...thank you so much for creating and sharing it!

Re: MR Curve Tool 3.0 BETA

Posted: Mon Apr 03, 2023 9:37 pm
by KuzKuz
Thank you for your help and feedback. Without you, this tool would have been much more primitive.

Re: MR Curve Tool 3.0 RC1

Posted: Tue Apr 04, 2023 12:54 am
by Hoptoad
I've over-written this script a couple times after you updated it, and now I have 2 tool icons for "Curve Tool 3.0 Beta" in the tool window. I don't know how I did that.

One icon is the proper icon showing three points and a curve, and the other icon is the "X" with a question mark on it. I checked the Tool folder, and I only have one installation of "mr_curve_tool.lua".

Do you know how I can get rid of the "X" with a question mark icon? Both buttons work, but I only need one.

Re: MR Curve Tool 3.0 RC1

Posted: Tue Apr 04, 2023 1:23 am
by KuzKuz
Hoptoad wrote: Tue Apr 04, 2023 12:54 am I've over-written this script a couple times after you updated it, and now I have 2 tool icons for "Curve Tool 3.0 Beta" in the tool window. I don't know how I did that.

One icon is the proper icon showing three points and a curve, and the other icon is the "X" with a question mark on it. I checked the Tool folder, and I only have one installation of "mr_curve_tool.lua".

Do you know how I can get rid of the "X" with a question mark icon? Both buttons work, but I only need one.
Try using the search function and check if the mr_curve_tool.lua file is duplicated in the ContentFolder\Moho Pro\Scripts directory.
If possible, attach screenshots of the internal folders of this directory.

Re: MR Curve Tool 3.0 RC1

Posted: Tue Apr 04, 2023 1:26 am
by Greenlaw
I would double check that you don't have the script installed twice, maybe under slightly different names.

To check this...

1. go to File > Open Custom Content Folder.
2. open the Scripts > Tool folder.
3. look for the script in here and make sure there is only one copy.

If there is only one copy, maybe there is a second one in the Moho program folder? If so, you should remove that one. You probably know this already but it's not recommended to install custom scripts to the program folder.

If you still have a problem with this, look in the Tools folder again and open the file called _tools_list.txt. This is the settings file for how the tools are organized in the Tools window. Scroll down to the bottom and see if MR Curve is listed twice. If it is, delete one of the entries.

Now if that doesn't fix things, I'm stumped.

Hope this helps.