Highlighted

[Design]-CreateRenditions mask layer will output a transparent image in XD.

Community Beginner ,
Mar 23, 2020

Copy link to clipboard

Copied

Hello.
We're creating an exporter to Unity.
The output of the mask group.
It's not a masked image, it's a
I want to output a mask layer and an image layer separately.

You can add a mask layer to the API's CreateRenditions
The result is a transparent image.

Is this the expected behavior?
Is there a way around this?

Adobe Community Professional
Correct answer by Peter Villevoye | Adobe Community Professional

This is typically not a quesion for a user forum like this.

However, your question/request is very clear and simple.

Have you checked it at https://adobexdplatform.com ?

TOPICS
Design, How to

Views

197

Likes

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

[Design]-CreateRenditions mask layer will output a transparent image in XD.

Community Beginner ,
Mar 23, 2020

Copy link to clipboard

Copied

Hello.
We're creating an exporter to Unity.
The output of the mask group.
It's not a masked image, it's a
I want to output a mask layer and an image layer separately.

You can add a mask layer to the API's CreateRenditions
The result is a transparent image.

Is this the expected behavior?
Is there a way around this?

Adobe Community Professional
Correct answer by Peter Villevoye | Adobe Community Professional

This is typically not a quesion for a user forum like this.

However, your question/request is very clear and simple.

Have you checked it at https://adobexdplatform.com ?

TOPICS
Design, How to

Views

198

Likes

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
Mar 23, 2020 0
Adobe Employee ,
Mar 23, 2020

Copy link to clipboard

Copied

Hi there,

 

I am sorry I am unable to understand the issue you are facing. Is it possible for you to elaborate more about it with the help of a short video of your workflow for better understanding?

 

I will try my best to help.

 

Thanks,

Harshika

Likes

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
Reply
Loading...
Mar 23, 2020 0
Community Beginner ,
Mar 25, 2020

Copy link to clipboard

Copied

Hello, Harshika.
Created a sample.

 

A mask-group consists of four colored boxes and a mask image of a circle.

キャプチャ.PNG

 

Following plugin to output the image.
Outputs an image of the children of the selected group.

 

 

async function pluginRenditionChildren(selection, root) {
  const outputFolder = await fs.getFolder()

  if (!outputFolder) return console.log('User canceled folder picker.')

  let renditionOptions = []
  const length = selection.items[0].children.length
  for (let i = 0; i < length; i++) {
    const item = selection.items[0].children.at(i)
    const fileName = item.name + '.png'
    const file = await outputFolder.createFile(fileName, {
      overwrite: true,
    })
    renditionOptions.push({
      fileName: fileName,
      node: item,
      outputFile: file,
      type: application.RenditionType.PNG,
      scale: 1,
    })
    console.log(fileName)
  }

  const results = await application
    .createRenditions(renditionOptions)
    .catch(error => {
      console.log('exception:' + error)
      // https://forums.adobexdplatform.com/t/details-for-io-failed/1185/14
      // https://helpx.adobe.com/xd/kb/import-export-issues.html
      console.log(
        '1)access denied (disk permission)\n2)readonly folder\n3)not enough disk space\n4)maximum path\n5)image size 0px',
      )
    })
  console.log('done.')
}

 

 

 

The output image is as follows.

キャプチャ.PNG

For the mask image, I would expect something like the following.
キャプチャ.PNG

Being able to output a mask image makes it possible to apply it to other applications.

Please consider it.
Thank you.

Likes

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
Reply
Loading...
Mar 25, 2020 0
Community Beginner ,
Mar 25, 2020

Copy link to clipboard

Copied

Hi,Harshika.

I made a sample and my reply with an image has been deleted!

What should I do?

Likes

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
Reply
Loading...
Mar 25, 2020 0
Community Beginner ,
Mar 26, 2020

Copy link to clipboard

Copied

My post has been revived.
Thank you.

Likes

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
Reply
Loading...
Mar 26, 2020 0
Adobe Employee ,
Mar 27, 2020

Copy link to clipboard

Copied

Thanks for sharing the sample. As Peter rightly said, XD platform of developers is a right place for you to ask your query. 

 

Regards,

Harshika

Likes

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
Reply
Loading...
Mar 27, 2020 1
Adobe Community Professional ,
Mar 27, 2020

Copy link to clipboard

Copied

This is typically not a quesion for a user forum like this.

However, your question/request is very clear and simple.

Have you checked it at https://adobexdplatform.com ?

Likes

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
Reply
Loading...
Mar 27, 2020 2
Community Beginner ,
Mar 29, 2020

Copy link to clipboard

Copied

Thank you, Peter.
I'm not using the forums correctly.
I'll try to check and ask.

Likes

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
Reply
Loading...
Mar 29, 2020 0