Page 1 of 1
Creating a blank duplicate
Posted: Sat Dec 31, 2022 4:45 pm
by justoshow
Do anyone know of a script or way to duplicate a parent folder and goes through and clear all of the vector points?
I like to make blank folder structures for templating characters.
Normally I'll just manually go through each layer and delete the points my self.
Re: Creating a blank duplicate
Posted: Sat Dec 31, 2022 9:06 pm
by SimplSam
Moho already includes a script to
Erase All Vectors - which works on either a single vector layer or a group with vector children.
Scripts > Draw > Erase All Vectors In Group
I have included a version below which allows you to erase multiple selected layers and/or all vector children/grandchildren/greatgrandchildren/... of a selected group - so you can select just the topmost group/s if all desired elements are contained in sub structures inside.
You can save the script 'lm_eraseall+.lua' to your Custom Scripts folder in the scripts\menu\Draw\ subfolder ... and it will appear as
Scripts > Draw > Erase All Vectors In Group+ - after you restart Moho. Note: if you want to replace/remove the existing script command 'Erase All Vectors In Group' - then rename the file to: lm_eraseall.lua
https://drive.google.com/file/d/1A7SJ4E ... sp=sharing
Re: Creating a blank duplicate
Posted: Sat Dec 31, 2022 11:41 pm
by justoshow
SimplSam wrote: ↑Sat Dec 31, 2022 9:06 pm
Moho already includes a script to
Erase All Vectors - which works on either a single vector layer or a group with vector children.
Scripts > Draw > Erase All Vectors In Group
I have included a version below which allows you to erase multiple selected layers and/or all vector children/grandchildren/greatgrandchildren/... of a selected group - so you can select just the topmost group/s if all desired elements are contained in sub structures inside.
You can save the script 'lm_eraseall+.lua' to your Custom Scripts folder in the scripts\menu\Draw\ subfolder ... and it will appear as
Scripts > Draw > Erase All Vectors In Group+ - after you restart Moho. Note: if you want to replace/remove the existing script command 'Erase All Vectors In Group' - then rename the file to: lm_eraseall.lua
https://drive.google.com/file/d/1A7SJ4E ... sp=sharing
Wow. Thanks! I don't know how I missed that when I was looking through the scripts menu. I was half way through writing the script my self

. I'll give that custom script a try to see if it does what I need it to do as the default script only clears the child vector layers and not the sub folders.
Re: Creating a blank duplicate
Posted: Sat Dec 31, 2022 11:45 pm
by justoshow
The custom script is exactly what I was looking for. Thank you very much!
Re: Creating a blank duplicate
Posted: Sun Jan 01, 2023 5:44 pm
by Greenlaw
Awesome SimplSam! I didn't even know about the original script before I read your post.
Thanks for the info and for also creating/posting your mod! Will check it out this afternoon.