Skip to content

Instantly share code, notes, and snippets.

@ivogrig
Created August 17, 2015 09:25
Show Gist options
  • Save ivogrig/f207cdd94b07a8f7ca95 to your computer and use it in GitHub Desktop.
Save ivogrig/f207cdd94b07a8f7ca95 to your computer and use it in GitHub Desktop.
How to set curve endpoints with the TD SDK
import modo
# By not passing an item when initializing the Mesh object,
# it will use the selected if any
curve = modo.Mesh()
# Iterate the curve polygons and activate the endpoints
for polygon in curve.geometry.polygons.iterCurves():
polygon.accessor.SetFirstIsControlEndpoint(1)
polygon.accessor.SetLastIsControlEndpoint(1)
# Update the mesh to see the change
curve.geometry.setMeshEdits()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment