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

Multiple selections

Engaged ,
Nov 20, 2013 Nov 20, 2013

Copy link to clipboard

Copied

I have a white image with some black rectangles on it. The black rectanglest differ in size and number of rectangles per image. They can be selected via layermask.

In short: Does the DOM allow you to specify (a) the number of particular selections in a multiple selection and more importantly (b) are they held in an array so they each selection can be identified, isolated and then worked in in a script?

ie

select all rectangles

work out how many there are

loop over number in selection

     select rectangle

     process selection

end loop

If there isn't, then I'll have to work this out the hard way which'll involve looking over teh image pixel by pixel and identifying shapes.

TOPICS
Actions and scripting

Views

469

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
Guru ,
Nov 20, 2013 Nov 20, 2013

Copy link to clipboard

Copied

With the DOM you can check is a selection is one contiguous area with the solid property but that is about it. Rather than checking pixel by pixel you could turn the selection into a temp path. Each of the seperate selected areas will be subpaths in that temp path. The number of subpaths would tell you how many rectangles were selected and you can check the pathPoints to determine the size and position of each rectangle.

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
Engaged ,
Nov 20, 2013 Nov 20, 2013

Copy link to clipboard

Copied

LATEST

Thanks, but it might be easier to view the image data after it's been saved out as bmp. The data needs to be pixel accurate and can't have any sub pixel info which might occour from getting a new work path

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