Jump to content

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.  

Share this post


Link to post
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

Share this post


Link to post
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.


Affinity Photo 1.6.7 & Affinity Designer 1.6.1; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.6.11.85 & Affinity Designer 1.6..4.45 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.1.1

Share this post


Link to post
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?

Share this post


Link to post
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.


Affinity Photo 1.6.7 & Affinity Designer 1.6.1; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.6.11.85 & Affinity Designer 1.6..4.45 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.1.1

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×