• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adobe Xd API question

New Here ,
Jul 08, 2021 Jul 08, 2021

Copy link to clipboard

Copied

Hello Adobe XD Community,
 
Appreciate if you can help me with the following:
What we want to achieve:
We have an image that the user has added to the design. We have applied a filter and want to fill the image with the modified pixels. 
 
We are following the example in "https://adobexdplatform.com/plugin-docs/reference/ImageFill.html" but it does not work.
Basically what we do is 
1. changing it to base64
2. apply filter
3. fill the image with base64 again.
 
The error we receive is "Error: Panel plugin edits must be initiated from a supported UI event".
 
It's the part of our code:

 

let imageFile = await xhrBinary(url, src, type, node.width, node.height)
// Create ImageFill for this image
const ImageFill = require("scenegraph").ImageFill;
let fill = new ImageFill(imageFile);
selection.items = node
selection.items[0].fill = fill;

 

Views

213

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

LATEST

Hi Kartoon,

 

Thanks for reaching out. We have a separate forum for plugins, please post your query here https://forums.adobexdplatform.com/ with sufficient details.

 

Regards

Rishabh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines