Created
August 31, 2024 07:55
-
-
Save justsh/bae7d098c221d20b173ed2a033213047 to your computer and use it in GitHub Desktop.
Move an object's pivots to the world position of a second object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import print_function | |
| import pymel.core as pm | |
| driver, driven = pm.selected() | |
| # NOTE: PyNode.Attribute.rotatePivot.set() may be equivalent | |
| pm.move(driven.rotatePivot, *driver.getTranslation(worldSpace=True)) | |
| pm.move(driven.scalePivot, *driver.getTranslation(worldSpace=True)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment