how to activate a filter for layer

Post questions on how to use or achieve an effect in Inkscape.
Tomek
Posts: 2
Joined: Tue Jan 26, 2010 7:01 am

how to activate a filter for layer

Postby Tomek » Tue Jan 26, 2010 7:31 am

Hi all,

I want to draw highlights and darker spots on a object, most of that highlights and darker spots would be blurred.

I know how to do it, but my problem is I need to adjust the blur for every stroke I make, but the blur value is nearly always the same.

I know I can select the strokes and then apply the blur.
But I want the blur right after the stroke is done and not apply the blur to every stroke, or to make all the strokes and then make the blur.

I used the Blur value in the Fill and Stroke window but for every stroke I made the blur is going always to zero after I finished the stroke.

Maybe it would work to make a blur filter and then to activate the filter to work on a whole layer so when I draw somehting on that layer it applies the filter automaticly ?
When this or something else is possible please post a reply.

Thanks !

User avatar
c-quel
Posts: 68
Joined: Thu Dec 31, 2009 2:13 am
Contact:

Re: how to activate a filter for layer

Postby c-quel » Tue Jan 26, 2010 8:39 am

Hi. ;)

Why don't you try my Inkscape 0.47 Filter Guide, see if there isn't any existing filter that does that (or something close to it)....?

http://c-quel.deviantart.com/art/Inkscape-0-47-Filter-Guide-143226196

Also, do you make regular use of Paste Style? (CTRL+SHIFT+V)?

I use this to quickly copy the fill and stroke properties of one object into another (or several different others), and it also carries over Opacity and Blur data too.

Actually, I often end up with the reverse problem: after I Paste Style blurred objects, new objects are always created with blurring and I can't get rid of it unless I close and reopen the application. It was so irritating, I learned to work around that -- actually have forgotten to check if this "bug" still exists in 0.47. :P

User avatar
druban
Posts: 1849
Joined: Fri Nov 20, 2009 10:48 pm

Re: how to activate a filter for layer

Postby druban » Tue Jan 26, 2010 11:57 am

[quote="c-quel]
Actually, I often end up with the reverse problem: after I Paste Style blurred objects, new objects are always created with blurring and I can't get rid of it unless I close and reopen the application. It was so irritating, I learned to work around that -- actually have forgotten to check if this "bug" still exists in 0.47. :P[/quote]

Hi c-quel thanks for all the helpful materials you have posted. I think the problem you mention above might be due to the preferences dialog having "last style used" chosen for some or all objects or tools. You can change or choose some default style that is always used or switch back and forth which i sometimes do because both options are useful at times. Maybe you already know about this
Your mind is what you think it is.

User avatar
c-quel
Posts: 68
Joined: Thu Dec 31, 2009 2:13 am
Contact:

Re: how to activate a filter for layer

Postby c-quel » Tue Jan 26, 2010 12:55 pm

lol! Well true, I do have "Last Used Style" enabled on all my tools, but never put 2 and 2 together and realized that might be what was screwing me over.

Perfect, I'll give that a try. I do like my "Last Used Style", but if disabling it momentarily can stamp out that other odd behavior from time to time, I'll be happier. :D

Tomek
Posts: 2
Joined: Tue Jan 26, 2010 7:01 am

Re: how to activate a filter for layer

Postby Tomek » Tue Jan 26, 2010 7:51 pm

Thanks c-quel with the ctrl+shift+v tip!

It´s not exactly what I was looking for but I put that hotkey on the button on my pen (form the graphic tablet).

So after I finished a stroke I can quickly click that button and it applies the blur.

Thanks c-quel

ivan louette
Posts: 215
Joined: Thu Aug 21, 2008 4:08 am
Location: Belgium

Re: how to activate a filter for layer

Postby ivan louette » Tue Jan 26, 2010 9:22 pm

Select your first blurred stroke, hold down Shift and draw additional strokes. They will be combined with your first stroke and thus will inherit the same blur.

Afterwards you can do Path/Break Apart. But be aware that if you want change the blur amount individually for one stroke you must then duplicate the blur filter in the Filter Editor and apply the duplicate to the stroke you want change.

And before working with many filtered objects never forget to change Inkscape/Preferences/Tools/Selector/Per-object selection cue to None.

ivan

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: how to activate a filter for layer

Postby kelan » Wed Jan 27, 2010 12:18 am

Just in case someone searching comes across this message thread and really wants to apply a filter to a whole layer, here's how.

  1. Create your filter in the Filter Editor. (In version 0.47, under the Filters menu, choose Filter Editor... at the bottom.)
  2. Change the name of the filter to something memorable. It'll help later. You can change the name by right-clicking the current name of the filter and selecting Rename from the context menu.
  3. Open the XML Editor by pressing Shift+Ctrl+X or under the Edit menu choose XML Editor at the bottom.
  4. In the left hand pane of the XML Editor, one of the top lines should start with "svg:defs", with an icon to click to expand it. Click that icon, or double click the line itself to show its children.
  5. Look for a line starting with "svg:filter" and "inkscape:label="NAME"", where NAME is the name you chose in step 2 for the filter.
  6. Write down the id number you see on that line. It'll probably be something like "filter2812".
  7. Now look farther down for a line starting with "svg:g" and "inkscape:label="LAYER NAME"" where LAYER NAME is the name of the layer you want to apply the filter to.
  8. Click on that line so that the layer's attributes show up in the right hand pane.
  9. Click on the "style" attribute. At the bottom of the right hand pane, you'll see "style" in the small edit box and the current style value in the large edit box.
  10. Add the following to the end of the style value (in the large edit box): ;filter:url(#filter2812)
  11. Use the id you wrote down earlier instead of my example id of "filter2812". Make sure you include the semi-colon. That separates the individual pieces of the style attribute.
  12. If there's no style attribute, just type "style" in the small edit box, and the bolded text above in the large edit box, without the semi-colon.
  13. Press the "Set" button, which is located at the end of the small edit box.

That's it. Now any object you create on that layer will be subject to the given filter. Maybe in the future, something can be added to the Layers dialog box to make this process easier.

ivan louette
Posts: 215
Joined: Thu Aug 21, 2008 4:08 am
Location: Belgium

Re: how to activate a filter for layer

Postby ivan louette » Wed Jan 27, 2010 12:45 am

kelan wrote:Just in case someone searching comes across this message thread and really wants to apply a filter to a whole layer, here's how.

    ...

That's it. Now any object you create on that layer will be subject to the given filter. Maybe in the future, something can be added to the Layers dialog box to make this process easier.


That's very good news !!! Thanks a lot for that idea !!!

However it doesn't work as expected. The best is previously open the Layer Editor (Layer/Layers) and set a blend mode to your layer, then change the style number only in the XML Editor.

And if you want a blend mode, go back to the Filter Editor, add a Blend primitive to your filter and set the second entry of this Blend primitive to Background Image.

ivan


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 13 guests