Page 1 of 1

Looking for a stroke script

Posted: Tue May 22, 2018 8:47 pm
by troypicou
Just wondering if anyone knows of a script that allows you to adjust the strokes position. As it stands the stoke rides the middle of the line. I would like to have the option to have the stroke on the inside or the outside as well, like in illustrator.
Thanks for any assistance
Troy

Re: Looking for a stroke script

Posted: Tue May 22, 2018 10:27 pm
by synthsin75
Sorry, but that can't be changed by script.

Depending on what you need to do, you could mask a stroke to only show on one side of the curve or the other. But that's not likely to be very flexible.

Re: Looking for a stroke script

Posted: Tue May 22, 2018 10:37 pm
by troypicou
Thanks for the info, maybe in a future release.

Re: Looking for a stroke script

Posted: Tue May 22, 2018 10:58 pm
by Greenlaw
Just a few thoughts:

I wonder if you can fake it using a Brush pattern that is only 'half stroked'. Try making two brushes, one for inside and one for outside strokes. I think the brush would look like a half circle? Sorry, I haven't actually made a brush myself yet, so not completely sure about this.

Another approach is to paste an unstroked shape on top of a stroked shape. That will 'stamp out' the inside portion of the stroke. I imagine if you use the unstroked shape as a mask, it should trim the outside part of the stroked shape.

I know these are all just workarounds but should work if you're in a pinch.

Maybe they'll add it in a future release if you submit a request.

Re: Looking for a stroke script

Posted: Tue May 22, 2018 11:26 pm
by Greenlaw
I tried the two shape tricks and they work fine.

Sorry, TinyPic seems to be down so can't upload the test pics.

Re: Looking for a stroke script

Posted: Tue May 22, 2018 11:26 pm
by troypicou
Thanks for the suggestions!

Re: Looking for a stroke script

Posted: Tue May 22, 2018 11:43 pm
by Greenlaw
I just tried making a half stroke brush. Yes, a 'half-circle' shape in vertical orientation works for this. To make it work, enable Align Brush With Curve, zero out Jitter and Angle, and set a lower Spacing distance to minimize 'bumps' (12 seems to work well in my test example.)

Maybe a Pill shape would work better? TBD. Also, try a half square shape.

Re: Looking for a stroke script

Posted: Wed May 23, 2018 1:02 am
by synthsin75
Great trick, Dennis!

A rectangle brush works fantastic. And you only need one with a rectangle on either the right or left side. Then depending on the direction you draw the shape will determine if the stroke is interior or exterior. Here's the test brush I created:

Image

Re: Looking for a stroke script

Posted: Wed May 23, 2018 1:17 am
by troypicou
Thanks

Re: Looking for a stroke script

Posted: Wed May 23, 2018 1:29 am
by Greenlaw
Thanks for carrying that out, Wes! Glad to hear it works. :)

Re: Looking for a stroke script

Posted: Wed May 23, 2018 2:20 am
by synthsin75
The one wrinkle is that scaling it past zero or flipping will invert the stroke. Good if you didn't draw it the way you wanted it, but bad if your animation needs to do either of those.

Re: Looking for a stroke script

Posted: Wed May 23, 2018 2:30 am
by troypicou
That’s the issue I have run into Wes using this technique. Is there a way to freeze a stroke? When using them as textures and animating the stroke expansion shows. Just wondering I have been experimenting with using stokes as shadows and just looking for options. Thanks to the both of you for your input.

Re: Looking for a stroke script

Posted: Wed May 23, 2018 9:40 am
by hayasidist
Greenlaw wrote:Maybe they'll add it in a future release...
this request has been around for a while in various forms - mantis 30122 -- maybe worth adding another voice and a pointer to this thread there?

Re: Looking for a stroke script

Posted: Wed May 23, 2018 4:03 pm
by Greenlaw
Now that Tinypic is back up, here are the other techniques illustrated.

Image

For the mask technique, you'll probably want to make the mask layer a reference.

Re: Looking for a stroke script

Posted: Wed May 23, 2018 4:06 pm
by Greenlaw
Oh, another technique for 'outside' is to enable Outline in the Layer Property. If your shape has no stroke, this will create an outside stroke effect.

Image

This only works at render time though.

I swear, there's like a zillion ways to do stuff in Moho...and thank goodness for that. But it would still be nice to be able to just click between options for Stroke Center, Inside and Outside though. :)