Creating a blank duplicate

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
justoshow
Posts: 59
Joined: Tue Dec 17, 2013 4:41 am
Location: Houston

Creating a blank duplicate

Post 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.
User avatar
SimplSam
Posts: 1179
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Creating a blank duplicate

Post 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
Moho 14.2 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
justoshow
Posts: 59
Joined: Tue Dec 17, 2013 4:41 am
Location: Houston

Re: Creating a blank duplicate

Post 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 :lol: . 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.
User avatar
justoshow
Posts: 59
Joined: Tue Dec 17, 2013 4:41 am
Location: Houston

Re: Creating a blank duplicate

Post by justoshow »

The custom script is exactly what I was looking for. Thank you very much!
User avatar
Greenlaw
Posts: 9900
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Creating a blank duplicate

Post 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.
Post Reply