LoginSignup
0
0

python maya create nurbs curvs and at to control sets

Posted at
import maya.cmds as cmds

def create_nurbs_curve(name):
    # Create a NURBS curve
    curve = cmds.curve(d=1, p=[(-1, 0, 0), (1, 0, 0)], k=[0, 1], name=name)
    return curve

def add_to_control_set(curve, control_set):
    # Add the curve to the control set
    cmds.sets(curve, add=control_set)

# Create a control set
control_set = cmds.sets(name="body")

# Create NURBS curves
curve1 = create_nurbs_curve("Curve1")
curve2 = create_nurbs_curve("Curve2")

# Add curves to the control set
add_to_control_set(curve1, control_set)
add_to_control_set(curve2, control_set)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0