Multi-select mod for SelectShape tool (Requires CP Product)

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

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Rudiger » Thu Dec 26, 2013 3:08 am

Glad to hear you like the tool. To be honest, I didn't know there was still any interest in it!

I see you already figured out what the gather button does, but for those playing at home, it brings all selected shapes together in the stacking order in the direction of the last shape that was selected. It's very useful if you create a bunch of new shapes that you then want to put next to an existing shape in the stacking order.

The reason the "l" key isn't working is that it must have been mapped to the Eyedropper tool since I wrote the script. The easiest thing to do is bring up the code for the modified lm_select_shape.lua file and find the following section of code:

Code: Select all

function LM_SelectShape:LoadPrefs(prefs)
	self.lassoMode = prefs:GetBool("LM_SelectShape.lassoMode", false)
	self.toggleSelectionKey = prefs:GetString("LM_SelectShape.toggleSelectionKey", 'l')
	self.copyShapeStylesKey = prefs:GetString("LM_SelectShape.copyShapeStylesKey", 'y')
	self.gatherShapesKey = prefs:GetString("LM_SelectShape.gatherShapesKey", 'z')
end
You can then change the key to something that doesn't conflict with an existing feature. Unfortunately, this won't be updated the tooltip, so you would need to change that line of code as well:

Code: Select all

	self.toggleSelectionButton = LM.GUI.ImageButton("ScriptResources/lm_select_shape/rt_toggle_selection_button", "Toggle selection between points and shapes (l)", false, self.TOGGLESELECTION)
User avatar
Greenlaw
Posts: 4680
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Thu Dec 26, 2013 3:30 am

I figured the 'l' key issue was something like that. I'm fairly new to ASP and I didn't think to look in the script for this. Thanks for the tip. And extra big thanks for making this script. I've only been using it for a couple of hours and it's already increasing my productivity. :D

G.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

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

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Thu Dec 26, 2013 3:38 am

That did the trick! Switched it to '/' and it works fine now.

G.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

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

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Thu Dec 26, 2013 6:52 am

Here's the revised 1.2 for Anime Studio 9.5 compatibility.

Revision for ASP 9.5

I hope it's okay to post this here--I'm uploading this file for the convenience of other 9.5 users who might want to use this incredibly useful script. This file contains the same 1.2 script files from the first page but with the 9.0/9.5 compatibility tweaks suggested by Onionskin and Rudiger applied, as described in the recent thread posts. (The enclosed Read Me file has the details.)

As before, if you have not purchased and installed Rudiger's library from his Content Paradise page, you will need to do so before you can run this script. You can purchase the library file from here:

http://www.contentparadise.com/productd ... x?id=17746

G.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
User avatar
neeters_guy
Posts: 1570
Joined: Mon Sep 14, 2009 7:33 pm
Contact:

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by neeters_guy » Thu Dec 26, 2013 9:05 pm

Thanks for posting this. Really appreciate when folks post problems AND the eventual solutions.
User avatar
Greenlaw
Posts: 4680
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Sun Dec 29, 2013 2:49 am

Wow, I just now realized the usefulness of Copy Styles From Bottom. These tools keep getting better for me the more I use them. :)
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
Draw_Girl
Posts: 65
Joined: Sun Sep 17, 2006 6:36 am

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Draw_Girl » Fri Feb 21, 2014 12:00 am

Greenlaw wrote:Here's the revised 1.2 for Anime Studio 9.5 compatibility.

Revision for ASP 9.5

I hope it's okay to post this here--I'm uploading this file for the convenience of other 9.5 users who might want to use this incredibly useful script. This file contains the same 1.2 script files from the first page but with the 9.0/9.5 compatibility tweaks suggested by Onionskin and Rudiger applied, as described in the recent thread posts. (The enclosed Read Me file has the details.)

As before, if you have not purchased and installed Rudiger's library from his Content Paradise page, you will need to do so before you can run this script. You can purchase the library file from here:

http://www.contentparadise.com/productd ... x?id=17746

G.
Ok,I got the download from CP and download your revised version. :D

Image

So I guess I installed everything right...so far....now I is the a video on this on what does what? I'm a visual learner ....reading text only doesn't do it for me,... is there a video on how to use this....help anyone, I really need your help, thanks!
:(
User avatar
Greenlaw
Posts: 4680
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Fri Feb 21, 2014 12:18 am

The Multi-select mod for SelectShape is absolutely fantastic! IMO, this is an essential add-on.

In brief, the first button lets you switch your selection between Points mode and Shape mode, and it works even if you have many shapes selected. The second icon allows you to apply a style to every currently selected shape--when you apply a style, it gets applied to the bottom most shape--now click this button and the style will be transferred to all the other selected shapes. The third button will sort the shapes in a contiguous order. This is useful when, for example, you're drawing a head but parts of the head have other body shapes sorted in between--this button makes it easier to sort them in the desired stacking order.

And don't forget the Shape Num box--this lets you move your selection (single or multiple shapes) up or down in stacking order. For example, if you have arm shapes in front of the torso shapes and it needs to be behind the torso, you can select the parts of the arm, 'group' the selection using the third button, and then click and drag inside the Shape Num box to 'move' the selection behind the torso shapes. (Of course you can manually enter a number but I like the interactive mode better.)

Naturally, this tool works best when you define point groups as you create your elements.

I'll post a walk through video soon. At the moment, we're putting finishing touches on our short film 'Scareplane', and I can honestly say this script may have saved me from MANY hours of tedious clicking and selecting during this production. :)

G.
Last edited by Greenlaw on Fri Feb 21, 2014 1:14 am, edited 2 times in total.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
Draw_Girl
Posts: 65
Joined: Sun Sep 17, 2006 6:36 am

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Draw_Girl » Fri Feb 21, 2014 12:43 am

Thank you,Thank you,Thank you! I can't wait to see the video. It will help me out greatly! :D
User avatar
Onionskin
Posts: 225
Joined: Wed Mar 04, 2009 2:01 pm

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Onionskin » Wed Jun 11, 2014 1:46 pm

Inspired by Selgin's Nudge Keys Toolset fix I managed to fix the lasso/rectangular selection in Rudiger's SelectShape tool for V10 thanks to Synthsin's instructions.

Multi-select mod for SelectShape tool for V10
(right click, save link as)



In rt_shape_utils.lua find this line

Code: Select all

table.getn(prevSelIDs)
and change to

Code: Select all

#prevSelIDs
Thank you Selgin and many, many thanks to Synthsin! :D
User avatar
synthsin75
Posts: 7254
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by synthsin75 » Thu Jun 12, 2014 2:20 am

I just wish I had the time to actually work on scripting myself. I'm glad what little I can do helps.
User avatar
Greenlaw
Posts: 4680
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Fri Sep 12, 2014 7:31 pm

Hi,

I held off installing the multi-select mod in ASP 10 until I felt fully comfortable about working in the upgrade but I finally got around to installing the script this morning. Unfortunately I keep getting errors. I have the required extended library installed and the multi-select script for ASP 10 from a few posts above but when I select a shape, the lua console pops open and starts listing errors.

Are other users able to get this script working in 10.1? This tool was so useful to me in 9.5, I would really like to be able to use it in 10.1.

Thanks in advance for any info.

G.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

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

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by synthsin75 » Sat Sep 13, 2014 12:44 am

AS10.1 supports selecting and editing multiple shapes natively, including shape order.
User avatar
Greenlaw
Posts: 4680
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Sat Sep 13, 2014 12:58 am

synthsin75 wrote:AS10.1 supports selecting and editing multiple shapes natively, including shape order.
Does it allow you to arbitrarily shift selected shapes to any position in the stacking order in a layer? If so, I must have missed that in the docs. Is it a key command? If it's something as simple as (modifier key)-Up or -Down, I can really use right now.

Some stuff I'm almost certain 10.1 doesn't do that this script did in 9.5:

1. I liked being able to bring together multiple selected shapes with a single mouse click. This made it easier to manage and organize complex layers that contained many dozens of shapes. I don't think 10.1 does that but I could be wrong.

2. How about applying the style of the bottom shape to all selected shapes? That was a cool feature.

3. One other thing I really appreciated about the script was the numerical display that showed you the stacking order number of a selected shape. The UI allowed you to drag that position number up and down much more conveniently than the limited menu commands in 9.5 (which as far as I can tell hasn't changed in 10.1.)

Thanks in advance for any info. (Off to search the manual now for any new shapes stacking commands I might have missed.) :)

G.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

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

Re: Multi-select mod for SelectShape tool (Requires CP Produ

Post by Greenlaw » Sat Sep 13, 2014 1:43 am

Just took another look at the section on the shape stacking order commands in the manual. It only mentions the same four basic commands we had in 9.5 (Raise, Lower, Raise to Front, Raise to Back.) That's okay for simple layers but it's really quite tedious to use in comparison to how this mod worked in 9.5.

Is there a benevolent code master out there who will take pity on a 'scripting-challenged' artist and fix it. Thanks in advance for any help. :)

G.
Last edited by Greenlaw on Sat Sep 13, 2014 1:56 am, edited 1 time in total.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
Post Reply