Page 2 of 5

Re: *NEW* Switch Icons

Posted: Mon May 24, 2021 4:19 am
by Wesleysales3d
OMG, it was released!
Thank you so much for making this great resource available to Moho, the community thanks you!

Re: *NEW* Switch Icons

Posted: Mon May 24, 2021 8:32 am
by Lukas
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.
Happy to contribute to a tool like this!

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
and removing the directory:

Code: Select all

os.execute("rmdir ".."\""..Syn_SwitchIcons.docFolder.."\"")	--OSX
needs to be something like:

Code: Select all

			local removeDir = string.gsub(Syn_SwitchIcons.docFolder, " ", "\\ ")
			os.execute("rm -r "..removeDir) --OSX
			print ("rm -r "..removeDir)
🤓

Re: *NEW* Switch Icons

Posted: Mon May 24, 2021 12:38 pm
by gilcartunista
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

Re: *NEW* Switch Icons

Posted: Mon May 24, 2021 5:28 pm
by synthsin75
Lukas wrote: Mon May 24, 2021 8:32 am Happy to contribute to a tool like this!

There's some small macOS stuff still:
Thanks again, Lukas.
I've updated the original link: https://www.dropbox.com/s/2wq24rt3vvr3j ... s.zip?dl=0

Re: *NEW* Switch Icons

Posted: Mon May 24, 2021 5:33 pm
by synthsin75
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
As far as I know, this should work in AS11.

Re: *NEW* Switch Icons

Posted: Tue May 25, 2021 4:57 am
by synthsin75
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.

Re: *NEW* Switch Icons

Posted: Tue May 25, 2021 6:05 am
by SimplSam
synthsin75 wrote: Mon May 24, 2021 5:33 pm As far as I know, this should work in AS11.
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.

Re: *NEW* Switch Icons

Posted: Tue May 25, 2021 6:54 am
by synthsin75
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.

Re: *NEW* Switch Icons

Posted: Tue May 25, 2021 9:42 am
by hayasidist
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!

Re: *NEW* Switch Icons

Posted: Tue May 25, 2021 1:55 pm
by gilcartunista
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.
Image
https://imgbox.com/8HHlbVal

Re: *NEW* Switch Icons

Posted: Tue May 25, 2021 5:35 pm
by synthsin75
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.
Image
https://imgbox.com/8HHlbVal
Oops, missed that one. It's fixed now.

Re: *NEW* Switch Icons

Posted: Wed May 26, 2021 2:44 pm
by gilcartunista
Wes! you are great !!! It's working PERFECTLY !!! This is a tool that puts MOHO above the rest! Congratulations!
Grateful!!!

Re: *NEW* Switch Icons

Posted: Wed May 26, 2021 3:10 pm
by Víctor Paredes
This is very useful, clever and impressive script.
Thank you, Wes and everyone involved!

Re: *NEW* Switch Icons

Posted: Wed May 26, 2021 7:04 pm
by A.Evseeva
For me it worked only once after selecting the tool and then fired an error.
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()

Re: *NEW* Switch Icons

Posted: Wed May 26, 2021 8:49 pm
by synthsin75
Thanks, Alexandra.

Not seeing that problem here, but added your edit.