*NEW* Switch Icons (updated 12/13/21)
Moderators: Víctor Paredes, Belgarath, slowtiger
-
- Posts: 8
- Joined: Wed May 05, 2021 3:18 am
- Location: Brazil
- Contact:
Re: *NEW* Switch Icons
OMG, it was released!
Thank you so much for making this great resource available to Moho, the community thanks you!
Thank you so much for making this great resource available to Moho, the community thanks you!
Re: *NEW* Switch Icons
Happy to contribute to a tool like this!synthsin75 wrote: ↑Sun May 23, 2021 7:16 pm Just updated with fixes for Mac, update button icon, and colorized icon option, all provided by Lukas (thanks again), as well as a minor bug fix.
If you use the colorized icon, you'll need to change line 14, as noted in the script.
Lukas, I think I followed the correct Mac conventions to account for the document being saved to a different name after generating thumbnails, line 509-522. Please let me know if you find that doesn't work.
There's some small macOS stuff still:
string.sub needs to be string.gsub and renaming the folder should use the move (mv) command:
Code: Select all
if (opSys ~= "win") then
old = string.gsub(old, " ", "\\ ")
new = string.gsub(new, " ", "\\ ")
-- os.execute("mkdir "..new) -- don't create the directory, otherwise it will put the old directory inside the new directory
os.execute("mv "..old.." "..new)
else
os.rename(old, new) --rename thumbnail folder
end
Code: Select all
os.execute("rmdir ".."\""..Syn_SwitchIcons.docFolder.."\"") --OSX
Code: Select all
local removeDir = string.gsub(Syn_SwitchIcons.docFolder, " ", "\\ ")
os.execute("rm -r "..removeDir) --OSX
print ("rm -r "..removeDir)
- gilcartunista
- Posts: 55
- Joined: Mon Mar 14, 2016 7:13 pm
- Location: https://www.facebook.com/gil.cartunista
- Contact:
Re: *NEW* Switch Icons
Estou tão contente que esta ferramenta foi lançada! mas no momento não tenho dinheiro para comprar moho13, tem alguma possibilidade de eu usar em minha versão 11 , pois esta eu comprei e tenho número serial. Grato
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Switch Icons
Thanks again, Lukas.
I've updated the original link: https://www.dropbox.com/s/2wq24rt3vvr3j ... s.zip?dl=0
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Switch Icons
As far as I know, this should work in AS11.gilcartunista wrote: ↑Mon May 24, 2021 12:38 pm Estou tão contente que esta ferramenta foi lançada! mas no momento não tenho dinheiro para comprar moho13, tem alguma possibilidade de eu usar em minha versão 11 , pois esta eu comprei e tenho número serial. Grato
Translation:
I am so glad that this fermentation has been launched! But there is no time I have no money to buy moho13, have some possibility of using it in version 11, but this is the EU and I have a serial number. Welcome
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Switch Icons
Just updated to disable moving the thumbnail files if you rename the document. I don't think, off hand, that there's any way for Moho to tell the difference between a renamed file and switching tabs to another opened document, so this tool was consolidating thumbnails for both documents to the current one.
So you will want to save the file before generating your thumbnails.
So you will want to save the file before generating your thumbnails.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: *NEW* Switch Icons
Did a quick test and it trips up on a couple of Moho 12+ only features:
- LM.GUI.PopupDialog: uses of SetToolTip is not supported
- LM.GUI.ImageButton: uses the recolor parameter, which is not supported
Also...
- LM.GUI.CheckBox("Timeline visibility", self.TVIS): self.TVIS / Syn_SwitchIconsSettingsDialog.TVIS is not defined (nil), which AS11 errors on but later Moho's seem to ignore/accommodate.
Also...
There is something odd going on with layer:SecondarySelection() not working with a single layer selected, which I suspect is a AS11 limitation. Resulting in the Update button not working for single layer selections, but alt-click working.
Moho 14.3 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.3 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
Moho 14.3 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Switch Icons
Thanks, Sam.
The "Timeline visibility" was never implemented, and no longer exists as of a version or two ago.
I just uploaded a new version that *should* handle all those AS11 issues.
The "Timeline visibility" was never implemented, and no longer exists as of a version or two ago.
I just uploaded a new version that *should* handle all those AS11 issues.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- hayasidist
- Posts: 3835
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: *NEW* Switch Icons
Just dropped in to this conversation to say thanks for the script - I've got a few big (non-Moho) deadlines coming in the next couple of weeks, so I'm hoping to put this to good use soon after that!
- gilcartunista
- Posts: 55
- Joined: Mon Mar 14, 2016 7:13 pm
- Location: https://www.facebook.com/gil.cartunista
- Contact:
Re: *NEW* Switch Icons
I am so glad that this tool has been launched! I downloaded your last update but it still doesn't work on my version 11, I'm sending the image of the error. Grateful.

https://imgbox.com/8HHlbVal

https://imgbox.com/8HHlbVal
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Switch Icons
Oops, missed that one. It's fixed now.gilcartunista wrote: ↑Tue May 25, 2021 1:55 pm I am so glad that this tool has been launched! I downloaded your last update but it still doesn't work on my version 11, I'm sending the image of the error. Grateful.
https://imgbox.com/8HHlbVal
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- gilcartunista
- Posts: 55
- Joined: Mon Mar 14, 2016 7:13 pm
- Location: https://www.facebook.com/gil.cartunista
- Contact:
Re: *NEW* Switch Icons
Wes! you are great !!! It's working PERFECTLY !!! This is a tool that puts MOHO above the rest! Congratulations!
Grateful!!!
Grateful!!!
- Víctor Paredes
- Site Admin
- Posts: 5814
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: *NEW* Switch Icons
This is very useful, clever and impressive script.
Thank you, Wes and everyone involved!
Thank you, Wes and everyone involved!






Moho co-owner
Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
Re: *NEW* Switch Icons
For me it worked only once after selecting the tool and then fired an error.
Some changes near line 220 fixed this:
Some changes near line 220 fixed this:
Code: Select all
--print(val)
--start edit
local switchChannel = self.switch:Layer(ID):AncestorSwitchLayer():SwitchValues()
switchChannel.value:Set(val)
switchChannel:StoreValue()
--end edit
self.moho:UpdateUI()
MOHO.Redraw()
- synthsin75
- Posts: 10260
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: *NEW* Switch Icons
Thanks, Alexandra.
Not seeing that problem here, but added your edit.
Not seeing that problem here, but added your edit.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/