Skip to main content
Participant
December 1, 2022
Question

after effects jsx reset position

  • December 1, 2022
  • 1 reply
  • 203 views

I need a quick way to reset the position of a selected layer to 0,0.
I found this jsx script:
https://github.com/kyletmartinez/After-Effects-Scripts/blob/bb0c5f7ce7584457fc8c58bb070c37e15f86918d/scripts/Zero%20Position.jsx

which zero’s the position but creates a null to do so.

*I just want to change the x and y values back to 0 like a reset position function*

(Its for a character rig / head rotation layer that I constantly need to reset to 0 so i can make changes to the default position of the head and then move the x y coordinates to see if the change was successful.)
I can then add this .jsx file to a kbar icon and then it would be super fast fixing my character rigs in the future.

thank you and it would save me so much time if someone had a solution. not much of a coder but can copy paste and understand with trial and error.

This topic has been closed for replies.

1 reply

Justin Taylor-Hyper Brew
Community Expert
Community Expert
January 27, 2023

This snippet will reset Position, Scale, and Rotation:

https://gist.github.com/justintaylor-dev/22e08f36325c84e615169b4c354ba7f8

 

If you wanted to reset the position values to 0 instead of the center of the comp, swap out center with [0,0], and both center[0] and center[1] with 0.