Jump to content
Our response time is longer than usual currently. We're working to answer users as quickly as possible and thank you for your continued patience.

Recommended Posts

I’m trying to record a macro that will resize the canvas from the center by adding a specified amount on each side.
 
Started Recording:
Used my shortcut for Resize Canvas
Clicked on Center for the Anchor
Clicked on the Lock to open it
Clicked in the right side of the width box and entered +1.5
Clicked in the right side of the height box and entered +1.5
Clicked on Resize
Stopped Recording:
Saved to Library
 
And when I click on it in the Library, nothing happens.  What am I doing wrong?  What am I not understanding about the process?

Link to comment
Share on other sites

  • Moderators

Hi LilleG,

 

It's working as expected as the Macro is remembering the size of the canvas after adding 1.5 to the width & height. So if you was to then start a new document with a different size and run the saved macro it will resize to the same size as the original one used to record the macro.

 

As macros continue to be developed, more new features will be added over time.

Link to comment
Share on other sites

Hmmm, what I really expected was for the macro to remember the process, not the result.  I don't really want to repeat the exact result; I want to repeat the process in order to continue to expand the canvas as I add multiple borders.  

 

Ah, LilleG, you've come up with another weird one! You are the master-ess of wanting to do really logical functions, only to find out that illogical was the design key!  :lol: :lol: Why in the world would you ever think that a macro should be usable for various documents?  :lol: :lol:

 

Like you, if I wanted a canvas to always be resized to, say, 800 x 800, I would tell the macro to do that. I wouldn't tell it to add 1.5 to each side! Of course, as a Yank, I guess I just don't have the same thought-patterns as those on the east side of the Atlantic. :lol: :lol:

♥  WIN 10 AD & AP  ♥  Lenovo Legion Y520 15.6" Laptop

Link to comment
Share on other sites

Clicked in the right side of the width box and entered +1.5

Clicked in the right side of the height box and entered +1.5

As you may have noticed, when you entered those values, the resulting expressions were converted to numbers before you clicked on Resize. (If not, try it without recording a macro, & tab back & forth between the two fields before clicking on Resize.) So that is what the macro recorded: the numbers, not the expression.

 

For this to do what you want, Resize Canvas would have to retain the expressions instead of converting them to numeric values. Since it does not, the logic is sound, even though it is not what you want or expected.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Is there any way to have it retain the expression then?  Or should I just forget about Macros being useful in this context?  Surely there is a way to record a Macro to do away with a scut-work process that I repeat with every photo I finish.  What am I overlooking?

Link to comment
Share on other sites

I don't know of any way to prevent any of the fields that accept expressions from converting them to numbers before they are applied to the work. I am fairly sure this would require substantial changes to the code, including some way of retaining the expression in some kind of document unit independent format (so if the document units were changed from say pixels to centimeters the expression would still have the same meaning & work the same way in a macro). This in turn would almost certainly require yet another change in the file format, somewhat like the changes that made the 1.4.x file format incompatible with the 1.5.x one.

 

Currently, the macro function is just a very basic recorder. It does not in itself support logical or computational operations like evaluating expressions or conditionals, or variables, or anything else that a full featured macro programming language could do. That may come later but it is not a trivial task to add that to the app.

All 3 1.10.6, & all 3 V2.03 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.6; Affinity Designer 1.10.6; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

I would be happy if I could create a Macro that would just let me activate Resize Canvas, set the Anchor (center), set the format? (inches) and open the lock.  But once Resize Canvas is active, I can no longer access the Macro function to stop recording.  Oh well, maybe we will eventually have "sticky settings" for all user options and that will no longer be needed.

Link to comment
Share on other sites

  • 1 year later...
On 1/18/2017 at 11:21 PM, R C-R said:

I don't know of any way to prevent any of the fields that accept expressions from converting them to numbers before they are applied to the work. I am fairly sure this would require substantial changes to the code, including some way of retaining the expression in some kind of document unit independent format (so if the document units were changed from say pixels to centimeters the expression would still have the same meaning & work the same way in a macro). This in turn would almost certainly require yet another change in the file format, somewhat like the changes that made the 1.4.x file format incompatible with the 1.5.x one.

 

Currently, the macro function is just a very basic recorder. It does not in itself support logical or computational operations like evaluating expressions or conditionals, or variables, or anything else that a full featured macro programming language could do. That may come later but it is not a trivial task to add that to the app.

Hi,

System engineers have solved the problem since it works for resizing the document, where you have to enter + = 20 for example to increase the current size by 20 pixels. And so we can make a macro usable for any size of document.
So why does not it work in the case of canvas?

 

Best regards

 

Pk

Link to comment
Share on other sites

  • 3 years later...

This bug still exists in 2022(?!) — when recording a macro and resizing, unless both X and Y fields are set expressly, the proportion based on the single X or Y value entered should be recorded, not simply the calculated end values.

Link to comment
Share on other sites

12 hours ago, cleay said:

proportion based on the single X or Y value entered should be recorded, 

I think what you really mean is that the macro should record the Expression entered in the size boxes rather than the final, calculated result.

I do agree that this would be a highly desireable property of Affinity macros.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

Yep correct. FWIW, after a LOT of trial and error I managed to work around this by splitting the macro and exporting twice. The first export with a height (but no width) entered in the 'New Batch Job' window, then running the second on the resulting images.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.