Change the start anchor point on a closed shape

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
EricTheFish
Posts: 89
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Change the start anchor point on a closed shape

Post by EricTheFish »

For a closed shape, is it possible to change which anchor point is considered the first point?

For example, using stroke exposure on a closed shape always starts and ends at whichever anchor point is considered the start point. This is not always convenient and it would be great to be able to select any anchor point and select a "make first" option. Stroke exposure could then start/end from the chosen anchor.

The ability to break open and rejoin an anchor point on a closed shape often creates a new start point in other software.

Is there a method in MOHO that I've missed?

Currently, I'm inserting a new point close to where I want the start anchor, then deleting the short edge in beween to break open the shape, then dragging the end points together to auto-weld.

This does create a new start anchor but the shape integrity is not always preserved and needs repairing.

Any advice greatly welcomed!
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
Greenlaw
Posts: 9576
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Change the start anchor point on a closed shape

Post by Greenlaw »

The start point is always the first point created so, traditionally, you need to strategically re-work the path by deleting/adding segments to 'move' the first point. It's pretty silly and I always felt we should be able to re-sort the point order by simply selecting the new 'first' point. I requested something like this quite a while back but I don't think it's been worked on yet.

But this reminds me: I think there is a script that does the trick. I'm not sure where I saw it but if it does exist, I probably book marked it to try later. I'll update this thread if I find the link. (Or hopefully, somebody else will know what I'm talking about and post the link.)
Last edited by Greenlaw on Mon Oct 25, 2021 8:21 pm, edited 6 times in total.
User avatar
Greenlaw
Posts: 9576
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Change the start anchor point on a closed shape

Post by Greenlaw »

I think this is what I saw but I haven't tried it yet...

viewtopic.php?f=12&t=33552

If you get a chance to try it, let me know how it works for you.
User avatar
Greenlaw
Posts: 9576
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Change the start anchor point on a closed shape

Post by Greenlaw »

User avatar
EricTheFish
Posts: 89
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: Change the start anchor point on a closed shape

Post by EricTheFish »

Hi Greenlaw, I already have that script thanks. It enhances the stroke exposure tool by letting you place start and end points with a mouse click, but it doesn't let you change the start/end anchor.

I find it a little buggy when the stroke begins directly over the start anchor, it seems to get confused and not respond properly. Once you move the start with the regular tool, it works well.
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
Greenlaw
Posts: 9576
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Change the start anchor point on a closed shape

Post by Greenlaw »

Thanks for checking it out and replying! Yeah, I wasn't sure based on the description, just hopeful. :D
User avatar
Greenlaw
Posts: 9576
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Change the start anchor point on a closed shape

Post by Greenlaw »

Just curious but are you using this to create Smart Bone actions for eroding lines, like for around the shoulders or in the inside of the elbow? For this, I've taken to showing and hiding stacked shapes on the same path...it requires a bit of setup but works remarkably well.

At work, I'll usually set this up in a character manually, but Syntsin75 has an excellent script called Hide Animated Edges that simplifies the process. You can get it here...

http://lostmarble.com/forum/viewtopic.php?f=12&t=30678

Even if it's not what you're looking for, it's a script I can recommend highly.
User avatar
SimplSam
Posts: 1098
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Change the start anchor point on a closed shape

Post by SimplSam »

I have a quick (ish) hack of the standard Curve Exposure tool. The update allows you to Ctrl/Cmd-Click a Point and have that point set as the starting anchor point of the exposure curve.

How to use:

- Select the SS Curve Exposure tool
- Ctrl-Click on the desired start point

Image

If the new-start-point change works - then the point will be the only point selected. Click or Ctrl-Click that point again to select all connected points.

Notes:

For the new feature to work successfully.

The Shape Curve of the selected point must:
- be Stroked/Outlined
- be Closed
- have more than 2 points

The selected Point must not:
- already be the anchor point

If the new anchor point is not setable or already set as the start of the curve, then all connected points will be selected. This is similar to the selection behaviour of the standard tool, and also allows you to Ctrl double-Click a point to make it the Start exposure point and then permit the exposure function to work as normal.

Behind the scenes it works pretty much in the manner illustrated by @EricTheFish. i.e. Add a new point, Delete Edge, Weld points and Fix the Shape.

The tool can be downloaded from Moho Scripts: ss-moho-curve-exposure
Last edited by SimplSam on Tue Oct 26, 2021 3:33 am, edited 2 times in total.
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
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Change the start anchor point on a closed shape

Post by chucky »

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

Re: Change the start anchor point on a closed shape

Post by Greenlaw »

Whoa! That's very cool SimplSam. Will try it out today.
User avatar
neeters_guy
Posts: 1623
Joined: Mon Sep 14, 2009 7:33 pm
Contact:

Re: Change the start anchor point on a closed shape

Post by neeters_guy »

Actually, Greenlaw described a way to change the designated first point without a script: Changing the 'origin' point for Stroke Exposure
Ah! I figured out how to do this. First I deleted an edge to one side of the origin and then I re-connected the two open points by drawing a new edge, only I need to be sure to close the shape at the point where I want the new origin to be (in other words, start the line at the original origin and finish it where I want to move the origin.)
User avatar
SimplSam
Posts: 1098
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Change the start anchor point on a closed shape

Post by SimplSam »

neeters_guy wrote: Sun Oct 31, 2021 12:09 am Actually, Greenlaw described a way to change the designated first point without a script: Changing the 'origin' point for Stroke Exposure
Ah! I figured out how to do this. First I deleted an edge to one side of the origin and then I re-connected the two open points by drawing a new edge, only I need to be sure to close the shape at the point where I want the new origin to be (in other words, start the line at the original origin and finish it where I want to move the origin.)
HeHe didn't see that. It is slightly different, but similar to the process used by EricTheFish and this script.

What I did find when doing any method manually was often broken Shapes. i.e. lost fills, and an inability to re-enable fill after the Curve was fixed/reconnected. Or having to create a new Shape from the repaired Curve.

I actually think that the 'ctrl-click change anchor' should be a built-in feature of the standard tool. It should be very easy to implement (in application code) as all they need to do is re-order the points of the curve.
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
EricTheFish
Posts: 89
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: Change the start anchor point on a closed shape

Post by EricTheFish »

Wow Sam! Your script is awesome! It does EXACTLY what I envisaged.

I've just been making some circles and ellipses and reassigning the start anchor, the shapes are preserved perfectly. I've also made some ridiculous wavy blob shapes and it preserves all those shapes perfectly too!

This needs to become a standard feature of the stroke exposure tool!

Many, many thanks for spending time on this, it's greatly appreciated. Thanks for sharing this.
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
Greenlaw
Posts: 9576
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Change the start anchor point on a closed shape

Post by Greenlaw »

Just following up from my last post: I needed to use this tool today and it works great!

This tool really should come native with Moho. The added Ctrl-Click feature makes Stroke Exposure so much easier to set up.

Thanks again SimplSam!
Post Reply