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()
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