Transforming multiple objects at once



  • Let's say I have a bunch of different rectangles like so:

    0_1663065815874_Screenshot 2022-09-13 at 13.41.22.png

    Is there a way to set the same width on all of them at once?



  • Yes, you can do it from the Alignment panel > Align Size — the size of the last selected object is the one used for the others:

    alt text



  • @b77 thank you, it didn't occur to me to look in the Alignment panel.



  • @tudor True, 'Align SIze' and 'alignment' is not the first thing that comes to mind when you need this.

    Is a separate 'Match' panel with Size/Rotation/Slant options needed?

    ( @VectorStyler Edit > Attributes > Copy Shape Effect includes all the transforms, so it's not good if you only want the rotation, for instance).


  • administrators

    @b77 said in Transforming multiple objects at once:

    Edit > Attributes > Copy Shape Effect includes all the transforms, so it's not good if you only want the rotation, for instance

    Would not help in this case anyway, as all transforms are relative to original size.



  • @b77 said in Transforming multiple objects at once:

    Is a separate 'Match' panel with Size/Rotation/Slant options needed?

    This is a “transform each” type of operation, so I would put it as an option in either the Transform or Transform each panels.

    For example, a “transform each” checkbox in the Transform panel could allow setting the same width/height/… values for all shapes individually.


  • administrators

    @tudor said in Transforming multiple objects at once:

    a “transform each” checkbox in the Transform panel could allow setting the same width/height/… values for all shapes individually.

    I think this is how it should be, added it to the backlog.

    EDIT: but it does not impact the alignment options, as those are about copying (aligning) sizes



  • @VectorStyler another idea, here is how this is done in Sketch. I like it a lot, it's simple and it makes sense.

    alt text



  • @tudor Which is the 'Transform Each' checkbox in the Sketch GIF?



  • @b77 that’s the idea, there is no checkbox, nothing. When selecting multiple objects, the inspector does not treat them as a group, but as individual objects with different properties.



  • Oh…

    OK, then what do you do when you want to change the width or height of the objects as a whole? Group them, change the value then ungroup?



  • @b77 there's the option of selecting all objects and resizing the bounding box by dragging with the mouse, like in every other app. There is a widget on screen showing WxH while resizing, so it's precise enough.

    And then there is a Scale Layers command, that resizes the shapes as a whole by entering percentages or WxH in pixels. This scales everything, including strokes and effects.

    But in general, if you want a bunch of objects to act as a group, the logical step in Sketch is to group them. Groups in Sketch have additional settings for pinning/scaling the objects inside, so they're more than just a way to organize shapes.



  • @tudor That's probably desirable in Sketch because it's focused on UI design (buttons, for instance, are usually set to a grid and you need to "sync" their size more often than treat them as a whole), but with a general purpose vector app like VS having to group objects before resizing them as a whole won't fly so well, and it is a non-standard approach compared to similar apps (AI, CDR, AD).

    Sure, adjusting the bounding box works, but maybe we're not OK with approximations.
    And Scaling layers is the long way around — vector graphics is focused on objects first and layers come second.

    When in vertical layout, there is room in the Transform panel for an 'Each' checkbox, what would be wrong with that?



  • @b77 said in Transforming multiple objects at once:

    When in vertical layout, there is room in the Transform panel for an 'Each' checkbox, what would be wrong with that?

    Nothing, that's fine.

    it is a non-standard approach compared to similar apps (AI, CDR, AD)

    But in this particular case Sketch offers a simple way to do a basic thing, that's simply missing in the old apps. Correct me if I'm wrong, but I don't think AI, CDR, or AD have a way to set the same size (in actual units, not percentages) on multiple objects at once.



  • @tudor Yes, it's nice that Sketch offers that, it's just that I don't think it should be the default in a general purpose app like VS. đź‘Ť

    An (additional) idea, just to discuss any possible approach:

    If the user types a special sign (*, §, whatever) before the number, the value could be used for each object from the selection.


  • Global Moderator

    There is a third behavior that seems to be missing from the discussion.

    If you resize a group of the items, then there is one anchor point impacting all of the items together - that is, not only do they get proportionally smaller/larger, but also closer or further away from each other.

    You might want to resize the items individually, proportionally to their current size, but maintain their relative positions - that is, anchor each of them at their center points, but still scale them proportionally.

    You might also want to maintain their relative positions, and scale them all to one matching size, ignoring their current sizes.

    If you want to keep going, we could of course come up with all manner of different combinations, but I think those are probably the three main ones that should likely be accounted for?

    One option would be to make the default of the three a preference then allow adding symbols to the field to override that when typing in an entry - ex. "=" before means individual absolute transform (keep individually anchored but match the dimension when resizing), "%" after means individual proportional transform, and "%%" at the end means transform as a group?



  • @fde101 There's no 'Transform Each' option in the Transform panel, but the Transform modal window (Object menu > Transform > Transform…) has 'Transform Each' there.



  • @fde101 said in Transforming multiple objects at once:

    One option would be to make the default of the three a preference then allow adding symbols to the field to override that when typing in an entry

    Sketch does it like this:

    0_1663172028122_Screen Shot 2022-09-14 at 19.12.17.png


  • Global Moderator

    @tudor those are interesting options, but they do not solve the problem being discussed here. Any of them (minus syntax) could easily be combined with any of the three options I suggested; there is no overlap


  • administrators

    @b77 said in Transforming multiple objects at once:

    There's no 'Transform Each' option in the Transform panel

    I think a Transform Each option would make sense in the Transform panel, but disabled by default.
    This would solve the problem of selecting the w/h also, not just scaling or rotating that can be done by the modal views.

    I will try to have this in 1.2