Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
graphic:python:maya [2021/08/22 19:35] – created ying | graphic:python:maya [2021/10/02 08:02] (current) – [selection related] ying | ||
---|---|---|---|
Line 2400: | Line 2400: | ||
allgeo.append(each) | allgeo.append(each) | ||
# | # | ||
+ | </ | ||
+ | * selected attribute in channel box<code python> | ||
+ | selected_attr_list = cmds.channelBox(" | ||
</ | </ | ||
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+' | ||
+ | if links is None: | ||
+ | links = [] | ||
+ | print(links) | ||
+ | </ | ||
* findRelatedSkinCluster python version (written based on original mel version)< | * findRelatedSkinCluster python version (written based on original mel version)< | ||
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:// | + | * original reference: ([[http:// |
===== Proof of rotation matrix ===== | ===== Proof of rotation matrix ===== | ||
- | * 2D rotation of an angle from (x,y) to (x1,y1) \\ {{graphic: | + | * 2D rotation of an angle from (x,y) to (x1,y1) \\ {{graphic: |
* Proof < | * Proof < | ||
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. | ||
</ | </ | ||
- | * thus in 3D space, we expand to have: \\ {{graphic: | + | * thus in 3D space, we expand to have: \\ {{graphic: |
===== understand Matrix multiplication ===== | ===== understand Matrix multiplication ===== |