On/Off

27 views
Skip to first unread message

bedex78

unread,
Oct 3, 2009, 1:06:06 PM10/3/09
to PixelSnap Users
Great plug-in! I really need this!

Anyway, is there a way to quickly disable the plug-in temporarily
besides deleting the files from the extension folder, just in case?

Bryan Hoyt

unread,
Oct 4, 2009, 4:27:06 PM10/4/09
to pixelsn...@googlegroups.com
Currently there's no way of disabling this extension. It's probably a feature worth adding, however I'm not quite sure what needs to be disabled.

The plugin doesn't actually run until you actually select it in the menu. Then it runs once on the selected items, snapping them appropriately, and finishes. So the simplest way of disabling it is to simply not do anything!

But if you want it to disappear from the menu, the only way I know of is to delete (or move) the files from the extensions folder.

Let me know if this doesn't help.

cheers,
Bryan

bedek78

unread,
Oct 6, 2009, 3:25:29 AM10/6/09
to PixelSnap Users
Oh.. I'm sorry... I thought it was an automated thing.. that is, it
automatically snaps to pixels. I didn't know you have to run it first.
Thanks for the info.

However, wouldn't it be better if it runs automatically? So once you
draw something (a rectangle, etc), it automatically aligns itself to
the pixel so the x/y axis and width/height are always rounded (no
decimals).



On Oct 5, 3:27 am, Bryan Hoyt <bryh...@gmail.com> wrote:
> Currently there's no way of disabling this extension. It's probably a
> feature worth adding, however I'm not quite sure what needs to be disabled.
>
> The plugin doesn't actually run until you actually select it in the menu.
> Then it runs once on the selected items, snapping them appropriately, and
> finishes. So the simplest way of disabling it is to simply not do anything!
>
> But if you want it to disappear from the menu, the only way I know of is to
> delete (or move) the files from the extensions folder.
>
> Let me know if this doesn't help.
>
> cheers,
> Bryan
>

Bryan Hoyt

unread,
Oct 6, 2009, 3:41:05 PM10/6/09
to pixelsn...@googlegroups.com
Hi bedex78,

Yes, in some ways it would be great if this could run automatically. At the very least, it would save a few extra clicks & searching thru the menus.

However, there are two problems:

 1) I don't know of any way this is possible with Inkscape's plugin architecture
 2) You honestly don't want it to run automatically on every object. For example, paths with intricate curves. It still attempts to snap straight segments even in a path with curves. That's what you'd want most of the time, but it would mess up intricate detail on some paths.

Currently, I don't know of any good heuristic to determine whether a path should be munged or not -- about 75% of paths I create I'd want snapped, but it depends on the path. And I imagine it depends on the human artist.

One solution is to remember paths that have previously been snapped (set an internal "snap=" attribute or something), so only those paths can be snapped in the future. I'm thinking of adding this feature at some point.

But at the end of the day, you'd still have to select the menu item, because we're limited by Inkscape's extension architecture. I'm looking forward to the exciting new DBus architecture in the development version of Inkscape -- it should give us more automation/integration.

 - Bryan

Bryan Hoyt

unread,
Oct 6, 2009, 3:43:14 PM10/6/09
to pixelsn...@googlegroups.com
P.S. That said, it does do a pretty good job even on intricate paths. But you'll see what I mean if you try running PixelSnap on some text that's been converted to a path. (PixelSnap won't & can't operate on text, so you must convert it to a path first).

 - Bryan

bedek78

unread,
Oct 7, 2009, 5:55:32 AM10/7/09
to PixelSnap Users
I see... Okay, fair enough...

Anyway, I want to make a keyboard shortcut for it for quick access.
May I know what the plug-in's ACTION name is so I can bind it to a
key?

Cheers!


On Oct 7, 2:43 am, Bryan Hoyt <bryh...@gmail.com> wrote:
> P.S. That said, it does do a pretty good job even on intricate paths. But
> you'll see what I mean if you try running PixelSnap on some text that's been
> converted to a path. (PixelSnap won't & can't operate on text, so you must
> convert it to a path first).
>
>  - Bryan
>
> On Wed, Oct 7, 2009 at 08:41, Bryan Hoyt <bryh...@gmail.com> wrote:
> > Hi bedex78,
>
> > Yes, in some ways it would be great if this could run automatically. At the
> > very least, it would save a few extra clicks & searching thru the menus.
>
> > However, there are two problems:
>
> >  1) I don't know of any way this is possible with Inkscape's plugin
> > architecture
> >  2) You honestly don't want it to run automatically on every object. For
> > example, paths with intricate curves. It still attempts to snap straight
> > segments even in a path with curves. That's what you'd want most of the
> > time, but it would mess up intricate detail on some paths.
>
> > Currently, I don't know of any good heuristic to determine whether a path
> > should be munged or not -- about 75% of paths I create I'd want snapped, but
> > it depends on the path. And I imagine it depends on the human artist.
>
> > One solution is to remember paths that have previously been snapped (set an
> > internal "snap=" attribute or something), so only those paths can be snapped
> > in the future. I'm thinking of adding this feature at some point.
>
> > But at the end of the day, you'd still have to select the menu item,
> > because we're limited by Inkscape's extension architecture. I'm looking
> > forward to the exciting new DBus architecture in the development version of
> > Inkscape -- it should give us more automation/integration.
>
> >  - Bryan
>

Bryan Hoyt

unread,
Oct 7, 2009, 3:40:38 PM10/7/09
to pixelsn...@googlegroups.com
My best guess would be "PixelSnap". That's what the name of the plugin is in the menu. I'm not sure I know about anything called an ACTION name, though. Can you tell me more about it? I'd be keen to bind it to a key myself.

 - Bryan

bedek78

unread,
Oct 7, 2009, 3:59:33 PM10/7/09
to PixelSnap Users
I guess the only way I know to apply a keyboard shortcut is to edit
the code manually. If you look in this folder:

C:\Program Files\Inkscape\share\keys

.. there is a file called 'default.xml'. That's the file used for the
keyboard shortcut. To create a shortcut, you have to know the 'ACTION'
in which the key(s) is applied to.

I'd tried 'PixelSnap' and 'PixelSnapEffect'.. both didn't work.

Not really sure if you can apply keys to plug-ins, though.


On Oct 8, 2:40 am, Bryan Hoyt <bryh...@gmail.com> wrote:
> My best guess would be "PixelSnap". That's what the name of the plugin is in
> the menu. I'm not sure I know about anything called an ACTION name, though.
> Can you tell me more about it? I'd be keen to bind it to a key myself.
>
>  - Bryan
>

bedek78

unread,
Oct 7, 2009, 4:53:25 PM10/7/09
to PixelSnap Users
Okay.. Got it!

Found out that to bind keys to an extension, you can use the
extension's ID as the ACTION's name. And PixelSnap's ID is
'bryhoyt.pixelsnap'.

So I added these:

<bind key="s" modifiers="Shift" action="bryhoyt.pixelsnap"
display="true"/>
<bind key="S" modifiers="Shift" action="bryhoyt.pixelsnap" />

.. to the 'default.xml' file I referred to previously. 'Shift-S' is
the key I chose to bind it with.

Bryan Hoyt

unread,
Oct 7, 2009, 5:23:16 PM10/7/09
to pixelsn...@googlegroups.com
Ah, that makes sense. Excellent find, thanks. I think I'll add this useful tip to the install "docs".

 - Bryan

Bryan Hoyt

unread,
Oct 23, 2009, 10:26:30 PM10/23/09
to pixelsn...@googlegroups.com
Just for your information, I've added this tip to the INSTALL file, and I've also added a note on the homepage (under "Download latest release") linking to the same info on the wiki.

In my case, I've suggested binding to Shift-X, as that seems to cause fewer problems -- Shift-S wouldn't work in some contexts, such as F1 pointer mode -- Shift-S toggles between "rotate" and "scale" if an object is selected, and I couldn't override it with a custom binding anyway.

cheers,
Bryan
Reply all
Reply to author
Forward
0 new messages