Jump to content

Recommended Posts

Posted

Hi,

I can't find answers to this question on the affinity website, so I'd appreciate any guidance.

I'm a developer using Affinity Designer for artwork creation for a game. I have a bunch of assets, and I need to separate out the various named layers in the assets into different files for 1x, 2x and 3x, so they can be layered back together in the game. I also need to do some simple operations on export, like applying filters, setting fill colours...etc. The thought of sitting down and performing the monotonous task of hiding layers, setting properties and clicking export for potentially hundreds of files is daunting, and I'd like to avoid a manual task wherever possible.

Obviously my initial thought as a developer is that surely this is scriptable - I should be able to write a simple Python script (or AppleScript), that could automate the process quite easily. I had a quick search around the .app bundle on MacOS, and couldn't find the the sdef Scripting Definitions file, so I guess AppleScript is not supported, but I can't imagine a professional app like this wouldn't support something like Python?

Is there a scripting API that will allow to me to execute simple editing and export steps on a batch of layers? If there is, could someone point me in the direction of the documentation?

Thanks!
-Matt

Posted
3 hours ago, Matt Cox said:

I can't find answers to this question on the affinity website

https://www.google.com/search?q=Scripting%2FSDK+in+Affinity+Designer+site%3Aforum.affinity.serif.com

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
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.

Posted
7 hours ago, BofG said:

Maybe there's something on MacOS similar to Auto HotKey for Windows?

There are some similar tools for keyb & mouse macros and automation etc. available ...

☛ 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

  • 7 months later...
  • 5 months later...
Posted
2 hours ago, vikram said:

Why can't Python be integrated into this outstanding software?

It could be but who knows how much of the code base would have to be reworked for that to actually happen? As it is, we don't even have macro support at all in AD & only very limited support in AP.

All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

  • 1 year later...
Posted

I asked chatGPT does affinity designer support scripting. This is the answer:

 

Quote

Yes, Affinity Designer supports scripting. Affinity Designer has a scripting language called "Affinity Script" which is based on JavaScript. Affinity Script allows you to automate repetitive tasks and create custom workflows within the application. You can access the Affinity Script editor from the "File" menu under "Scripts" > "Edit Script…".

In addition, Affinity Designer also supports AppleScript on macOS, which allows you to automate tasks and interact with other applications on your Mac. You can access the AppleScript editor from the "File" menu under "Scripts" > "Open Scripts Folder" > "Affinity Designer" > "AppleScript Editor".

There are also third-party scripting tools and libraries available for Affinity Designer, such as the Affinity Script Library and the Affinity Script Toolkit, which can help you create more advanced scripts and workflows.

Seems like that's some other affinity designer then?

Posted
1 hour ago, tototomo said:

I asked chatGPT does affinity designer support scripting. This is the answer:

 

Seems like that's some other affinity designer then?

chatGPT lies that the beams bend! 😂 So not so clever after all, the AI😁

MAC mini M4 | MacOS Sequoia 15.2 | 16 GB RAM | 256 GB SSD 
AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB  | 32 GB DDR4 3200MHz | Windows 11 Pro 24H2 (26100.2605)

Affinity Suite V 2.5.7 & Beta 2.6 (latest)
Interested in a free (selfhosted) PDF Solution? Have a look at Stirling PDF

Ferengi Acquisition Rule No. 49: “A deal is a deal is a deal.”

Posted
1 hour ago, tototomo said:

I asked chatGPT does affinity designer support scripting.

 

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
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.

Posted (edited)
22 hours ago, tototomo said:

I asked chatGPT does affinity designer support scripting. This is the answer:

Seems like that's some other affinity designer then?

Quote

Yes, Affinity Designer supports scripting. Affinity Designer has a scripting language called "Affinity Script" which is based on JavaScript. Affinity Script allows you to automate repetitive tasks and create custom workflows within the application. You can access the Affinity Script editor from the "File" menu under "Scripts" > "Edit Script…".

In addition, Affinity Designer also supports AppleScript on macOS, which allows you to automate tasks and interact with other applications on your Mac. You can access the AppleScript editor from the "File" menu under "Scripts" > "Open Scripts Folder" > "Affinity Designer" > "AppleScript Editor".

There are also third-party scripting tools and libraries available for Affinity Designer, such as the Affinity Script Library and the Affinity Script Toolkit, which can help you create more advanced scripts and workflows.

There was a brief disagreement about AppleScript maybe not being used on this forum which makes this screenshot particularly poignant and hilarious. So maybe ChatGPT scrapes the forums and spreads naughty gossip this way.

I don't know how it would've burped out the File Menu context/instructions, though. That one had me stumped. Except I did come up with a half-baked theory (edit: in other words, a joke) on my own that maybe someone at Serif tech support was feeling the intense heat of a chatbot potentially replacing their jobs and decided to sabotage ChatGPT by feeding it gobbledygook. We know the staff are extra mischievous, given the prevalence of cat avatars. Though in my not humble opinion, ChatGPT is a silly gimmick, not a serious tool and thus it's best not to overthink it. Also, I saw a few AI generated videos depicting Sailor Moon as a 80's live action and I once made a couple of images through an AI portrait website by clicking through options and was quickly bored. Therefore I've concluded in life, AI is mostly overrated.

(Edit) The other theory, but a lot less likely imv but never improbable, is that someone in development is feeding it these prompts in advance before scripting is announced. It is weirdly specific. See two posts below

Edited by debraspicher
For clarity, just in case..
Posted
1 hour ago, Komatös said:

chatGPT lies that the beams bend! 😂 So not so clever after all, the AI😁

I think it got confused with "other" famous illustration software

  • Staff
Posted
14 hours ago, debraspicher said:

(Edit) The other theory, but a lot less likely imv but never improbable, is that someone in development is feeding it these prompts in advance before scripting is announced. It is weirdly specific.

As a member of the team working on scripting, I can assure you we are not feeding any kind of AI with prompts

Posted
6 hours ago, Tim France said:

As a member of the team working on scripting, I can assure you we are not feeding any kind of AI with prompts

And I wouldn't expect that, really. The only reason I would put it anywhere near a remote possibility is because tech companies are known for having a quirky sense of humor. So maybe it was put in as an Easter egg (I mean it is almost Easter...) ahead of something literally about to launch to prepare. However, if it can be fed false information that easily (I don't use ChatGPT, so I don't know), then that defeats the point of asking it tech support questions in the first place.

Posted

LOL, a good April Fool's joke!

Well, AI systems like ChatGPT (Bard etc.) are built on typical large language models, so a machine-learning technique that uses a large body of available texts, for example such as Wikipedia and the like. In simple terms, these models figure out (via web crawlers and AI-bots) what word is likely to come next, given a set of words or a phrase. In doing so, they are able to generate sentences, paragraphs and even pages that correspond to a query from a user. - So it's no surprise (at least for me) that ChatGPT mixed up the whole sense here. 😀

☛ 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

Posted
1 hour ago, v_kyr said:

LOL, a good April Fool's joke!

The fact that ChatGPT and similar technologies have made huge progress does not mean that one should no longer use one's own mind.
Which I fear will happen in many cases, and confidence in the information provided will be boundless. As they say in our country "Důvěřuj, ale prověřuj" (Trust, but Verify).

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
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.

Posted
5 hours ago, Pšenda said:

Which I fear will happen in many cases, and confidence in the information provided will be boundless.

That will happen either way! - AI based tools are only as good as their routines and training materials are, so the stuff they are overall feeded with, which for some areas/fields has to be immense (very extensive) in order to somehow give quite good usable or correct results. Actually a lot of AI crawlers & bots are spreading over the net as it's lastely a hyped theme. So every bigger and smaller company is actually trying to make out something out of that AI hype.

Of course the whole has (as always) it's pros & cons, dependend from which side of the coin you look at it!

For Affinity first of all a "Scripting/SDK", aka a reusable dev API & some bound, powerful scripting language is needed, before thinking at all about other pompous things here.

☛ 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

Posted
3 minutes ago, v_kyr said:

For Affinity first of all a "Scripting/SDK", aka a reusable dev API & some bound and powerful scripting language is needed, before thinking at all about other pompous things here.

Personally, I think what is by far the most needed thing for Affinity is much more attention given to fix the multitude of bugs before adding any new features, particularly those that might affect the reliability/stability/usefulness of any of the many new features users want to see added.

All 3 1.10.8, & all 3 V2.5.7 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Posted
3 minutes ago, R C-R said:

Personally, I think ...

That goes without saying, usually one shouldn't try to build new solid things on a flawed basis. - However it will show which route they will go here.

☛ 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

  • 4 months later...
Posted
2 hours ago, フィリップ said:

If only it were true...

Haha, if it would say 1 Apr 2020, then I would say a good (or sad) April Fool's joke, but for that indicated date there, these are instead possibly some greetings from Google Bard !

☛ 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

Posted
On 8/2/2023 at 11:08 PM, v_kyr said:

from Google Bard

It seems that one "intelligence" copying from another - even if it is complete nonsense 🙂 

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.7.2948 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 24H2, Build 26100.2605.
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.

Posted
On 8/2/2023 at 2:14 PM, フィリップ said:

This is now the top result in Google 🙄. If only it were true...

Can you get the complete URL for that post that it's quoting from? Then we can see where it found it.

-- 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.2.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

  • 6 months later...

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...
×
×
  • Create New...

Important Information

Terms of Use | 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.