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?
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 ?
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
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.
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.
For the mask image, I would expect something like the following.
Being able to output a mask image makes it possible to apply it to other applications.
Please consider it.
Thank you.
Copy link to clipboard
Copied
Hi,Harshika.
I made a sample and my reply with an image has been deleted!
What should I do?
Copy link to clipboard
Copied
My post has been revived.
Thank you.
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
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 ?
Copy link to clipboard
Copied
Thank you, Peter.
I'm not using the forums correctly.
I'll try to check and ask.