Peter Werner Posted May 10, 2023 Share Posted May 10, 2023 When doing page layout work or screen design, it is extremely common that two objects on a page need to exchange places. The manual approach is rather tedious: Select one of them, drag it out of the page (or on top of the other), select the second object, move the second object exactly into the position of the firast object, and then to select the first object again and move it to exactly the same position that the second was in before. In some cases, even temporary guides or helper objects will be involved to ensure accurate positioning. A simple menu command or keyboard shortcut that just swaps the XY position of two objects would make this common task much quicker. Just select two objects, press a key and they are exchanged. Similar options could be created to swap the contents of two picture frames or to swap objects while maintaining the boundary rectangle by scaling them to occupy the same space. Quote www.peterwerner.net Link to comment Share on other sites More sharing options...
2ddpainter Posted May 10, 2023 Share Posted May 10, 2023 Just some thoughs of mine not really shure if i am right Instead of move them manually Would group them and do a Horizontal Flip in your case not work ? Then double click on the single Object and do it once more for every single Object To switch the position for something like this a additional vertical flip is needed To use Symbols may also be a way ? Double click on a Symbol, Paste another Shape in it and double click on the old shape in the Symbol and delete it. Quote Link to comment Share on other sites More sharing options...
Peter Werner Posted May 10, 2023 Author Share Posted May 10, 2023 It would work and it's certainly a better approach than manually repositioning them. But it has disadvantages over a dedicated command: It's a minimum of 7 operations (group, flip, ungroup, select, flip, select, flip), 10 if you have to flip in both directions It will not respect the transform origin set in the Transform panel It is not an intuitive process for a user, particularly if the objects are on different pages or artboards It does not have an option to rewire text frames within a text flow (we'd have to discuss if this is desireable behaviour or not though) GripsholmLion 1 Quote www.peterwerner.net Link to comment Share on other sites More sharing options...
GripsholmLion Posted May 10, 2023 Share Posted May 10, 2023 +1. This would appear to be a simple addition which I would find quite helpful. Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted May 11, 2023 Share Posted May 11, 2023 Select them. Rotate Right. Rotate Right. Horizontal flip. No need to group anything. Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
walt.farrell Posted May 11, 2023 Share Posted May 11, 2023 7 minutes ago, Old Bruce said: Select them. Rotate Right. Rotate Right. Horizontal flip. No need to group anything. Doesn't the cat end up upside-down? Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1 Link to comment Share on other sites More sharing options...
Alfred Posted May 11, 2023 Share Posted May 11, 2023 13 minutes ago, Old Bruce said: Select them. Rotate Right. Rotate Right. Horizontal flip. No need to group anything. Applying the first three steps of your recipe to the pair of images in the original post would put the cat upside down. Vertical (not horizontal!) flipping would turn it the right way up, but with the tail on the wrong side, so you would need to flip it horizontally to restore the original orientation. Quote Alfred Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen) Link to comment Share on other sites More sharing options...
prophet Posted May 11, 2023 Share Posted May 11, 2023 I like to use the "Transform Object Separately" in my workflow. - Grab everything - Flip - Click "Transform Object Separately" - Flip again Just have to remember to untoggle "Transform Object Separately" before proceeding with other transforming work Old Bruce 1 Quote Link to comment Share on other sites More sharing options...
fde101 Posted May 11, 2023 Share Posted May 11, 2023 All of these flip/rotate tricks break if the objects are different sizes and you want to maintain the center positions. The command as originally requested impresses me as something that should be relatively simple to write a script for once that functionality is available then assign it a keyboard shortcut of your own. If Serif does not provide this before then it would not be the end of the world. Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted May 11, 2023 Share Posted May 11, 2023 1 hour ago, Alfred said: would put the cat upside down 1 hour ago, walt.farrell said: Doesn't the cat end up upside-down? Arghhhh... I didn't pay attention to the images in the first posts. I just used some coloured rectangles. Foiled by symmetry. [unbelievably embarrassed emoticon] walt.farrell, Alfred and Chul 3 Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
Pšenda Posted May 12, 2023 Share Posted May 12, 2023 On 5/10/2023 at 5:53 PM, Peter Werner said: The manual approach is rather tedious: Select one of them, drag it out of the page (or on top of the other), select the second object, move the second object exactly into the position of the firast object, and then to select the first object again and move it to exactly the same position that the second was in before. I use for this Transform panel. Video_2023-05-12_173958.mp4 GripsholmLion 1 Quote Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301 Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130. Link to comment Share on other sites More sharing options...
Old Bruce Posted May 12, 2023 Share Posted May 12, 2023 First I converted the Shapes to Curves just to make it easier for snapping. Then I drew some temporary spacers. Then I duplicated one of the two different shapes, moved it and moved the other and deleted the original. Screen Recording 2023-05-12 at 9.50.12 AM.mov Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
Peter Werner Posted May 12, 2023 Author Share Posted May 12, 2023 It's really interesting to see all these different ways to achive the desired result, but I think these demo videos being 20 seconds long are a testimony to the fact that there is indeed a potential to save time with a dedicated command. I think it's one of these small things that can really add up if you use a software every day. All of these can be achieved in some other fashion, but after a while of using these workarounds, it just feels like there should be a faster way. A similar thing that I run into constantly is whishing for a command to quickly break a multi-column text frame into individual linked frames (corresponding feature request post here). Aammppaa 1 Quote www.peterwerner.net Link to comment Share on other sites More sharing options...
Pšenda Posted May 12, 2023 Share Posted May 12, 2023 2 hours ago, Peter Werner said: a potential to save time with a dedicated command This of course applies to any specific (perhaps even bizarre) case of a sequence of commands. But as mentioned above, a macro/script is much more suitable for these sequences, not a "dedicated command", because hundreds of them would be needed. P.S. 2 hours ago, Peter Werner said: these demo videos being 20 seconds It is necessary to take into account the fact that it is a "demo", in which there are a lot of unnecessary delays and actions that will not be performed when executing your own command. The resulting duration of the action is therefore significantly shorter. Quote Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301 Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130. Link to comment Share on other sites More sharing options...
Peter Werner Posted May 13, 2023 Author Share Posted May 13, 2023 16 hours ago, Pšenda said: a macro/script is much more suitable for these sequences I did write one for breaking a frame into columns in InDesign at some point. I ended up using it so often that I wondered why they never added it to the core feature set. 16 hours ago, Pšenda said: not a "dedicated command", because hundreds of them would be needed. Could you give some other examples? Most of the ones I can think of are already there ("Align Vertically", "Convert Art Text to Text Frame", "Swap Stroke and Fill Color", "Duplicate Layer", …) I'm actually genuinely curious because if these things aren't added, I'm thinking about writing a script as soon as we have support for that. 16 hours ago, Pšenda said: It is necessary to take into account the fact that it is a "demo" I did. My point is that these are not one or two click solutions. 12 seconds versus 2 seconds easily adds up. GripsholmLion 1 Quote www.peterwerner.net Link to comment Share on other sites More sharing options...
GripsholmLion Posted May 13, 2023 Share Posted May 13, 2023 Maybe it's just Peter and I who want this. 😄 I quite often design and make decals and paint masks, so I would find this kind of swap tool rather handy for that. Quote Link to comment Share on other sites More sharing options...
2ddpainter Posted May 13, 2023 Share Posted May 13, 2023 @GripsholmLion Well, I think you are not alone. If there was the possibility in Affinity Designer surely everyone would like to use it. Of course nobody knows if Affinity will ever implement it. So for the time being we have to look for a workaround. Or to hope that such things can be realized with scripting once it is implemented. Quote Link to comment Share on other sites More sharing options...
Pšenda Posted May 13, 2023 Share Posted May 13, 2023 7 hours ago, Peter Werner said: Could you give some other examples? For example, someone very often needs to switch objects with each other, but requires that the applied fx remains in the same position (it was not transferred with the previous object to new position). That is a sequence of many commands that takes a long time, which you say is "a testimony to the fact that there is indeed a potential to save time with a dedicated command". Quote Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301 Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130. Link to comment Share on other sites More sharing options...
Pšenda Posted May 13, 2023 Share Posted May 13, 2023 7 hours ago, Peter Werner said: My point is that these are not one or two click solutions. I apologize for trying to suggest a significantly faster procedure than the one you are using: On 5/10/2023 at 5:53 PM, Peter Werner said: Select one of them, drag it out of the page (or on top of the other), select the second object, move the second object exactly into the position of the firast object, and then to select the first object again and move it to exactly the same position that the second was in before. In some cases, even temporary guides or helper objects will be involved to ensure accurate positioning. But apparently you like this procedure, so feel free to continue using it. Quote Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301 Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155. Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130. Link to comment Share on other sites More sharing options...
Peter Werner Posted May 13, 2023 Author Share Posted May 13, 2023 19 minutes ago, Pšenda said: someone very often needs to switch objects with each other, but requires that the applied fx remains in the same position My estimate would be that for an average serious user of Affinity Publisher, swapping the position of two objects is a task that comes up at least once or twice per session, whereas the use case you give is much more specialized. If I had to guess, I would estimate that they differ by at least a factor 1000 in frequency of relevance for the average user. If you say it's something that comes up in your work a lot, I'd be happy to include such an option for you if we end up having to go the scripting route. 1 minute ago, Pšenda said: I apologize for trying to suggest a significantly faster procedure than the one you are using: I am sorry if you got the impression that I somehow do not value your contribution to this discussion. My point was that even with the faster process you suggested, it's still significantly less efficient than a dedicated solution. It also has other disadvantages, such as the fact that the software only displays floating point numbers with a limited precision in the UI, so copy pasting coordinates may cause position shifts in some cases. 7 minutes ago, Pšenda said: But apparently you like this procedure, so feel free to continue using it. I'm not sure how to respond to this in a constructive way – the reason why we are having this discussion in the first place is that I don't like that procedure. Quote www.peterwerner.net Link to comment Share on other sites More sharing options...
GarryP Posted May 14, 2023 Share Posted May 14, 2023 I think this could be a useful function to have, but I also think some consideration needs to be given to what is meant by switch “position”. As has been mentioned above, does this mean: the X/Y position of the bounding boxes, or; the X/Y position of the shapes, or; the centres of the bounding boxes, or; the centres of the shapes, or; something else? And what would happen if either or both of the layers is/are: rotated, and/or; skewed, and/or; flipped? Consider my attached image (the blue rectangles are the bounding boxes). Which coordinates of the two filled shapes should be “switched”? In the lower area I’ve given examples (green rectangles) of just four places the “switched” layer bounding box could end up. And how would the user choose which one they want? It’s a nice idea but good luck coming up with a good set of instructions for how it would work in practice, because that’s what the developers would need to do. And if you can’t tell them what it needs to do then how can they make it do what you want? Old Bruce 1 Quote Link to comment Share on other sites More sharing options...
2ddpainter Posted May 14, 2023 Share Posted May 14, 2023 Well, I have no problem sharing even unusual ideas. So here's one. How about grouping all the shapes that will probably need to be replaced, and only color the one you use in the appropriate place. The other shapes/symbols with no colors and no outline would be invisible. And it would be easy to color what you use at a time. Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted May 14, 2023 Share Posted May 14, 2023 Further to what @GarryP has shown. Here is the problem with swapping two objects of different sizes. Do they get swapped according to the top/middle/bottom x, y coordinates of the centre, the left, or the right? The original The possibilities Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
Peter Werner Posted May 14, 2023 Author Share Posted May 14, 2023 7 hours ago, GarryP said: some consideration needs to be given to what is meant by switch “position”. 3 hours ago, Old Bruce said: Do they get swapped according to the top/middle/bottom x, y coordinates of the centre, the left, or the right? My suggestion would be to respect the setting of the transformation origin widget in the Transform panel to determine which anchor to use for position switching. With respect to individual object transform, I would suggest to just keep all local transformations like rotation/flip/skew etc. associated with the object since this would match what most people would intuitively assume the result of such an operation to be: I think anything more advanced than that would need so much user input that it would defeat the purpose as it would no longer be a one-click operation. That being said, I could indeed imagine a "Switch Attributes" command or script that gives the user a dialog box with checkboxes for granular control of which attributes of an object to transfer and whether to switch or copy attributes between the objects. So you could check or uncheck "position", "rotation" etc. individually, but also "effects", "style", "stroke attributes", "fill attributes", "blend mode" etc. Another approach might be a "Copy Attributes"/"Paste Attributes" type of set of commands. Similar to corresponding features in Adobe Lightroom (pictured below), DaVinci Resolve or Autodesk Maya. But again, that would solve a different problem. Quote www.peterwerner.net Link to comment Share on other sites More sharing options...
GarryP Posted May 15, 2023 Share Posted May 15, 2023 12 hours ago, Peter Werner said: My suggestion would be to respect the setting of the transformation origin widget in the Transform panel to determine which anchor to use for position switching. When I was considering your suggestion earlier I too thought that the transform origin widget might be a good control to use but, after a while, I wasn’t too sure. I don’t have any specific objections to it being used in this way but there is a vague worry in the back of my mind saying that giving this widget ‘double duty’ could cause some problems somewhere along the road. 12 hours ago, Peter Werner said: With respect to individual object transform, I would suggest to just keep all local transformations like rotation/flip/skew etc. associated with the object since this would match what most people would intuitively assume the result of such an operation to be To try and make myself a bit more clear, I wasn’t suggesting that the rotation/skew/flipped-ness of the layers would be swapped. I mentioned them because each operation changes at least some of the coordinates of the layer. For example, consider my next attached image. The black rectangle is a standard Rectangle shape and the black/white dotted line is it’s bounding box. The blue rectangle is the original rotated by 45 degrees clockwise with a corresponding boundary box. The red rectangle is the original skewed by 45 degrees from the bottom-left with a corresponding boundary box. (I won’t show the flipped rectangle for reasons that should be obvious.) Each operation changes some, if not all, of the coordinates of the rectangle and its bounding box. Therefore, when you are telling the software to “switch positions” of two layers, the X/Y positions of the different coordinates of the two layers could be wildly different to what you might expect. For example, in my attached video, you can see that the X/Y position of the Original rectangle is at 742x540 (approx.). But, the X/Y value of the Rotated rectangle is also at 742x540 (approx.) even though its top-left corner is not in the same place and the bounding box is obviously much larger and situated differently. However, the X position of the Skewed rectangle (1042 approx.) is very different to the X value of the original (742 approx.) while the Y value is the same (540). The same sort of thing goes for the bounding boxes and even more so when you apply multiple operations. And the centre of each layer may also be in a different place. My point is, what you mean by X/Y may not be what the software thinks is X/Y and so, when you want it to “switch positions”, which “positions” are actually getting “switched”? I’ve attached my document so you can play around with it. Hopefully I’ve been able to make myself a bit more clear this time. 2023-05-15 08-40-56.mp4 swapping-positions2.afdesign Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.