graphic:python:maya

Differences

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

Link to this comparison view

Next revision
Previous revision
graphic:python:maya [2021/08/22 19:35] – created 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 ):
Line 2618: Line 2628:
 ===== Proof of cos(A+B) formula ===== ===== Proof of cos(A+B) formula =====
  
-  * original reference: ([[http://www.ies.co.jp/math/java/trig/kahote/kahote.html|Link 1]], [[http://clowder.net/hop/cos(a+b).html|link 2]])\\ {{graphic:mathproof_sina_b.png?400|}} \\ {{graphic:mathproof_cosa_b.png?400|}}+  * original reference: ([[http://www.ies.co.jp/math/java/trig/kahote/kahote.html|Link 1]], [[http://clowder.net/hop/cos(a+b).html|link 2]])\\ {{graphic:python:maya:mathproof_sina_b.png?400|}} \\ {{graphic:python:maya:mathproof_cosa_b.png?400|}}
  
 ===== Proof of rotation matrix ===== ===== Proof of rotation matrix =====
-  * 2D rotation of an angle from (x,y) to (x1,y1) \\ {{graphic:math_rotation_matrix_2d.png|}}+  * 2D rotation of an angle from (x,y) to (x1,y1) \\ {{graphic:python:maya:math_rotation_matrix_2d.png|}}
   * Proof <code>   * Proof <code>
 let A (x,y) to A1 (x1,y1) turns degree of a in respect of origin. let A (x,y) to A1 (x1,y1) turns degree of a in respect of origin.
Line 2646: Line 2656:
 in matrix form, it is same is the question above, Done. in matrix form, it is same is the question above, Done.
 </code> </code>
-  * thus in 3D space, we expand to have: \\ {{graphic:math_rotation_matrix.png|}}+  * thus in 3D space, we expand to have: \\ {{graphic:python:maya:math_rotation_matrix.png|}}
  
 ===== understand Matrix multiplication ===== ===== understand Matrix multiplication =====
  • graphic/python/maya.1629660935.txt.gz
  • Last modified: 2021/08/22 19:35
  • by ying