0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?