Page 1 of 1

select across layers

Posted: Fri Jun 07, 2013 8:56 am
by otonal
is there a scriptmod that allows auto- selecting elements from all/any layers on the canvas for the layer transform and the point translate tool, without the need to always go to layers menu and select the layer first?

Re: select across layers

Posted: Fri Jun 07, 2013 12:12 pm
by Breinmeester
I did this for my multilayer magnet tool. The trick is to put the layers in an array. Next you put the points you need in an array as well which you make a property of the layer, like this:

Code: Select all

layer = moho.layer
layer.PointList = {}
Now you can recall all the layers in the array and every pointlist array from that layer when you need to do your translations, like this:

Code: Select all

for k, layer in ipairs(LayerList) do
  for i, pt in ipairs(layer.PointList) do
    --transform point
  end
end
The thing that makes this really tricky is you need to compensate for any transformations made on the several different layers. Read this thread to figure out how to do that: viewtopic.php?f=12&t=23609

Re: select across layers

Posted: Fri Jun 07, 2013 2:32 pm
by otonal
alright thx first of all
but i am not a programmer/scripter. i would not even know where to put that text ^^
it was more of a question if something is around as a mod that already does it for layer transform and point translate.

as it seems this is not the case ,so i will forward it into the request area of the forum for future updates, because this really hinders my workflow.

but for the magnetool this would be nice as well indeed. have you uploaded the finished mod anywhere?

Re: select across layers

Posted: Sun Jun 09, 2013 7:17 am
by chucky
Hey Breiny, did you finish that multilayer magnet? I would love to get a copy :D :D

Re: select across layers

Posted: Mon Jun 17, 2013 9:49 am
by Breinmeester
Yeah, i got it working. But i want to add some more features.

Re: select across layers

Posted: Tue Jun 18, 2013 3:36 pm
by otonal
8)

Re: select across layers

Posted: Tue Jun 18, 2013 4:26 pm
by chucky
No worries, I will keep an eye out for it. :wink: