DV SELECT PARENT BONE LAYER V 1.8

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by synthsin75 »

Daxel wrote: Thu Dec 16, 2021 11:44 pm I'm a programmer now 8)
That's where it starts. Follow the white rabbit. :wink:
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by Greenlaw »

Hi Davoodice2!

I wondered if your script could be modified to work with Switch layers by simply replacing every instance of 'bone' with 'switch,' and yes, this works perfectly!

I needed something like this because using Alt+Shift-Click to select a Switch layer's artwork doesn't select the Switch layer when the artwork is contained inside a sub-group layer; instead, this combo selects the sub-group layer. But if I Alt-click the art and then click your button, it jumps directly to the Switch. This will be very useful to me for quickly selecting and loading the Switch layer into the Switch Selection window.

BTW, my preference is for the stack to remain uncollapsed, so this is fine for me. IMO, the less screen clutter I have to look at while animating, the better.

One question: in the first post for the original Select Parent Bone Layer version, you mentioned assigning the tool to a keyboard shortcut. How does one do that? I would like to do this for the Switch Layer mod.
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by synthsin75 »

It's a button script. So assigning a tool shortcut just activates it.
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by Greenlaw »

Derp. :P

All this time, I thought the Keyboard Shortcuts window accessed only native Menu commands. I never noticed it also lists button tools, including third-party tools.

Assigned Select Switch Layer to v because it's available and it's close to the Alt key (to select the art layer.) Works perfectly!

Thanks, Wes!

Also, thanks to Davoodice2 for creating the original Select Bone Layer tool, and thanks to Daxel for directing me over here to check it out.
Last edited by Greenlaw on Wed Aug 09, 2023 3:57 pm, edited 1 time in total.
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by Greenlaw »

@Davoodice2, would it be okay if I post the mod here? You're still credited as the script creator because all I did was swap 'bone' for 'switch' in the script. I can include a new button icon.
User avatar
lucasfranca
Posts: 128
Joined: Sat Oct 07, 2017 11:47 pm

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by lucasfranca »

I would like this add on!
An old guy [since 1983] who was raised in front of the TV.
Passionate about animation, after getting old, he decides to make it his hobby.

I share tutorials, reviews, tips and tricks from this vast world of animation on my channel.

https://youtube.com/animai2D
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by Greenlaw »

lucasfranca wrote: Wed Aug 09, 2023 2:11 pm I would like this add on!
If you need this now, it's easy to update the existing script...

1. Make a copy of the DV_select_Bone_layer.lua script and rename it to DV_select_Switch_layer.lua
2. Open the file in a text editor and use Search & Replace to individually replace 'bone' with 'switch'. Take care to respect the existing letter casing. (i.e., 'bone' becomes 'switch' and 'BONE' becomes 'SWITCH'.)
3. Download and add this button icon: DV Select Switch Layer button icon
4. Add a keyboard shortcut for it. I recommend the v key.

To use it: Alt-click on the visible Switch layer artwork in the workspace (i.e., character's mouth, for example.) Then click the button or press v (or whichever shortcut you assigned to it.) The tool selects the Switch layer, and the Switch layer loads into the Switch Selection Window for animation, even when the art is inside its own sub-group.

Hope this helps.
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by davoodice2 »

Hey friend. Of course, please do that. I am busy these days by 3D works.
Thank you great Ideas.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: DV SELECT PARENT BONE LAYER V 1.8

Post by Greenlaw »

Hi Davoodice2,

Great! I'll post the revised files then.

Thanks for the permission and for all your work!
Post Reply