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で全てのNURBS Curvesをセットに追加する

Posted at
import maya.cmds as cmds

def create_nurbs_curve_set(set_name):
    if not cmds.objExists(set_name):
        cmds.sets(name=set_name, empty=True)

def add_nurbs_curves_to_set(set_name):
    curves = cmds.ls(type="nurbsCurve")
    if curves:
        for curve in curves:
            cmds.sets(curve, add=set_name)

def main():
    set_name = "Sets"
    create_nurbs_curve_set(set_name)
    add_nurbs_curves_to_set(set_name)

if __name__ == "__main__":
    main()
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?