Jump to content
You must now use your email address to sign in [click for more info] ×

Affinity Plugin creation / API access


Api / Sdk access  

48 members have voted

  1. 1. Do you feel Affinity should allow user to produce plugins and features for their products

  2. 2. What do you think about a plugin store for Affinity Products



Recommended Posts

Good day,

I will like to add this suggestion to the team of affinity developers. Can you guys give users access to an api or sdk so we can create plugins just for affinity. If this is made available to users, affinity will get more market ground at pull more creators, companies, freelance developers and school to the affinity products.

I teach in a American University of Nigeria, and am pulling my students from adobe to affinity.

Many have been asking for plugins and Ux related stuffs. I have ideas of plugins that will help UX designers to move to AD.

Please answer this request.

Thanks and have a wonderful day.

@stokerg @admin @Adam

Link to comment
Share on other sites

  • 1 month later...

Affinity Team have to learn from bigger players like Adobe. It is how Adobe resolve issue [Official script guide fro 2019 year]

Adobe make tree language to use: JavaScript, VBA and AppleScript. I wrote in my post here about REST API. My aproach is more universal and not limited to OS, programming language and platform. Affinity Team can use this aproach to share multisystem graphics to share and access programs fx. in LAN. It is only example. For people who don't know here is video with basic explanation what is REST API. I use Awasu news reader and it is inbuild REST API. Using call via link I can get fx. example Awasu to front of anothers applications, update things and get data.

For some automatication using only calls from file user can control Affinity applications in matter:

url one

url two

...

url n

fx.

localhost:8000/ad/open?file="logo.afdesigner"

localhost:8000/ad/draw/rectangle?height=200&width=300&posX=23&posy=100

localhost:8000/ad/export/slices/all

On Windows add this tree lines with word 'start' before them in notepad to new file, save as macro_affinitydesigner.cmd and in style:

start localhost:8000/ad/open?file="logo.afdesigner"

start localhost:8000/ad/draw/rectangle?height=200&width=300&posX=23&posy=100

start localhost:8000/ad/export/slices/all

you have working macro. In Affinity you can add this in fx. special "Macro" menu and Affinity application will be run from menu in the same way that you will click on them on desktop. In Photoshop is calling Actions as you can see on this example video. One the way for that is write in seperate windows API call which you can simply copy and paste. Using API you can add extra parameters like dimensions from variables. It is when it start difference.

Where is difference?

Macro system is based on specific commands / language and it is a Photoshop way. API REST is oriented on client - server. Client is what you use to open link and adjust parameters on them. Server is application with reaction on this fx. browse this forum and check how differences in links switch make post, show another subforum etc. It is the same, but in place showing part of Affinity forum you use menu / command inside Affinity application.

 

Link to comment
Share on other sites

  • 2 weeks later...

I want to chip in regarding this topic.

I have written numerous stuff including an article of using Scribus as a semi Indesign Server replacement and that using Scribus CLI scripts (https://wiki.scribus.net/canvas/Command_line_scripts). It's unbelievable how many mails I get from professors, companies, students... that are looking for these kind of solutions.  Like how people want to have Adobe alternatives, they also want to have automation alternatives.... Scribus does work in this regards but its not as good and user friendly as the affinity Products.

Another example I want to give is how I worked for a big Belgian ecommerce site that painstakingly by hand needed to modify product pictures. I automated the whole thing using Adobe Scripting and saved the company thousands of euros. And while Affinity Designer for the graphical tasks is certainly a replacement that they could use, if they made the switch they would again manually by hand modifying the product pictures... Really don't underestimate how important this feature can be for some companies.  

Link to comment
Share on other sites

  • 9 months later...
  • 3 years later...

After having searched in vain, I think this thread is relevant enough to get a bump.  I recently wrote a freeware Photoshop plugin using Adobe's ancient and hard-to-use plugin SDK.  If I had known how to write Affinity Photo plugins, I would probably have done so instead.  Opening up for customer plugins could kickstart an entire community around writing new plugins - both free and commercial ones depending on what various developers decide to do.  And this would in turn make Affinity Photo even more attractive.

Now, I'm not the world's best C++ developer, so I would probably need to see the source code for an example plugin in order to pull that off.  So I suggest putting an Affinity Photo add-on on github or similar site.  If it does the following, I believe it would be enough to help devs like me getting started:

1) Adjusting saturation (which would show how to access several color channels at once).

2) Doing a crude blur (which would show how to reach neighbouring pixels).

3) Demonstrate how to make labels, sliders and how to preview the changes the plugin does.

Link to comment
Share on other sites

2 minutes ago, JoaCHIP said:

After having searched in vain, I think this thread is relevant enough to get a bump.  I recently wrote a freeware Photoshop plugin using Adobe's ancient and hard-to-use plugin SDK.  If I had known how to write Affinity Photo plugins, I would probably have done so instead. 

Many Photoshop plugins "just work" in Affinity Photo. Make sure you end up with a .8bf file (for Windows), and don't use anything too new in PS, and there's a good chance yours will, too.

-- 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

It doesn't work that well, and I haven't figured out why.  Generally I haven't had much luck with Affinity's photoshop plugin loader with either my own plugin or others.

And because of how ancient and horrible Photoshop's plugin API is, chances are slim that I'll ever figure this out.  We really should get rid of it.  I'm sure the code quality of Affinity is better, considering that a it's something like a quarter of a century newer.

Link to comment
Share on other sites

7 minutes ago, JoaCHIP said:

It doesn't work that well, and I haven't figured out why.  Generally I haven't had much luck with Affinity's photoshop plugin loader with either my own plugin or others.

And because of how ancient and horrible Photoshop's plugin API is, chances are slim that I'll ever figure this out.  We really should get rid of it.  I'm sure the code quality of Affinity is better, considering that a it's something like a quarter of a century newer.

You might take a look at G'MIC, and the G'MIC Plugin (Windows), which are Open Source and should provide a good model for things you might want to do.

-- 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

G'MIC (file name: GmicPlugin.8bf) also appears to be using Photoshop's plugin API in order to achieve some degree of compatibility with Affinity Photo.

I'm requesting a way to write plugins directly for Affinity Photo's native API rather than something else.

Link to comment
Share on other sites

24 minutes ago, JoaCHIP said:

I'm requesting a way to write plugins directly for Affinity Photo's native API rather than something else.

There is no "native API" at the moment. Other than the Photoshop Plug-in API, there is no API at all, today.

One will come, someday.

-- 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

  • 1 year 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.