• Transparency mask not taken into account when using PathItem.translate()???

Contributor ,
Jul 04, 2019

Copy link to clipboard

Copied

Hello -

I won't explain all the "process" or the reason why I'm using a script for this, but…

I made a script to moving a manually saved selection via "PathItem.translate()".

Until now, I though that everything works like a charm.

Until a colleague of mine told me that "transparency mask" where not moved!  Even they where part of the selection.

If I do the operation manually (ie. moving the selection), everything is moving.

When I do it via scripting, well looks like the transparency masks are leaved on their original location. all the rest is moved.

NB. Of course they linked, not "locked", …

The line of code:

pgItem.translate( 50, 0 );

Any idea why?

Thank you,

- Dimitri

transparencyMask.jpg

TOPICS
Scripting

Views

1.5K

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

• Transparency mask not taken into account when using PathItem.translate()???

Contributor ,
Jul 04, 2019

Copy link to clipboard

Copied

Hello -

I won't explain all the "process" or the reason why I'm using a script for this, but…

I made a script to moving a manually saved selection via "PathItem.translate()".

Until now, I though that everything works like a charm.

Until a colleague of mine told me that "transparency mask" where not moved!  Even they where part of the selection.

If I do the operation manually (ie. moving the selection), everything is moving.

When I do it via scripting, well looks like the transparency masks are leaved on their original location. all the rest is moved.

NB. Of course they linked, not "locked", …

The line of code:

pgItem.translate( 50, 0 );

Any idea why?

Thank you,

- Dimitri

transparencyMask.jpg

TOPICS
Scripting

Views

1.5K

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
Jul 04, 2019 0
Adobe Community Professional ,
Jul 04, 2019

Copy link to clipboard

Copied

that's a known issue, check this thread for a solution

Re: Scripts Don't Move Opacity Masks

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...
Jul 04, 2019 1
Contributor ,
Jul 04, 2019

Copy link to clipboard

Copied

Hey Carlos -

Thank you for your answer.

W0W now that's a piece of code just to be able to move an "opacity/transparency mask"  :-0

Do I really have to embed all this code to "force" Illustrator to take into account a small opacity/transparency mask (when I'm scripting)?

Thank you for your upcoming feedback.

Regards,

- Dimitri

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...
Jul 04, 2019 0
Adobe Community Professional ,
Jul 05, 2019

Copy link to clipboard

Copied

the short answer is yes, you have to use all those lines of code to move small or big opacity masked objects.

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...
Jul 05, 2019 0
Adobe Community Professional ,
May 09, 2020

Copy link to clipboard

Copied

Hi, 

This thread does not link to the solution now. Is it moved or updated?

 

Thanks

Best regards

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...
May 09, 2020 0
Adobe Community Professional ,
May 09, 2020

Copy link to clipboard

Copied

unfortunately all of the old threads didn't make it to the new forum format. Let me alert employees to try to get it back.

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...
May 09, 2020 0
Adobe Community Professional ,
May 09, 2020

Copy link to clipboard

Copied

Yes, that will be great for future reference too and new comers to the forums.

 

Thanks

Best regards

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...
May 09, 2020 1
Adobe Community Professional ,
May 10, 2020

Copy link to clipboard

Copied

Yes, we surely wish to ressurect a lot of these useful links. Especially this opacity mask one, a prime example of a post you wish to use as a link because by this time if I had to answer a new question from scratch, I'd need to be paid for the time it would take! 🤑

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...
May 10, 2020 0
Adobe Community Professional ,
May 10, 2020

Copy link to clipboard

Copied

Hi,

You are right.

Just a thought, let's create a new post where we can add old broken links so that we have a list (may eb separate for each product or same thread) and alert employees for the same. Because I go through many broken link and it is difficult to remember all. So we all can add all broken links to that posts. 

 

Thanks

Best regards

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...
May 10, 2020 0
Resources