Created
May 9, 2021 23:19
-
-
Save GainDeveloper/cb8c9097c251332fa0c46301c5c18085 to your computer and use it in GitHub Desktop.
Takes Y axis diff of a morph and saves it as V in secondary UVs.
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 modo | |
from mlFoundation import mlMath | |
mesh = modo.Mesh() | |
uvmap = mesh.geometry.vmaps.uvMaps[1] | |
morphMap = mesh.geometry.vmaps.morphMaps[0] | |
with mesh.geometry as geo: | |
for vertex in geo.vertices: | |
yPos = 0 | |
morphPos = morphMap[vertex.Index()] | |
if morphPos is not None: | |
yPos = morphPos[1] | |
vertex.setUVs((0, yPos), uvmap=uvmap) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment