. is it possible to 're-center' a layer after moving it around ?
. i'm working on a module that takes the layer and moves it around in a spirograph inspired patter
spX = (r1+r2) * cos(time) + p1 * cos((r1+r2) * time / r2)
spY = (r1+r2) * sin(time) + p1 *sin((r1+r2) * time / r1)
modul8.setValue('direct_layer_localPosition_x', spX, 0)
modul8.setValue('direct_layer_localPosition_y', spY, 0)
time+= (speed * .01)
. it works, with a little bit of tweaking i have a button that toggles active/not active, but, i also want to be able to click a button and re-center the layer.
. currently, my code to do this is:
modul8.setValue('direct_layer_localPosition_x', 0, 0)
modul8.setValue('direct_layer_localPosition_y', 0, 0)
. and it doesn't work! is (0,0) the wrong coordinate? or am i missing something obvious? i tried ctrl_layer_position_x/y but that didn't seem to work either.
. thanks in advance!
-james
(a nomad. )