maya里用Python添加表达式

之前为头发动力学做的属性关联的表达式记录一下

import maya.cmds as mc

all = mc.ls(sl=1)

hairsystem = all[0]

control = all[1]

ep_name = all[0]+"_EP"

mc.expression(s = """%(aa)s.solverDisplay = %(bb)s.chainCollideGround; \n
%(aa)s.simulationMethod = %(bb)s.DYNAMIC; \n
%(aa)s.startCurveAttract = %(bb)s.chainStartCurve; \n
%(aa)s.mass = %(bb)s.chainGravity; \n
%(aa)s.collideWidthOffset = %(bb)s.chainWidthExtremity;"""
%{'aa':hairsystem,"bb":control},o = hairsystem,  n = ep_name,  ae=1,uc = "all")

上一篇:APP分发系统源码 全开源超级签名系统源码 附带详细部署文档


下一篇:【云】对象存储服务亚马逊云S3、腾讯云cos、阿里云oss的命令行工具使用方式整理