Hide and Unhide edges in Smart Actions

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
My 0wn Style
Posts: 19
Joined: Wed Jan 05, 2022 3:38 am

Hide and Unhide edges in Smart Actions

Post by My 0wn Style »

So, I have a humanoid character drawn and on the default front facing view, I have some edges hidden to make the character blend in better. Have a smart bone setup to rotate the character left to right. Is it possible to have edges become unhidden and to hide certain edges throughout the smart bone action? Or would I need to create separate objects with the different edges hidden/unhidden and switch to them at certain smart bone points?
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Hide and Unhide edges in Smart Actions

Post by synthsin75 »

Either this script: viewtopic.php?t=30678

Or you can make separate shapes that you can make opaque when needed.
Daxel
Posts: 1088
Joined: Wed Mar 27, 2019 8:34 pm

Re: Hide and Unhide edges in Smart Actions

Post by Daxel »

Oh that script is nice. You can also animate line width. And I think those are all your options.
User avatar
slowtiger
Posts: 6257
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Hide and Unhide edges in Smart Actions

Post by slowtiger »

I used animated line width with very nice results.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini M2 Pro OS 13.7.6
My 0wn Style
Posts: 19
Joined: Wed Jan 05, 2022 3:38 am

Re: Hide and Unhide edges in Smart Actions

Post by My 0wn Style »

I've downloaded that script and installed it, but how do I use it?

Also, I'm curious about this animated line width thing. Where can I find information about that?
User avatar
slowtiger
Posts: 6257
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Hide and Unhide edges in Smart Actions

Post by slowtiger »

There's a line width tool. Select all points for changing all, select single points for only changing those. For animating the line width you need to select each point separately. Keyframes will show up in timeline.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini M2 Pro OS 13.7.6
User avatar
Greenlaw
Posts: 10464
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Hide and Unhide edges in Smart Actions

Post by Greenlaw »

+1 for Wes' script! It simplifies being able to keyframe edge segments. Using it is really easy:

1. Select the tool and click an edge. Moho will create a Switch Layer with the same name as the drawing's layer.

Note #1: Don't touch this layer because it will be used to hold the keyframes for the tool. Note #2: If you change the drawing layer's name, you will need to change the Switch layer's name to match.

2. To hide an edge segment, just use it like the regular Hide Edge tool. This difference is that the visibility state for the segment will be keyframed in the Switch Layer.

Note #3: You can use this in a Smart Bone Action to automate an 'erasure' effect on either end or direction of a line. This is useful, for example, to animate the line gap where the shoulder connects to the body.

Highly recommended! (I'm still hopeful that Hide Edge will become natively keyframeable in a future Moho release.)

If you need help installing the script, it's easy.

1. Unpack the zip. You'll find two folders: Tool and Script Resource.

2. Open your Custom Content Folder from File > Open Custom Content Folder. (If this is disabled, it means you haven't set your Custom Content Folder yet. You can do this in Preferences.)

3. Open the folder called Scripts.

4. Drag the two folders to this folder.

5. Relaunch Moho. You'll find a new Hide Edge tool has been added in the bottom section of the Tools window.

If you're creating assets in a production where not all artists have the script, you can still rig this sort of control manually. As Wes mentioned, you need to create individual stroke shapes for the line you want to 'erase'. To do this, first create a shape without the stroke, then create the smaller line segments using Stroke only. Once you have the separate line segment shapes created, you can animate their visibility using a Smart Bone Action. I use this method all the time at my workplace.

Hope this helps.
My 0wn Style
Posts: 19
Joined: Wed Jan 05, 2022 3:38 am

Re: Hide and Unhide edges in Smart Actions

Post by My 0wn Style »

Greenlaw wrote: Wed Oct 19, 2022 6:19 pm +1 for Wes' script! It simplifies being able to keyframe edge segments. Using it is really easy:

1. Select the tool and click an edge. Moho will create a Switch Layer with the same name as the drawing's layer.

Note #1: Don't touch this layer because it will be used to hold the keyframes for the tool. Note #2: If you change the drawing layer's name, you will need to change the Switch layer's name to match.

2. To hide an edge segment, just use it like the regular Hide Edge tool. This difference is that the visibility state for the segment will be keyframed in the Switch Layer.

Note #3: You can use this in a Smart Bone Action to automate an 'erasure' effect on either end or direction of a line. This is useful, for example, to animate the line gap where the shoulder connects to the body.

Highly recommended! (I'm still hopeful that Hide Edge will become natively keyframeable in a future Moho release.)

If you need help installing the script, it's easy.

1. Unpack the zip. You'll find two folders: Tool and Script Resource.

2. Open your Custom Content Folder from File > Open Custom Content Folder. (If this is disabled, it means you haven't set your Custom Content Folder yet. You can do this in Preferences.)

3. Open the folder called Scripts.

4. Drag the two folders to this folder.

5. Relaunch Moho. You'll find a new Hide Edge tool has been added in the bottom section of the Tools window.

If you're creating assets in a production where not all artists have the script, you can still rig this sort of control manually. As Wes mentioned, you need to create individual stroke shapes for the line you want to 'erase'. To do this, first create a shape without the stroke, then create the smaller line segments using Stroke only. Once you have the separate line segment shapes created, you can animate their visibility using a Smart Bone Action. I use this method all the time at my workplace.

Hope this helps.
I had trouble finding it, but it turns out that after relaunching Moho 13.5, I had to basically make the Tools window go away (Window > Tools) and then make the Tools window come back (Windows > Tools). Now I see it. I'll play around with this and see what happens. Thanks everyone
User avatar
Greenlaw
Posts: 10464
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Hide and Unhide edges in Smart Actions

Post by Greenlaw »

Instead of relaunching Moho you can also try Ctrl+Shift+Alt+L. This is the shortcut to reload Moho's native and custom scripts. It's handy when you don't want to quit and relaunch.
Post Reply