Skip to main content
Inspiring
June 24, 2012
Open for Voting

P: Ability to toggle pixel grid snapping on/off for vector tools using a keyboard shortcut

  • June 24, 2012
  • 14 replies
  • 821 views

As a UI designer I toggle the Snap to pixelgrid option on and off many times per day. This feature requires a easy override shortcut instead of being hidden in preferences. Maybe by adding ctrl to the move shortcuts for example?

14 replies

Participant
November 30, 2022

The UI designers couldn't be more wrong that "nobody would ever want to turn it off". It's impossible to overstate just how obnoxious it is that zooming in repeatedly automatically turns on this pixel grid "feature" and doubly obnoxious that there's not even a keyboard shortcut to turn it off.

Participant
July 4, 2017
Count me too for this. When working on pixel icons I need to switch it on and off very often. Your UI designers should reconsider this.

At least put the option closer to the surface, like in the topbar. And let us decide if we sacrifice another shortcut to use with this, without having to define an action. This way you won't affect your UI designers.



And don't think we are the only ones, it took me years until I decided to post this, hoping that it's an obvious improvement and it will be here soon, especially with UI design exponentially growing in the last years. Many of us don't take the time to post or don't even know about posting.

Thanks.
Inspiring
May 8, 2016
why this doesn't works?  I can't get "transformsSnapToPixels" value. Did you moved property from "generalPreferences" into "toolsPreferences" where is not accessible anymore?
var ref = new ActionReference();
 ref.putProperty(cTID('Prpr'), sTID('toolsPreferences'));
 ref.putEnumerated(cTID('capp'), cTID('Ordn'), cTID('Trgt'));
 var desc = executeActionGet(ref);
Property changing from script listener

// CC 2015

var idsetd = charIDToTypeID( "setd" );
    var desc7 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref1 = new ActionReference();
        var idPrpr = charIDToTypeID( "Prpr" );
        var idtoolsPreferences = stringIDToTypeID( "toolsPreferences" ); // <- difference
        ref1.putProperty( idPrpr, idtoolsPreferences );
        var idcapp = charIDToTypeID( "capp" );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref1.putEnumerated( idcapp, idOrdn, idTrgt );
    desc7.putReference( idnull, ref1 );
    var idT = charIDToTypeID( "T   " );
        var desc8 = new ActionDescriptor();
        var idtransformsSnapToPixels = stringIDToTypeID( "transformsSnapToPixels" );
        desc8.putBoolean( idtransformsSnapToPixels, false );
        
        
    var idtoolsPreferences = stringIDToTypeID( "toolsPreferences" );
    desc7.putObject( idT, idtoolsPreferences, desc8 );
executeAction( idsetd, desc7, DialogModes.NO );



//CS6

var idsetd = charIDToTypeID( "setd" );
    var desc12 = new ActionDescriptor();
    var idnull = charIDToTypeID( "null" );
        var ref3 = new ActionReference();
        var idPrpr = charIDToTypeID( "Prpr" );
        var idGnrP = charIDToTypeID( "GnrP" ); // <-- difference
        ref3.putProperty( idPrpr, idGnrP );
        var idcapp = charIDToTypeID( "capp" );
        var idOrdn = charIDToTypeID( "Ordn" );
        var idTrgt = charIDToTypeID( "Trgt" );
        ref3.putEnumerated( idcapp, idOrdn, idTrgt );
    desc12.putReference( idnull, ref3 );
    var idT = charIDToTypeID( "T   " );
        var desc13 = new ActionDescriptor();
        var idtransformsSnapToPixels = stringIDToTypeID( "transformsSnapToPixels" );
        desc13.putBoolean( idtransformsSnapToPixels, false );
        var idlegacyPathDrag = stringIDToTypeID( "legacyPathDrag" );
        desc13.putBoolean( idlegacyPathDrag, true );
    var idGnrP = charIDToTypeID( "GnrP" );
    desc12.putObject( idT, idGnrP, desc13 );
executeAction( idsetd, desc12, DialogModes.NO );
I wan't do button in my panel for switching this property and I need get value.
Inspiring
February 16, 2016
I disagree Chris. I toggle pixel grid snapping on/off quite often. Just try adjust 16x16 px vector shapes/icons with snapping on.
Inspiring
February 16, 2016
The day that Photoshop can scale down a vector AND keep its points snapped to pixels is the day that the need to turn snap to pile on and off will disappear. In the meantime I'll add my voice to the others here.

Have you any idea how many sometimes odd (57x57 anyone?)  icon sizes are needed for iOS these days?!
Inspiring
June 30, 2015


I toggle Snap Vector Tools and Transforms to Pixel Grid a lot while I am working on UI elements. It would really speed up design if I didn't have to go into Preferences every time and I could simply toggle between snapping/not snapping in Options for Direct Selection Tool.
Participating Frequently
July 2, 2014
Recently I've been starting to use another application that was built for UI design. It's called "Sketch 3". It has a lot of the features that you would expect as a UI designer and isn't bloated with a bunch of Photo editing features that you rarely have any use of.

This application has made my workflow a lot faster and efficient. The pixel snapping is not a problem either which is very liberating. I have actually abandoned Photoshop and Illustrator almost completely, except for when I need to edit photos or copy some icons previously made in Illustrator and pasting them into my Sketch files.
Inspiring
July 1, 2014
I second this. over 2 years later, apparently.
Participant
September 19, 2013
This dysfunctionality makes me crazy. I liked it better how it was.
45634563545
Inspiring
October 19, 2012
Yes, 90% of the time, the new CS6 vector auto-pixel snap is great, but the other 10% it's very frustrating.

At least with the old way, you could do both - zoom waaay in and nudge vector points one screen pixel at a time for subpixel anti-aliasing but you could also keep vector points pixel snapped to whole pixels with enough accurate nudging,not to mention holding Shift to constrain to whole pixels if zoomed out enough.

The new default way, you can't do that. Whole pixel only. CTRL+K, click, OK. Repeat.