Last active
October 12, 2020 21:56
-
-
Save mclavan/57673ab1e8fb634fc9e7df9bb89e766f to your computer and use it in GitHub Desktop.
This file contains 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
import pymel.core as pm | |
# Get Selection Driver and Driven(s) | |
selection = pm.ls(sl=True) | |
driver = selection[0] | |
driven = selection[1:] | |
# Transfer the UVs | |
#pm.transferAttributes(driver, driven[0], flipUVs=0, transferPositions=0, transferUVs=2, sourceUvSpace="map1", searchMethod=3, transferNormals=0, transferColors=2, targetUvSpace="map1", colorBorders=1, sampleSpace=5) | |
# Loop through driven | |
for current_driven in driven: | |
pm.transferAttributes(driver, current_driven, flipUVs=0, transferPositions=0, transferUVs=2, sourceUvSpace="map1", searchMethod=3, transferNormals=0, transferColors=2, targetUvSpace="map1", colorBorders=1, sampleSpace=5) | |
#pm.delete(current_driven, ch=1) | |
#pm.delete(driver, ch=1) | |
pm.delete(selection, ch=1) | |
# Delete history once done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment