maxegb Posted January 28 Share Posted January 28 Hello, everyone! i am trying to record a macro, but i am having a hard time doing it. Basically i would like to add halation to an image and the steps are as follows: duplicate the image add a threshold adjustment add a gaussian blur to aforementioned threshold add a red fill layer, set its blend mode to linear burn add a curve group layers from the above steps, change group blend mode to screen. i can get all the way to the last step , obviously, but when i try to select the layers to group, Affinity does not allow me. am i doing something wrong ? thanks! khanzain 1 Quote Link to comment Share on other sites More sharing options...
v_kyr Posted January 28 Share Posted January 28 See this video about layer behavior in macros ... Macros: Layer Behaviour Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
maxegb Posted January 28 Author Share Posted January 28 59 minutes ago, v_kyr said: See this video about layer behavior in macros ... Macros: Layer Behaviour i could not find the section of the video where there is a selection of multiple layers and a grouping of those ? Quote Link to comment Share on other sites More sharing options...
v_kyr Posted January 28 Share Posted January 28 19 minutes ago, maxegb said: i could not find the section of the video where there is a selection of multiple layers and a grouping of those ? If it's for all the created layers use the top menu commands ... Select -> Select all Layers Arrange -> Group Change layer mode to screen screencast_macro.mp4 Note however, that the APh macro recording facilities are pretty limited in overall functionality and just do record static steps (aka it don't dynamically autoadjust macro recordings to other images possible w/h sizes, different orientations and the like ...). Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
walt.farrell Posted January 28 Share Posted January 28 14 minutes ago, v_kyr said: If it's for all the created layers use the top menu commands ... It's not for all the layers, though it is for all the layers created in the OP's workflow, as I read it. I don't think Select All will work, as that would also select the original layer which they want to exclude. Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1 Link to comment Share on other sites More sharing options...
v_kyr Posted January 28 Share Posted January 28 2 hours ago, walt.farrell said: It's not for all the layers, though it is for all the layers created in the OP's workflow, as I read it. I don't think Select All will work, as that would also select the original layer which they want to exclude. Then the OP has to go the painful workaround way here, aka creating a group and moving/placing the wanted layers in single steps into the group. - See other related threads about that theme, as APh's macro facilities as I've I said before are pretty limited here ... Generally search & look after ... macro recording select layers site:forum.affinity.serif.com ... etc. walt.farrell 1 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
smadell Posted January 28 Share Posted January 28 Good morning @maxegb. What you are trying to do is very possible. But, as noted, you cannot select multiple layers at once. Instead, substitute these steps at the beginning of your macro. Deselect - make sure there is no active selection Deselect Layers - make sure your new layers are placed at the top of the Layers stack ** these first two steps are optional, but often helpful ** Duplicate the Image - or, perhaps, Merge Visible (which will incorporate all existing layers, adjustments, etc) New Group - from the Layer menu Name the Group - double click on the Group Name and type something Set the blend mode to Screen Move back one - from the Arrange menu Select the duplicated layer - when the dialog box pops up, choose ‘Select layer 1 above current layer” Move inside - now you’re inside the group ** Continue your macro by adding additional stuff ** Select the enclosing Group layer - confirm that you are selecting the ‘parent layer’ in the dialog box This should get you what you want. Believe me, it was a long period of pulling my hair out trying to figure out how to use Groups inside of macros. Once you get it, it’s fairly straightforward. But until you figure out the logic that’s being used, it’s a bit frustrating (to say the least…) walt.farrell 1 Quote Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme Mac Studio with M2 Max (2023); 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 18 Link to comment Share on other sites More sharing options...
smadell Posted January 28 Share Posted January 28 One more thing… Those first 2 steps are helpful, especially the first “Deselect”. Your entire macro will fail if you have an active selection when you start adding additional layers. But, when programming the macro, the Deselect menu item is greyed out unless you actually have an active selection. Therefore, before starting your macro recording, create a selection (any random selection is fine). Then, click the Record button in the Macro panel and choose “Deselect” as your first step. Quote Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme Mac Studio with M2 Max (2023); 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 18 Link to comment Share on other sites More sharing options...
R C-R Posted January 28 Share Posted January 28 4 hours ago, smadell said: Name the Group - double click on the Group Name and type something Naming groups (& other layers) in macro steps often makes it simpler to reselect named items later on in the macro, but it is not foolproof because I know of no way in the macro to check for duplicate layer names. Anybody figured out a way to do that? Quote All 3 1.10.8, & all 3 V2.5.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
smadell Posted January 28 Share Posted January 28 30 minutes ago, R C-R said: Naming groups (& other layers) in macro steps often makes it simpler to reselect named items later on in the macro, but it is not foolproof because I know of no way in the macro to check for duplicate layer names. Definitely not foolproof (and there is no shortage of fools…) For instance, if I have 3 layers named “Background” and I tell a macro to select the layer named “Background” I have no idea which one it will choose. Is it random? Does it search from the bottom up? the top down? The better solution is to use a name which is virtually guaranteed to be unique, even if that means going back to that layer at the end of a macro to rename it to something intelligible. (e.g., create a layer and name it “MyMacroLayer-temp01” which is quite unlikely to be otherwise present. If needed, at the end of macro recording, go back to that layer and rename it something else.) R C-R 1 Quote Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme Mac Studio with M2 Max (2023); 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 18 Link to comment Share on other sites More sharing options...
v_kyr Posted January 28 Share Posted January 28 Just give layers unique names, as is also stated in the video I referenced above (see layer namings there), as that eases macro movement recordings. - Basically all relevant here for macro recording can be seen & taken into account out of above named good old tut video. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
R C-R Posted January 28 Share Posted January 28 3 hours ago, v_kyr said: Just give layers unique names, as is also stated in the video I referenced above (see layer namings there), as that eases macro movement recordings. As discussed above, a potential problem with that is there is no way to know if a name has already been assigned to a layer. So if say a macro is run more than once on a document, it could cause the wrong layer to be selected. Quote All 3 1.10.8, & all 3 V2.5.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
smadell Posted January 28 Share Posted January 28 Comments by @v_kyr and @R C-R are correct, but the problem remains. If I create a macro solely for my own use, I have control over the naming of any existing layers as well as the layers created by the macro. However, if I create a macro and share it with others (as you know I frequently do) then I have no way to know what layer names might already exist in document(s) created by others. Therefore, any layer my macro creates is given a name that is suitably obscure, and any reference I make to existing layers is usually based on their position in the Layers stack - top, bottom, n layers above or below - and definitely not by its assumed name. Does that guarantee that layer references will always be correct? No, but it’s the best I know how to do. R C-R 1 Quote Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme Mac Studio with M2 Max (2023); 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 18 Link to comment Share on other sites More sharing options...
R C-R Posted January 28 Share Posted January 28 13 minutes ago, smadell said: Does that guarantee that layer references will always be correct? No, but it’s the best I know how to do. Hopefully, when scripting finally comes to AP this won't be a problem. Quote All 3 1.10.8, & all 3 V2.5.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
smadell Posted January 28 Share Posted January 28 5 minutes ago, R C-R said: Hopefully, when scripting finally comes to AP this won't be a problem. It will almost certainly still be a problem for me. Javascript (or, really, any coding language) and I are like oil and water. Any time I tried to script anything more complicated than HyperCard, I ended up throwing my hands up in frustration. Could I do it if I really put my mind to it? I assume so. But I don’t have the time or the determination to go down that road. Quote Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme Mac Studio with M2 Max (2023); 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 18 Link to comment Share on other sites More sharing options...
v_kyr Posted January 29 Share Posted January 29 47 minutes ago, R C-R said: Hopefully, when scripting finally comes to AP this won't be a problem. There too you would have to identify, jump, move, count (the amount of) ... etc. of the correct layers to use (aka deal with), especially for foreign docs not created by your own and with different layer structures & orders. So to some degree the same applies there then too, though it's then hopefully easier to select a certain range/amount of layers up or down from an actual selected one. - But the whole highly depends on the scripting API implementation and also to what degree then functions have been mapped & been implemented in that there then. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
R C-R Posted January 29 Share Posted January 29 12 minutes ago, v_kyr said: There too you would have to identify, jump, move, count (the amount of) ... etc. of the correct layers to use (aka deal with), especially for foreign docs not created by your own and with different layer structures & orders. So to some degree the same applies there then too, though it's then hopefully easier to select a certain range/amount of layers up or down from an actual selected one. My thinking was that scripting should at least be able to enumerate the named layers & avoid reusing any of them. Quote All 3 1.10.8, & all 3 V2.5.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
v_kyr Posted January 29 Share Posted January 29 9 hours ago, R C-R said: My thinking was that scripting should at least be able to enumerate the named layers & avoid reusing any of them. Basically app internal the layers will be already hold in some suitable & (re)orderable data structure (aka a list, queue ...), so some data structure, which can grow or shrink and also can be reordered. But of course you should be able to put/copy layers from that initial data structure also into a simpler enumerated one (let's say an array), in order to do something with the items in it. - Not sure what you mean with "avoid reusing any of them" here, as one usually want's to deal in some way with the data. But in case you meant for keeping some sort of exclusion list/array of layer items, from all available layers, that can be done, as far as you know which ones then to keep for an exclusion. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
R C-R Posted January 29 Share Posted January 29 3 hours ago, v_kyr said: Not sure what you mean with "avoid reusing any of them" here The purpose would be for not reusing any layer names already used in the document. Quote All 3 1.10.8, & all 3 V2.5.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 Link to comment Share on other sites More sharing options...
v_kyr Posted January 29 Share Posted January 29 3 hours ago, R C-R said: The purpose would be for not reusing any layer names already used in the document. Even that's possible to do (aka dealing then with the layers textual layer names), it would be inefficient to handle that code wise this textual way, as layers have code wise internally also other unique identificators like their object IDs (...here in the sense of programming lang based object IDs). So you would exclude (not use) those object IDs. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
R C-R Posted January 29 Share Posted January 29 If say the purpose is to detect/enumerate layer names, like maybe to exclude them when changing or adding new layer names, the code still has to deal with those text items, right? Quote All 3 1.10.8, & all 3 V2.5.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7 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.