Script - is there a way to get the index and / or name of the layer where the script is loaded?

I played a bit with the script, and I love to be able to animate parameters of a layer/

In my case I animate the layer just below the layer with the script. It might be so useful to be able to just specify the layer relative to its position relative to the one with the script.

So I'm looking to found the index of the layer with the script to be able to add +1 to specifiy the layer I want to animate. But I'm not sur how to do.

something like : getLayerIndex(me)

Any thought?

Comments

  • Hello @deuzair,

    Sorry, there is no such a function.

    This is not exactly what you are asking, but we worked on a feature for the scripts : adding parameters. For exemple, it could be the name or the index of the layer your script is targeting.

    Best. Philippe

  • Hi Philippe,

    That would do the trick for what I'm looking for. Even better if we could use a list as arguments / parameters, and parse it, or a float, or a dict etc…

    thank you

    renaud

Sign In or Register to comment.