New and Improved Style Window

Discuss ideas for new features with other users. To submit feature requests to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Hoptoad
Posts: 618
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

New and Improved Style Window

Post by Hoptoad »

Maybe it's just me. . .but I have always experienced user-related problems when using color styles.
Don't get me wrong; I like styles and use them often, but these two things happen to me a lot:

1) I make a new shape and I expect it to have one style associated with it, but instead it has two styles associated with it. I never use two styles on one shape, only one.

For whatever reason, Moho is always thinking, "Hey, I bet he wants to use two styles on this shape! Here ya go, champ! Enjoy the extra style!" And then I have to delete the extra style. I've done this, I don't know, a million times?
I don't have a specific suggestion on how to "fix" this.

2) And sometime I create a bunch of shapes and I don't want a style applied to any of them, and then I realize, "Oh no, they all have a style," and I have to change them all to "none."
I don't have a specific suggestion on how to "fix" this, either.

But it would speed-up my animation workflow if the Style Window was easier to manage.

Here are five more suggestions:

3) I am always opening and closing the Styles Window, and that requires me to check and uncheck my preference in a menu. Could that process be made faster? Like, what if the Style window could be compressed to one thin bar with a button on it, and if you click the button, the window expands to full-size again. Naturally, I uncheck the "Advanced" option when I need more space for my Layers, but sometimes I need a LOT more space.

4) An option to turn off or collapse the palette would be nice, too.

5) The word "Advanced" in the Style window has always seemed weird to me. Could that be replaced with a different word, perhaps "more"? Or a toggle-type button that reads "more/less"?

6) You know how you can click the "Styles" button and see a list of perhaps a few dozen styles that are being used? Sometimes I look at a list and wonder, "What on earth did I make Dark Gray 5?" What if...I clicked on the name of the style in that list, and the vector shape colored in that style (in the workspace) would become prominent somehow, so I would know what I had colored with that style?

7) I want to be able to rearrange the names of the styles in the list, so I can make it organized. That would speed-up my animation workflow a little bit. Reading through a long list of disorganized style names takes time.

Thanks.
User avatar
synthsin75
Posts: 9973
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: New and Improved Style Window

Post by synthsin75 »

1. If you have a style selected for editign when you create a new shape, that shape gets that style...on top of any other style you have set to apply to new shapes.
2. You can select multiple shapes and add/remove styles all at once.
3. Change the style window docking shortcut to suit you. Then a simple shortcut shows/hides the window.
4. The swatches palette can be set to "None."
User avatar
Hoptoad
Posts: 618
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: New and Improved Style Window

Post by Hoptoad »

GASP!

Thank you. That was immediately helpful.
User avatar
synthsin75
Posts: 9973
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: New and Improved Style Window

Post by synthsin75 »

Hoptoad wrote: Wed Aug 31, 2022 3:08 pm 6) You know how you can click the "Styles" button and see a list of perhaps a few dozen styles that are being used? Sometimes I look at a list and wonder, "What on earth did I make Dark Gray 5?" What if...I clicked on the name of the style in that list, and the vector shape colored in that style (in the workspace) would become prominent somehow, so I would know what I had colored with that style?
When you have a style opened for editing, running this script will select all the shapes in the current layer that have that style applied.

Code: Select all

-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "Syn_SelectStyle"

-- **************************************************
-- General information about this script
-- **************************************************

Syn_SelectStyle = {}

function Syn_SelectStyle:Name()
	return "Select Style"
end

function Syn_SelectStyle:Version()
	return "0.1"
end

function Syn_SelectStyle:Description()
	return "Select all shapes with edited style"
end

function Syn_SelectStyle:Creator()
	return "©2022 J.Wesley Fowler (SynthSin75)"
end

function Syn_SelectStyle:UILabel()
	return "SYN: Select Style"
end


-- **************************************************
-- The guts of this script
-- **************************************************

function Syn_SelectStyle:IsEnabled(moho)
	local mesh = moho:Mesh()
	if (mesh) then
		for i=0, mesh:CountShapes()-1 do
			if (mesh:Shape(i).fInheritedStyle) then
				return true
			end
		end
	end
	return false
end

function Syn_SelectStyle:Run(moho)
	local mesh = moho:Mesh()
	local style = moho:CurrentEditStyle()
	for i=0, mesh:CountShapes()-1 do
		local shape = mesh:Shape(i)
		if shape.fInheritedStyle == style or shape.fInheritedStyle2 == style then
			shape.fSelected = true
		end
	end
end
User avatar
Hoptoad
Posts: 618
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: New and Improved Style Window

Post by Hoptoad »

Thanks!
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: New and Improved Style Window

Post by Greenlaw »

Hi Hoptoad,

You have some good suggestions here! I agree that the Style Window is wonderful and super useful, and that it can still use some improvements. For me, I would like to see better organization features, and save/load buttons for single Styles and sets of Styles. We can kind of use the Library for this but I'd like to see these options implemented directly in the Styles window. It would also be helpful to see the ID associated with a Style and a way to edit the ID from inside Moho. (While I'm at it, I'd to see these ideas applied elsewhere in Moho (for Bones, Actions, etc.,) where appropriate.)

Anyway...
Hoptoad wrote: Wed Aug 31, 2022 3:08 pm I make a new shape and I expect it to have one style associated with it, but instead it has two styles associated with it. I never use two styles on one shape, only one.

1) For whatever reason, Moho is always thinking, "Hey, I bet he wants to use two styles on this shape! Here ya go, champ! Enjoy the extra style!" And then I have to delete the extra style. I've done this, I don't know, a million times?
I don't have a specific suggestion on how to "fix" this.

2) And sometime I create a bunch of shapes and I don't want a style applied to any of them, and then I realize, "Oh no, they all have a style," and I have to change them all to "none."
I don't have a specific suggestion on how to "fix" this, either.
With the 'factory' default settings in the Style window, Moho shouldn't add any custom Styles to a new shape. It only does that when you've changed the default to include a custom Style, or in your case two Styles. You can set the Style window to have new default settings when no shape is selected. So, as Wes mentioned, if you set the Style selection to None and clear the Style slots in your Styles window, this will become the new default and Moho will not apply a custom Style to your new shapes.

As for using two Styles on a shape, here's an example of when you might want that: When I use two styles, the second style is typically a Stroke-only style with no fill. This is useful when I want a universal line weight and color to apply to an entire character or even to all characters in a production. This makes it easier to scale the lines to the exact weight I need for extreme closeup shots or when the characters are very tiny on screen. This also allows me to change line weight and color globally without affecting the different fills set in the normal Style settings or by the first custom Style under the Stroke-only Style. And I still have the option to override the line or color individually from the custom Style by checking the option in the regular style setting. So, having the second Style slot is actually incredibly useful. Just thought you might find this info helpful later.
Last edited by Greenlaw on Sat Sep 03, 2022 8:22 pm, edited 1 time in total.
User avatar
Hoptoad
Posts: 618
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: New and Improved Style Window

Post by Hoptoad »

Greenlaw wrote: Sat Sep 03, 2022 7:26 pm
As for using two Styles on a shape, here's an example of when you might want that: When I use two styles, the second style is typically a Stroke-only style with no fill. This is useful when I want a universal line weight and color to apply to an entire character or even to all characters in a production. This makes it easier to scale the lines to the exact weight you need for extreme closeup shots or when the characters are very tiny on screen. This also allows me to change line weight and color globally without affecting the different fills set in the normal Style settings or by the first custom Style under the Stroke-only Style. And I still have the option to override the line or color individually from the custom Style by checking the option in the regular style setting. So, having the second Style slot is actually incredibly useful. Just thought you might find this info helpful later.
I am about to start rigging a new character. I am going to try that. It sounds like a huge time-saver over my present process for changing line widths.
Thanks.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: New and Improved Style Window

Post by Greenlaw »

Re: being able to change IDs for Styles, here's a quick explanation for why I want this. If you use these Styles for multiple characters, conflicts can arise when you decide to change the settings for one character and then import that character to a project containing another character with the original version of the style. When this happens, all of the characters in the project will have settings 'synchronized' to look the same. You might think that changing the name of the Style would help Moho distinguish between the original and edited Styles but, nope, Moho only cares about the ID, which remains unchanged even when you change the Style name.

Moho does have a 'hidden' feature to deal with this problem: When you import a character, look for the option at the bottom of the window called Unlink Shared Styles and enable it. This will force Moho to change the Style IDs for the imported copy of the character. That's good to know but this is also the only way to change the Style IDs in Moho that I'm aware of, and users are not able to track or edit the specific ID value when they need to. (Short of hacking the project files with a text editor.)

If would be great if the Style ID simply appeared in the Style window and was editable. We're allowed to change the names, so why not the ID too? If the concern is that exposing this attribute might 'confuse' new users, just tell them don't worry about it and don't mess with it, or add an option in Preferences to hide certain 'advanced user' options from the UI until they're ready for it. (Personally, I think we should give new users a little credit...they're not going to be 'new' users forever.) :)
User avatar
synthsin75
Posts: 9973
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: New and Improved Style Window

Post by synthsin75 »

Hoptoad wrote: Wed Aug 31, 2022 3:08 pm 5) The word "Advanced" in the Style window has always seemed weird to me. Could that be replaced with a different word, perhaps "more"? Or a toggle-type button that reads "more/less"?
You can change the name of the Advanced checkbox yourself, with a little computer savvy.
On Windows (don't know the steps for Mac):
1. Run Notepad as adminsitrator
2. Open: C:\Program Files\Moho\Resources\Strings\Strings.EN.txt <--Store a copy of this file elsewhere before editing it.
(or the strings file for the language you're running Moho in)
3. Search that file for the line that reads: /Windows/Style/Advanced=Advanced
4. Change that line to: /Windows/Style/Advanced=More
(or whatever new word/s you want)
5. Save that file in Notepad and close and restart Moho to see the change.
User avatar
Hoptoad
Posts: 618
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: New and Improved Style Window

Post by Hoptoad »

Thanks! That was an excellent description on writing code. Hopefully someone will find it useful. Alas, my computer appears to be a small, metal cigar box with a picture of an apple on top.
Post Reply