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

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

Community Beginner ,
Mar 23, 2020 Mar 23, 2020

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?

TOPICS
Design , How to
720
Translate
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

correct answers 1 Correct answer

Community Expert , Mar 27, 2020 Mar 27, 2020

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 ?

Translate
Adobe Employee ,
Mar 23, 2020 Mar 23, 2020

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

Translate
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
Community Beginner ,
Mar 25, 2020 Mar 25, 2020

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.

Translate
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
Community Beginner ,
Mar 25, 2020 Mar 25, 2020

Hi,Harshika.

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

What should I do?

Translate
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
Community Beginner ,
Mar 26, 2020 Mar 26, 2020

My post has been revived.
Thank you.

Translate
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 ,
Mar 27, 2020 Mar 27, 2020

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

Translate
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
Community Expert ,
Mar 27, 2020 Mar 27, 2020

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 ?

Translate
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
Community Beginner ,
Mar 29, 2020 Mar 29, 2020
LATEST

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

Translate
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