- 博客(18)
- 收藏
- 关注
原创 Maya-对选中物体添加组
import maya.cmds as cmdssel_obj = cmds.ls(sl = True)for i, ii in enumerate(sel_obj): CreatNull = cmds.createNode('transform', name = '{}_{}'.format(sel_obj[i], 'drve')) cmds.select(CreatNull, sel_obj[i]) cmds.MatchTransform(CreatNull, sel_obj
2021-03-19 02:08:30 785
原创 命名shape节点
命名shape节点import maya.cmds as cmdsqqqq = cmds.ls(sl=True)shape = 'shape'Orig = 'Orig'Orig1 = 'Orig1'for i,ii in enumerate(qqqq): aa_shape = cmds.listRelatives(qqqq[i], s=True) for a, aa in enumerate(aa_shape): if a==0: cmds
2022-03-17 14:06:22 262
原创 Maya-设置快捷键(设置“~”键对选中物体参数归零)
队选中物体参数设置为默认参数import maya.cmds as cmdsselobj = cmds.ls(sl = True)for i, ii in enumerate(selobj): cmds.xform(selobj[i], t = (0, 0, 0)) cmds.xform(selobj[i], ro = (0, 0, 0)) cmds.xform(selobj[i], s = (1, 1, 1)) cmds.setAttr(selobj[i]+
2021-03-20 10:51:01 1563
原创 Maya_python小工具
Transfer_UVimport maya.cmds as cmdslist_obj=cmds.ls(sl=True)cmds.polyTransfer( list_obj[1], uv=1, ao=list_obj[0] )cmds.BakeNonDefHistory(list_obj[1])transfer_T# -*- coding:utf-8 -*-# Author:RD...
2020-04-23 19:04:48 1101
原创 MAYA 小技巧
1、Maya查询物体类型nodeType2、渲染设置窗口不显示()import maya.cmds as cmdsUI=cmds.lsUI(windows=True)cmds.deleteUI(‘unifiedRenderGlobalsWindow’)3、ui文件生成的.py文件运行不出现界面问题在末尾加加上这段代码if name == “main”:import sysapp...
2020-04-23 18:57:49 438
原创 Maya绑定小插件
UI# -*- coding: utf-8 -*-# Form implementation generated from reading ui file 'D:\R\Rig\Setup_Color.ui'## Created: Tue Dec 31 15:11:13 2019# by: pyside2-uic running on PySide2 2.0.0~alpha0...
2020-01-02 11:39:45 1253 2
原创 在控制器上添加属性链接到模型shape的display type
# -*- coding:utf-8 -*-# Author:RDS#在控制器上添加属性链接到模型shape的display typeimport maya.cmds as mc#cmds.ls(nt=True)lsall = mc.ls(sl=True)lsobjshape = mc.listRelatives(lsall , type = 'mesh' )lscvshape = ...
2020-01-02 11:32:52 299
原创 Create_Grp
# -*- coding:utf-8 -*-# Author:RDS# QQ:872876319import maya.cmds as cmdslist_select=cmds.ls(sl=True)create_group=cmds.createNode('transform', name=list_select[0]+'_Group')for i in range(len(lis...
2020-01-02 11:31:15 145
原创 Attribute link
-- coding:utf-8 --Author:RDS对选中的组进行属性链接import maya.cmds as cmdsgrp_list = cmds.ls(sl = True)a_list = cmds.listRelatives(grp_list[0], ad=1)b_list = cmds.listRelatives(grp_list[1], ad=1)for i in ...
2020-01-02 11:12:34 184
原创 Off_Drawing_Overrides
# -*- coding:utf-8 -*-# Author:RDS# QQ:872876319import maya.cmds as cmdsselect_obj=cmds.ls(sl=True)select_obj_shape=cmds.listRelatives(select_obj, shapes=True)for ii in select_obj_shape: cm...
2020-01-02 11:10:45 184
原创 Maya Transfrom属性(通道盒)打开和关闭
// An highlighted block#锁定并隐藏通道盒import maya.cmds as mc;sel=mc.ls(sl=True);transfrom=['.tx', '.ty', '.tz', '.rx', '.ry', '.rz', '.sx', '.sy', '.sz', '.v', ];for a in transfrom: mc.setAttr(sel[...
2018-12-02 11:18:20 2728
原创 镜像
import maya.cmds as cmdsimport maya.mel as melimport maya.cmds as mcWINDOW_NAME = "FACEUI"SELECT_NUM = cmds.ls(sl = True)def FACEUI(): if cmds.window(WINDOW_NAME, exists = True): ...
2018-10-29 20:28:52 200
原创 aaa
# -*- coding: utf-8 -*-from PySide2 import QtCorefrom PySide2 import QtGuifrom shiboken2 import wrapInstanceimport pyside2uicimport xml.etree.ElementTree as xmlfrom cStringIO import StringIOimp...
2018-10-29 09:57:20 150
原创 Maya XGen动力学动画常用参数
import maya.cmds as mcset=mc.ls(sl=True)mc.addAttr(set, longName='Enable', keyable=True, at='bool', )mc.addAttr(set, longName='StartFrame', keyable=True, at='long',)mc.addAttr(set, longName='Simul...
2018-10-23 22:04:59 3713
原创 Maya属性连接、创建组
//属性连接import maya.cmds;set=cmds.ls(sl=True);cmds.connectAttr(set[0]+'.t',set[1]+'.t');cmds.connectAttr(set[0]+'.r',set[1]+'.r');cmds.connectAttr(set[0]+'.s',set[1]+'.s');cmds.connectAttr(set[0]+...
2018-10-18 15:07:31 2248
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人