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)
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme