strands.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:mayakit 作者: danbradham 项目源码 文件源码
def add_curve_to_system(curve_shape, hair_system=None):

    if hair_system is None:
        selection = cmds.ls(sl=True, dag=True, leaf=True, type='hairSystem')
        if selection:
            hair_system = selection[0]
        else:
            hair_system = create_hair_system()

    follicle_nodes, out_curve_nodes = curve_to_hair(curve_shape, hair_system)
    follicles_grp = hair_system + 'Follicles'
    if not cmds.objExists(follicles_grp):
        cmds.group(empty=True, name=follicles_grp)
    cmds.parent(follicle_nodes[0], follicles_grp)

    outcurves_grp = hair_system + 'OutputCurves'
    if not cmds.objExists(outcurves_grp):
        cmds.group(empty=True, name=outcurves_grp)
    cmds.parent(out_curve_nodes[0], outcurves_grp)

    return follicle_nodes
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号