How to get rid of the outlines using styles?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
desta1972
Posts: 13
Joined: Mon Dec 11, 2006 9:49 am

How to get rid of the outlines using styles?

Post by desta1972 »

Hi,
I'm trying to define a style whitch allows me to automatically create shapes without any outline. I want just Fill color.

I've tried unchecking the Line Color and Line Width checkboxes while creating the Style. No way. The lines are still there each time I assign the style to a shape. The only 2 things I can do are:

1. Uncheck the "Enable Ouline" boxes every time I assign the style to a shape. Very boring.

2. Using the "Hide Edge" tool on shapes. This is more time-saving if I often change Style to shapes, but what a mess in case of complex multi-points shapes!

One more thing: How can I set a default style for the new shapes I'm going to draw? The Fill color always override my stile settings, and I need to check/unckeck the "fill color - enable fill" checkboxes a lot of times!

Thanks for your help
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Currently there is no way to have the fill and stroke default to be other than on when creating a new shape or using styles.

You can't control it with a style, you must check or uncheck that box for each style as needed.

The checkbox in the styles for fill and stroke controls whether that fill or stroke color overrides any other styles applied to a shape.

Hopefully future versions of AS will add more control as a feature. In the meantime get your clicking finger in shape!

... no... not THAT finger... the other one.

;)

-vern
User avatar
ulrik
Posts: 1087
Joined: Thu Aug 11, 2005 10:32 pm
Location: Stockholm Sweden
Contact:

Post by ulrik »

Hi!

I don't know how to deal with the outline thing, I have the same problem when using styles.
If you want a predefined style as default you have to, first: make your style, name it.
Second: in style window choose "none"
then in "applied styles" choose your predefined style.
Now every shape you'll create will have your predefined style
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

The Create Shape tool from Fazek (see Scripting Forum) allows you create one Shape only with the outline and the fill disabled. May be him or someone else could modify the tool to allow create only fill with outline disabled...
User avatar
artfx
Posts: 213
Joined: Sat Nov 11, 2006 10:52 pm
Location: Hollywood
Contact:

Post by artfx »

Am I perhaps not understanding what is desired here? You want to create a shape with a style already applied? Or do you just want to create new shapes with a fill but no outline? One is easy. The other...
----
Terrence Walker
Studio ArtFX
LEARN HOW TO Make YOur Own Animated Film!
Get Video Training to Show You How!
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

artfx wrote:Am I perhaps not understanding what is desired here? You want to create a shape with a style already applied? Or do you just want to create new shapes with a fill but no outline? One is easy. The other...
As well as Styles are overriding tools you can easily create an Style whitout outline (just uncheck it) But if the default style have outline then the outline will be shown. The problem is that the checkbox is disabled during fill and outline definition for the DEFAULT Shape.

There are tree tools that have the capability to do a shape from scratch WITHOUT the outline. LostMarble Rectangle and Oval and the Fazek Poligon tool. They have the autofill and autooutline checkboxes available so they are perfect for that. Why cannot this be done with Create Shape tool? Perhaps next version of AS include this or some scriptwriting guru can modify Create Shape tool from Fazek.

(Sorry for mentioning Fazek so many times but his complementary tool set is wonderful)
User avatar
artfx
Posts: 213
Joined: Sat Nov 11, 2006 10:52 pm
Location: Hollywood
Contact:

Post by artfx »

Aahhh I get it! Yeah unfortunately I never need to do that. When I create such shape I draw it with the pencil tool with auto close, auto fill and no outline.
----
Terrence Walker
Studio ArtFX
LEARN HOW TO Make YOur Own Animated Film!
Get Video Training to Show You How!
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Yes, but when you're tracing a drawing that is more difficult, because your original drawing gets covered by the closed fill once you stop drawing. In that case, you'll need to disable the outline and fill. It would be handy if there was a tool to only create a fill, and no outline.

Anyway, here is a hack to remove the outline in the original Create Shape tool by Lost Marble. First make a backup of the original lm_create_shape.lua file (I call the backup lm_create_shape.lua.bak), so you can restore the original file if you need to. Then modify in the lm_create_shape.lua file in the scripts\tool\ subdirectory the following code snippet (modifications are commented with -- added by RvB). Do not copy and paste text from this forum, but just load the lm_create_shape.lua file in you favorite plain text editor (Notepad, Simpletext, etc.), type the four extra lines of code, and save the file to its original location (use quotes around the filename in Notepad "lm_create_shape.lua", otherwise it will add a .txt extension, and the file will be named "lm_create_shape.lua.txt"). This part of the code is almost at the bottom of the document. Simply do a text search to find the correct position in the file.

Code: Select all

	if (msg == self.CREATE) then
		if (moho:CountSelectedEdges() > 0) then
			moho.document:PrepUndo(moho.layer)
			moho.document:SetDirty()
			local shapeID = moho:CreateShape(true) -- filled shape
			if (shapeID < 0) then
				shapeID = moho:CreateShape(false) -- just an outline
				if (shapeID >= 0) then
					mesh:SelectNone()
					mesh:Shape(shapeID).fFillAllowed = false
				end
			end
			if (shapeID >= 0) then
				local shape = mesh:Shape(shapeID)           -- added RvB
				if (shape.fHasFill) then                    -- added RvB
				    mesh:Shape(shapeID).fHasOutline = false -- added RvB
				end                                         -- added RvB
				mesh:SelectNone()
				mesh:Shape(shapeID).fSelected = true
				moho:NewKeyframe(CHANNEL_FILL)
				moho:NewKeyframe(CHANNEL_LINE)
				moho:UpdateSelectedChannels()
			end
			view:DrawMe()
		end
Or download the modified Lua script from my .Mac account:
lm_create_shape.lua.zip

The script checks if the shape has a fill, and if it does, it removes the outline. You can still add an outline with the Select Shape tool (the one to the left of the Create Shape tool).

I hope this helps.
desta1972
Posts: 13
Joined: Mon Dec 11, 2006 9:49 am

Post by desta1972 »

Wow! My post seems to be less silly than I believed! Rasheed, your solution seems to be smart and simple (if (bla bla)... else (bla bla) ) :wink:
Iìll give it a try.
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

@desta1972: Please tell us if it worked for you.

I have created a separate tool, so you can install it as such. It is still the same archive file lm_create_shape.lua.zip, but now containing the appropriate files to make it a separate tool in the Other section of the Tools window.
desta1972
Posts: 13
Joined: Mon Dec 11, 2006 9:49 am

Post by desta1972 »

Rasheed,
It works just great!!!!!!!
That's exactly what I needed!
Thank you very much!!!!!
Post Reply