Created
March 15, 2017 17:13
-
-
Save pmolodo/e920bd1fa8b6d5c2345dc32369bda4f5 to your computer and use it in GitHub Desktop.
Example of using MeshFace.getUVAtPoint()
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 | |
pm.newFile(f=1) | |
cube = pm.polyCube()[0] | |
face = cube.f[4] | |
pos = pm.dt.Point(.76, .2, -.15) | |
# the loc isn't necesary, but gives a nice visual indicator of the point we're querying | |
loc = pm.spaceLocator() | |
loc.translate.set(pos) | |
print face.getUVAtPoint(pos, "world", "map1") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment