bezier curve option

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

synthsin75 wrote: Fri May 07, 2021 1:54 am Quick fix. Updated original link: https://sites.google.com/site/synthsin/ ... ects=0&d=1
Awesome! Thank you so much Wes! Downloading and replacing now!

(I got a start last night in figuring this out myself. Eager to compare my mess with what you did, and see if I was even close. Either way, I'm sure to learn from this.) :)
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

Update: Button in both places stay in sync now, and not seeing the mixed up behavior. Thanks Wes! :D
User avatar
synthsin75
Posts: 9973
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: bezier curve option

Post by synthsin75 »

Greenlaw wrote: Fri May 07, 2021 2:59 pm (I got a start last night in figuring this out myself. Eager to compare my mess with what you did, and see if I was even close. Either way, I'm sure to learn from this.) :)
I just changed line 472, in UpdateWidgets (which is where UI elements get their initial values), from:
self.showHandleCheck:SetValue(self.showHandles)
To:
self.showHandleCheck:SetValue(LM_TransformPoints.showHandles)

That's the only thing that kept transform points from updating curvature.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

Thanks, Wes! Last night I was looking at that section, but also way overthinking how to tackle that. (Not unusual for me.) Thanks for explaining what you did. I obviously still have a lot to learn in this area. :)
User avatar
synthsin75
Posts: 9973
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: bezier curve option

Post by synthsin75 »

synthsin75 wrote: Thu Sep 21, 2017 8:15 pm Here's a quick mod to the curvature tool: https://drive.google.com/uc?export=down ... B4QUZH9TQ4

If you disable beziers on the transform points tool, they are also disabled for the curvature tool.
I've repaired this link.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

Shoot! I ran into this problem again today...but I think I have the old Curvature mod installed on this computer. Downloading and replacing now. Will let you know how it goes.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

No, I have the latest release installed.

Hmm...I'll take a closer look at this issue tonight and see if I can figure out the conditions.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

I finally got around to checking this and I figured out how to reproduce this error...

1. Install the Curvature mod and launch Moho
2. Create a shape and make sure Show Bezier Handles is enabled.
3. Save the file and quit Moho.
4. Launch Moho and reopen the file.

At this stage, the Bezier handles should be visible and you should be able to edit the handles normally. Here's how to make things go wrong...

5. Select the modified Curvature tool and uncheck Show Bezier Handles
6. Save the file and quit Moho
7. Launch Moho and reopen the file.
8. The Bezier handles are hidden as expected. Enable Show Bezier handles.

Now it's impossible to edit the Bezier handles. Even though the handles are visible, Moho behaves the way it does when the handles are hidden. Somehow Moho is getting confused about the visibility state of the Bezier handles.

To un-confuse Moho, do this following...

9. Click to the Curvature tool, disable then reenable Show Bezier Handles.
10. Save the file and quit Moho
11. Launch Moho and reopen the file.

The handles are visible as expected and you should be able to edit them as normal again.

I'm guessing that when Show Handles is disabled from the Curvature options, it's sending incomplete information about the current mode.

I kinda suck at scripting but this might be a good practice project for me to dabble with tonight. 😺
Last edited by Greenlaw on Fri May 27, 2022 12:14 am, edited 1 time in total.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

Quick update:

Right after step 8, while the Bezier handles are still visible, if I click on the Curvature tool and disable and reenable Show Bezier Handles, I'm able to edit the Bezier Handles normally again. No need to quit and relaunch.

I thought I tried this and failed but I'm wondering if earlier the handles where hidden before I started clicking the Curvature tool options.

TBD. I don't have time to test further right now but will check tonight.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

Ah, what the heck...decided it would only take a second to check this and, yeah, it definitely has to do with the order of operation.

This mod might have always done this and I probably never noticed because I avoided working in Bezier mode most of the time. Lately, I've been using Bezier mode more often though which is why I'm seeing this error now.

Will look into this more carefully tonight.
User avatar
synthsin75
Posts: 9973
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: bezier curve option

Post by synthsin75 »

I think this solves that problem: https://drive.google.com/uc?export=down ... B4QUZH9TQ4
When I made it work with the transform points tool setting, I didn't change one line to match.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

For the time being I'm going stick with using the Show Bezier Handles options in Transform Points and Add Points only, and leaving the one in Curvature alone.

The Curvature tool mod is still useful because it hides the handles even when I click the option in the two other tools to hide it. Without this mod, the handles are always visible with the Curvature tool, which was the annoying problem with the stock Curvature tool to begin with.

Anyway, it's after work, so taking another look at this now. :)
Last edited by Greenlaw on Fri May 27, 2022 2:21 am, edited 1 time in total.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

synthsin75 wrote: Fri May 27, 2022 2:03 am When I made it work with the transform points tool setting, I didn't change one line to match.
Thank you Wes!

I just saw your post and I'm curious to see if what I was thinking is even close to how you fixed this. (Probably not but I'll still learn from this.) :D
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: bezier curve option

Post by Greenlaw »

Yup! That was the magic it needed! Thanks again Wes.
Post Reply