graphic:python:maya

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
graphic:python:maya [2021/08/22 19:43] yinggraphic:python:maya [2021/10/02 08:02] (current) – [selection related] ying
Line 2400: Line 2400:
         allgeo.append(each)             allgeo.append(each)    
     #mel:if(`gmatch $each "*_geo"`) $selected[size($selected)]=$each;     #mel:if(`gmatch $each "*_geo"`) $selected[size($selected)]=$each;
 +</code>
 +  * selected attribute in channel box<code python>
 +selected_attr_list = cmds.channelBox("mainChannelBox",q=1, sma=1)
 </code> </code>
  
Line 2419: Line 2422:
  
 ===== rigging related ===== ===== rigging related =====
 +  * find source of parentConstraint <code python> 
 +# get parentConstraint source 
 +selected = cmds.ls(sl=1)[0] 
 +links = cmds.listConnections(selected+'.tx' , type='parentConstraint',s=1) 
 +if links is None: 
 +    links = [] 
 +print(links) 
 +</code>
   * findRelatedSkinCluster python version (written based on original mel version)<code python>   * findRelatedSkinCluster python version (written based on original mel version)<code python>
 def findRelatedSkinCluster( skinObject ): def findRelatedSkinCluster( skinObject ):
  • graphic/python/maya.txt
  • Last modified: 2021/10/02 08:02
  • by ying