<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8400563081117910408</id><updated>2026-06-16T19:11:20.822+08:00</updated><category term="mel/python"/><category term="一般(general)"/><category term="介面(UI)"/><category term="polygon"/><category term="建模(modeling)"/><category term="rigging"/><category term="動畫 (animation)"/><category term="其他 (other)"/><category term="外掛 (plugin)"/><category term="貼圖 (texture)"/><category term="UV"/><category term="下載(download)"/><category term="render"/><category term="shelf"/><category term="Mental Ray"/><category term="zbrush"/><title type='text'>Maya 每日一招</title><subtitle type='html'>&lt;p align=&quot;center&quot;&gt;Maya 教學網&lt;/p&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>127</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-1979452578515797472</id><published>2017-05-06T16:47:00.004+08:00</published><updated>2017-05-06T16:47:37.983+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>快速切換 Maya 背景顏色</title><content type='html'>快速鍵 : Alt+b&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDJisC1ThI8x0J9axWL0VZo9pl_5XGrSnYb54UBprWJrnYv_sj0l1QVeI0BGTWyk8_MHEkWRuQAhD0m6bbm9ckD_g1pUhEnZOftyrigKLqeskPgc1fsbJIsnojkE04FbO-IWX5CY2flVE/s1600/bg1.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDJisC1ThI8x0J9axWL0VZo9pl_5XGrSnYb54UBprWJrnYv_sj0l1QVeI0BGTWyk8_MHEkWRuQAhD0m6bbm9ckD_g1pUhEnZOftyrigKLqeskPgc1fsbJIsnojkE04FbO-IWX5CY2flVE/s320/bg1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOYcS05TGDUFLn_3CEwmaF6SP8Vf9qzS4-i7Cr88YU8vUoGzrEtdYHwBV5www9pW2oDuGXwRN_9ER52lBckI6URSPLTcT0Ji7qSjPmdCbvuSY7HmHz49CHFBDzA_zN79SIVXhfub1QKa4/s1600/bg2.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOYcS05TGDUFLn_3CEwmaF6SP8Vf9qzS4-i7Cr88YU8vUoGzrEtdYHwBV5www9pW2oDuGXwRN_9ER52lBckI6URSPLTcT0Ji7qSjPmdCbvuSY7HmHz49CHFBDzA_zN79SIVXhfub1QKa4/s320/bg2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiimWhuJ5CfjOrQgVQlu-XzPE5qnLhk3wwdkouQK7c56m59fJ8De_6sR5x1YfbTU-iXCsg8Q8Bh6HtbIKKwhkrH7Npq2Rrh7G4GbrbheJX91M6mI6BgrEmjU8OqgoIruadaPZJkeiEBFeE/s1600/bg3.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiimWhuJ5CfjOrQgVQlu-XzPE5qnLhk3wwdkouQK7c56m59fJ8De_6sR5x1YfbTU-iXCsg8Q8Bh6HtbIKKwhkrH7Npq2Rrh7G4GbrbheJX91M6mI6BgrEmjU8OqgoIruadaPZJkeiEBFeE/s320/bg3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEite6SRTxczGi5576aDglrOWC2Q9iRwj72l8oAln6GDzaq0QRapMJUMEJ5yWp-iQBNgxEuBzkL0Coc34TvHzZCdGhe-3QIRFg9-M1mQnHZOgIeKTwdD4W8TADuOhdr0GWZzGWTZFoaAGrM/s1600/bg4.jpg&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEite6SRTxczGi5576aDglrOWC2Q9iRwj72l8oAln6GDzaq0QRapMJUMEJ5yWp-iQBNgxEuBzkL0Coc34TvHzZCdGhe-3QIRFg9-M1mQnHZOgIeKTwdD4W8TADuOhdr0GWZzGWTZFoaAGrM/s320/bg4.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/1979452578515797472/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2017/05/maya.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1979452578515797472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1979452578515797472'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2017/05/maya.html' title='快速切換 Maya 背景顏色'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDJisC1ThI8x0J9axWL0VZo9pl_5XGrSnYb54UBprWJrnYv_sj0l1QVeI0BGTWyk8_MHEkWRuQAhD0m6bbm9ckD_g1pUhEnZOftyrigKLqeskPgc1fsbJIsnojkE04FbO-IWX5CY2flVE/s72-c/bg1.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-1908724123265794342</id><published>2017-04-26T18:21:00.001+08:00</published><updated>2017-04-26T18:21:41.178+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="polygon"/><category scheme="http://www.blogger.com/atom/ns#" term="建模(modeling)"/><title type='text'>檢查模型的 topology 是否對等 (polyCompare check topology match)</title><content type='html'>檢查模型的 topology 是否對等 (能不能拿來做 blendshape 等等)

&lt;script src=&quot;https://gist.github.com/r4inm4ker/a3e506142a3e887f1ef4eb8076c4c25d.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/1908724123265794342/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2017/04/topology-polycompare-check-topology.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1908724123265794342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1908724123265794342'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2017/04/topology-polycompare-check-topology.html' title='檢查模型的 topology 是否對等 (polyCompare check topology match)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-3569935750953629704</id><published>2016-08-28T06:29:00.002+08:00</published><updated>2016-08-28T06:30:27.026+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><title type='text'>如何在 import 檔案之前執行一段程式 (How to run a callback before importing scene file)</title><content type='html'>今天看到 google group 上的一個&lt;a href=&quot;https://groups.google.com/forum/?utm_medium=email&amp;amp;utm_source=footer#!msg/python_inside_maya/rpO70NI1jc0/I10eDlxZCQAJ&quot;&gt; thread&lt;/a&gt;,關於如何在 maya import 一個檔案之前執行程式 (可以用來做一些 preprocessing, 例如檢查檔案路徑等等)。就先把它貼在這當筆記吧。

&lt;script src=&quot;https://gist.github.com/r4inm4ker/69ff3c0313b6aff6cd7767061604c2dd.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/3569935750953629704/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2016/08/import-how-to-execute-callback-before.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3569935750953629704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3569935750953629704'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2016/08/import-how-to-execute-callback-before.html' title='如何在 import 檔案之前執行一段程式 (How to run a callback before importing scene file)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-418482899124421410</id><published>2016-07-12T18:23:00.000+08:00</published><updated>2016-07-12T18:24:10.640+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><title type='text'>取得 Maya 版本的 MEL 指令 (MEL command to get Maya version as float)</title><content type='html'>MEL:&lt;br /&gt;
&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;getApplicationVersionAsFloat;
&lt;/code&gt;&lt;/pre&gt;

&lt;br /&gt;

Pymel:

&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;import pymel.core as pm
pm.mel.getApplicationVersionAsFloat()
# 2016.0
&lt;/code&gt;&lt;/pre&gt;



</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/418482899124421410/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2016/07/maya-mel-mel-command-to-get-maya.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/418482899124421410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/418482899124421410'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2016/07/maya-mel-mel-command-to-get-maya.html' title='取得 Maya 版本的 MEL 指令 (MEL command to get Maya version as float)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-5739366953543281103</id><published>2016-06-22T17:08:00.000+08:00</published><updated>2016-06-22T17:08:18.026+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="一般(general)"/><category scheme="http://www.blogger.com/atom/ns#" term="建模(modeling)"/><title type='text'>如何把一個 transform 裡存在多個 shapes 的物件獨立出來 (how to separate multiple shapes inside one transform node)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QoQecUcIggzXfJiFSYpczee9BbKzcve7n1QlniMO1xzu9OumUXHCD3E1l1FyDS6UQZdeUuRRx7d04ZXc-Ey3hIYPcn_ySCwGL_siC3dOX1mD91oeuLclCBKU6ZOAMN6qmgRBR_KIfq8/s1600/multishape_1_transform.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;418&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QoQecUcIggzXfJiFSYpczee9BbKzcve7n1QlniMO1xzu9OumUXHCD3E1l1FyDS6UQZdeUuRRx7d04ZXc-Ey3hIYPcn_ySCwGL_siC3dOX1mD91oeuLclCBKU6ZOAMN6qmgRBR_KIfq8/s640/multishape_1_transform.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
有些工具或外掛會產生出向這種一個 transform 裡存在多個 shapes 的物件。這可能是為了效能關係或其他因素，不過就可能會造成其他一些軟體，工具，或 renderer 無法正常運作。&lt;br /&gt;
&lt;br /&gt;
以下這段小程式可以幫你把這些shapes 拆成&quot;正常&quot;獨立的物件。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/r4inm4ker/a0456dcfde402daf7f665c11b842c6fe.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFKKUT7tY48ECbAW3cRO12iGF-GKWtwGKXgyuVDwacVdqvfaJW7pw5Ba4aWBi3TGv4RWhJW8gqkeDyyUKd5bMs_2PMWcutnkoejelhFIB83WUTOR0a6YXMNv84C_AOVHwsFKASGysUeSQ/s1600/multishape_1_transform2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;432&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFKKUT7tY48ECbAW3cRO12iGF-GKWtwGKXgyuVDwacVdqvfaJW7pw5Ba4aWBi3TGv4RWhJW8gqkeDyyUKd5bMs_2PMWcutnkoejelhFIB83WUTOR0a6YXMNv84C_AOVHwsFKASGysUeSQ/s640/multishape_1_transform2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/5739366953543281103/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2016/06/transform-shapes-how-to-separate.html#comment-form' title='3 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/5739366953543281103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/5739366953543281103'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2016/06/transform-shapes-how-to-separate.html' title='如何把一個 transform 裡存在多個 shapes 的物件獨立出來 (how to separate multiple shapes inside one transform node)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-QoQecUcIggzXfJiFSYpczee9BbKzcve7n1QlniMO1xzu9OumUXHCD3E1l1FyDS6UQZdeUuRRx7d04ZXc-Ey3hIYPcn_ySCwGL_siC3dOX1mD91oeuLclCBKU6ZOAMN6qmgRBR_KIfq8/s72-c/multishape_1_transform.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-590484906001377246</id><published>2016-06-07T17:51:00.000+08:00</published><updated>2016-06-07T17:51:00.426+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="polygon"/><category scheme="http://www.blogger.com/atom/ns#" term="建模(modeling)"/><title type='text'>切換邊界線的顯示 ( toggle border edges )</title><content type='html'>&lt;br /&gt;
以下的 python script 可以切換邊界線 (border edge) 在 viewport 上的的顯示:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;import maya.mel as mm
borderSize = 8
mm.eval(&quot;ToggleBorderEdges&quot;)
mm.eval(&quot;polyOptions -activeObjects -sizeBorder {}&quot;.format(borderSize))


&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTCWcVkWkN-qCVqGVgbFh-MvhKfdyy8sNoXFZ_BMJ9NbKDRVW2IBIMFEBix45TMKoXVx5Rki4P_JTi2kneU_Xq2Q1eQnDHiRWugDltso-bxlhEa7OZK3n5iSTOhbLIxusx871el73s4ic/s1600/border_edge_display.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTCWcVkWkN-qCVqGVgbFh-MvhKfdyy8sNoXFZ_BMJ9NbKDRVW2IBIMFEBix45TMKoXVx5Rki4P_JTi2kneU_Xq2Q1eQnDHiRWugDltso-bxlhEa7OZK3n5iSTOhbLIxusx871el73s4ic/s320/border_edge_display.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
若要直接選邊界線的話則是執行以下這幾行程式:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: &amp;quot;andale mono&amp;quot; , &amp;quot;lucida console&amp;quot; , &amp;quot;monaco&amp;quot; , &amp;quot;fixed&amp;quot; , monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;import maya.cmds as mc
mc.softSelect(softSelectEnabled=0)
mc.polySelectConstraint(mode=3,type=0x8000,where=1)
mc.polySelectConstraint(disable=1)

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXUqQcGfslrZOACWZqiX0quLPaRSXvV5ZlUBmkLjKoXNEaq3w8skSgJi-Th3jhCfk8msHX0rvAo3pTfs_dq5UVm-hdJkITuy7Ax_Kw0qtf_bxw7vMnn2eZ3Dw74fT1AwLVlhqGwTm6HVc/s1600/border_edge_select.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXUqQcGfslrZOACWZqiX0quLPaRSXvV5ZlUBmkLjKoXNEaq3w8skSgJi-Th3jhCfk8msHX0rvAo3pTfs_dq5UVm-hdJkITuy7Ax_Kw0qtf_bxw7vMnn2eZ3Dw74fT1AwLVlhqGwTm6HVc/s320/border_edge_select.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/590484906001377246/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2016/06/toggle-border-edges.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/590484906001377246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/590484906001377246'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2016/06/toggle-border-edges.html' title='切換邊界線的顯示 ( toggle border edges )'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTCWcVkWkN-qCVqGVgbFh-MvhKfdyy8sNoXFZ_BMJ9NbKDRVW2IBIMFEBix45TMKoXVx5Rki4P_JTi2kneU_Xq2Q1eQnDHiRWugDltso-bxlhEa7OZK3n5iSTOhbLIxusx871el73s4ic/s72-c/border_edge_display.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-7225738504837176266</id><published>2015-08-05T22:03:00.001+08:00</published><updated>2015-08-05T22:03:37.562+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rigging"/><category scheme="http://www.blogger.com/atom/ns#" term="動畫 (animation)"/><category scheme="http://www.blogger.com/atom/ns#" term="外掛 (plugin)"/><title type='text'>使用 dgProfiler 來檢測 rigging 的瓶頸</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
動畫師永遠會抱怨你的 rig 太慢, fps 只有 99.9999 等等的問題 ，所以很多時候你就得找個辦法加速你的 rig 了。首先最快的解決方法當然是直接出錢幫你的動畫師升級電腦，其次是找這位大神幫你加速:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRn1zFdnUNW_wlP1BFHe08M7CIWDtagpSdlFUYDQ-_YnVwewb_crYp7_1KEKZ-Av_uUf77f2pGNIwj3qxAzNCArbTPC1QcbSSe64kWEHFxntTdDSx0J_locjnhwhOF3fOJyM_56Bz-G1o/s1600/Screenshot+-+8_5_2015+%252C+9_37_04+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRn1zFdnUNW_wlP1BFHe08M7CIWDtagpSdlFUYDQ-_YnVwewb_crYp7_1KEKZ-Av_uUf77f2pGNIwj3qxAzNCArbTPC1QcbSSe64kWEHFxntTdDSx0J_locjnhwhOF3fOJyM_56Bz-G1o/s320/Screenshot+-+8_5_2015+%252C+9_37_04+PM.png&quot; width=&quot;287&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
如果這兩個辦法你都辦不到的話 那就只好自己乖乖想辦法加速了。其中一個方法就是透過 dgProfiler 檢測 rigging 的瓶頸到底在哪。 dgProfiler 是 maya 近年來(沒記錯的話是 2014 或 2015)增加的一個功能。首先要透過 plug-in manager 把 dgProfiler plugin &amp;nbsp;load 起來。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzmAelZFf1dRR7xDee5OeOSGapx2MqgL_Q0D8FtcTv7J0aE2G6WCMGcq8llbS7_AALv-RpbUB4jR1HVwDh4FvTIMmTNzcKXZuGFK0_D5p2VsJ_AEpSKmTJ5QiQtj-NwQ8mGItNi_c3XA8/s1600/1_pluginwindow.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzmAelZFf1dRR7xDee5OeOSGapx2MqgL_Q0D8FtcTv7J0aE2G6WCMGcq8llbS7_AALv-RpbUB4jR1HVwDh4FvTIMmTNzcKXZuGFK0_D5p2VsJ_AEpSKmTJ5QiQtj-NwQ8mGItNi_c3XA8/s320/1_pluginwindow.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
接下來你要準備一個角色有被keyframe 過的檔案，大概 50-60 frame 就夠了，不過記得盡量要全身都有動作的檔案會比較理想。 (以下這測試角色是 M&lt;a href=&quot;http://www.cgmeetup.net/home/mathilda-rig-free-maya-rig-female-character-rig/&quot;&gt;athilda Rig&lt;/a&gt;&amp;nbsp;)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8Z1fQJHc8vDCKG91zEW1TsU9cWNhOHVT_sCGkBeloEEl2gGASOAKH284JA6wxkbTdS6aafBvJ3IpfZVfIXgczFVhBZWcbpFCdyzNScWBn702QdS66lPrdz-x2Nnf_nVnzpTPrR2t370/s1600/3_mathilda_char.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;288&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ8Z1fQJHc8vDCKG91zEW1TsU9cWNhOHVT_sCGkBeloEEl2gGASOAKH284JA6wxkbTdS6aafBvJ3IpfZVfIXgczFVhBZWcbpFCdyzNScWBn702QdS66lPrdz-x2Nnf_nVnzpTPrR2t370/s320/3_mathilda_char.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
然後大開 DG Profiler 的 ui, 也不需要調整太多參數，大概只要把Number of Runs 改為 2~3 就好了（目的是要讓這程式重複跑個幾遍避免一些誤差）。按下 Profile! 這工具就會開始 playback 你的場景，跑 n 次(number of runs) 之後會顯示出一些數據。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWqp4qxzDCPBP4E7v7DB46iNpjkq3ZIOuJmRSaFQ-8qfvgA0leXrWiHaRfv_Uy1SXLi3OP5DFsdze1CcOE1BIo8KPMofUvlAi3vK__yn2-RtyAVaE6-wgYSa4uqfBLaRm-3-OsoCM3k3g/s1600/2_dgProfilerMenu.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWqp4qxzDCPBP4E7v7DB46iNpjkq3ZIOuJmRSaFQ-8qfvgA0leXrWiHaRfv_Uy1SXLi3OP5DFsdze1CcOE1BIo8KPMofUvlAi3vK__yn2-RtyAVaE6-wgYSa4uqfBLaRm-3-OsoCM3k3g/s320/2_dgProfilerMenu.png&quot; width=&quot;274&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhyphenhyphenD0hIqoE18vtd_jW648nwb-4bdHofsdeT2ATBMTNfjgJGyFKl6vfrSDtwnCjax77ilhHG70Gf-nI5CIDz5mihWeDtMK3HUfWWdwL04iaMkwWWm7vPSgyHX7PpfZz8TgTVtxkeCKQE1A/s1600/4_profiler_ui.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;339&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhyphenhyphenD0hIqoE18vtd_jW648nwb-4bdHofsdeT2ATBMTNfjgJGyFKl6vfrSDtwnCjax77ilhHG70Gf-nI5CIDz5mihWeDtMK3HUfWWdwL04iaMkwWWm7vPSgyHX7PpfZz8TgTVtxkeCKQE1A/s640/4_profiler_ui.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
你可以把這數據導出成一個 cvs 檔，再用 excel 或 openoffice 或 LibreOffice這類的 spreadsheet editor 來顯示以及編輯這個檔案，找出整個 rig 的瓶頸。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxZtI5-mlhoF7iIieuZmVPo4ffIoSw4aoipL7XBCdD38gEcVkvGV3CidzHfxyRUV6Yk2ajhyphenhyphen0KVFO9gxBJyAvOIckc4nwvMLmBVtHFb80ayGH7V4C3CKVjCRdEDADMscL6wwsbEq6WX-k/s1600/5_save_profiler.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxZtI5-mlhoF7iIieuZmVPo4ffIoSw4aoipL7XBCdD38gEcVkvGV3CidzHfxyRUV6Yk2ajhyphenhyphen0KVFO9gxBJyAvOIckc4nwvMLmBVtHFb80ayGH7V4C3CKVjCRdEDADMscL6wwsbEq6WX-k/s1600/5_save_profiler.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirPDSSneDxyTpwLTTi2qXR08JAiHXKSxLBY47h4JqU9-wTRLHv36Uxo9jfk-7-Bd07WEMzFRRosLoplmj-Aa6fXudpEzsTmiRqXuqHeGD0Qnh2R1EQc4LIePInTH6M3imRfec1irR8nM8/s1600/6_inspect_bottleneck.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;334&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirPDSSneDxyTpwLTTi2qXR08JAiHXKSxLBY47h4JqU9-wTRLHv36Uxo9jfk-7-Bd07WEMzFRRosLoplmj-Aa6fXudpEzsTmiRqXuqHeGD0Qnh2R1EQc4LIePInTH6M3imRfec1irR8nM8/s640/6_inspect_bottleneck.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
以這個測試rig來說，主要的兇手大概就是CT_headLattice_dfm (lattice) 還有一些 skinCluster. 如果有辦法加速這幾個 nodes 的話，就可以讓整個 rig 的數度再提升一些。不過說實話啦，有時候真的升級電腦是個快速又省時間(也等於省錢)的方法!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/7225738504837176266/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2015/08/dgprofiler-rigging.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7225738504837176266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7225738504837176266'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2015/08/dgprofiler-rigging.html' title='使用 dgProfiler 來檢測 rigging 的瓶頸'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRn1zFdnUNW_wlP1BFHe08M7CIWDtagpSdlFUYDQ-_YnVwewb_crYp7_1KEKZ-Av_uUf77f2pGNIwj3qxAzNCArbTPC1QcbSSe64kWEHFxntTdDSx0J_locjnhwhOF3fOJyM_56Bz-G1o/s72-c/Screenshot+-+8_5_2015+%252C+9_37_04+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-450145630630463541</id><published>2015-07-13T22:05:00.001+08:00</published><updated>2015-07-13T22:05:17.075+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="一般(general)"/><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>Maya 2015 的 ui mixin class 讓你可以很輕鬆把一個 ui widget 變成 maya 介面的 dockable item</title><content type='html'>現在在 maya 裡寫 python 的 qt ui 比以前方便多了。2014版本開始把 pyside 完全包在 maya 裡，2015 版本更是加了一些 mixin class 讓寫 pyside ui 簡單許多，其中一個 mixin 就是&amp;nbsp;MayaQWidgetDockableMixin . 這個 mixin class 讓你繼承他之後可以 生成一個 widget 然後直接用 .show(dockable=True) 讓它顯示成 maya ui 的 dockable item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
簡單的 UI 範例 :&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
from PySide import QtCore, QtGui

class MyWidget(MayaQWidgetDockableMixin,QtGui.QWidget):
    def __init__(self,parent=None):
        super(MyWidget, self).__init__(parent=parent)
        
        self.setWindowTitle(&quot;my widget&quot;)
        
        layout = QtGui.QVBoxLayout()
        self.setLayout(layout)
        
        btn1 = QtGui.QPushButton(&quot;run this&quot;)
        layout.addWidget(btn1)
        
        btn2 = QtGui.QPushButton(&quot;run that&quot;)
        layout.addWidget(btn2)
        
        spacer = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        layout.addSpacerItem(spacer)


newWidget = MyWidget()
newWidget.show(dockable=True)
        
        
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
效果:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7a7DauHb0-jdVmF2aPryH3htYpmQTxok5w7wVN_BPmdRdDhMC_IcU_QciD8P6cb5S_jpKMOxzvU66qGXmBTRue9zheXAJzFnQMQPkBXlR2BctExx7bclMjUbFDg48qXrSUtIt-WUltpk/s1600/Screenshot+-+13_07_2015+%252C+21_58_40.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;464&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7a7DauHb0-jdVmF2aPryH3htYpmQTxok5w7wVN_BPmdRdDhMC_IcU_QciD8P6cb5S_jpKMOxzvU66qGXmBTRue9zheXAJzFnQMQPkBXlR2BctExx7bclMjUbFDg48qXrSUtIt-WUltpk/s640/Screenshot+-+13_07_2015+%252C+21_58_40.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Maya PySide UI 參考資料:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/Maya-SDK/files/GUID-66ADA1FF-3E0F-469C-84C7-74CEB36D42EC-htm.html&quot;&gt;PyQt and PySide Widget Best Practices&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2015/ENU/Maya-SDK/files/GUID-3F96AF53-A47E-4351-A86A-396E7BFD6665-htm.html&quot;&gt;Working with PySide in Maya&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/450145630630463541/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2015/07/maya-2015-ui-mixin-class-ui-widget-maya.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/450145630630463541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/450145630630463541'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2015/07/maya-2015-ui-mixin-class-ui-widget-maya.html' title='Maya 2015 的 ui mixin class 讓你可以很輕鬆把一個 ui widget 變成 maya 介面的 dockable item'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7a7DauHb0-jdVmF2aPryH3htYpmQTxok5w7wVN_BPmdRdDhMC_IcU_QciD8P6cb5S_jpKMOxzvU66qGXmBTRue9zheXAJzFnQMQPkBXlR2BctExx7bclMjUbFDg48qXrSUtIt-WUltpk/s72-c/Screenshot+-+13_07_2015+%252C+21_58_40.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-3590234328198851803</id><published>2015-03-19T22:13:00.000+08:00</published><updated>2015-08-06T20:28:48.878+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="下載(download)"/><category scheme="http://www.blogger.com/atom/ns#" term="動畫 (animation)"/><category scheme="http://www.blogger.com/atom/ns#" term="外掛 (plugin)"/><category scheme="http://www.blogger.com/atom/ns#" term="建模(modeling)"/><title type='text'>Necklace 外掛 (Maya python plugin) : 在曲線上產生以及編輯多個物件的動態。</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilMFMoJikQCVkR1uEPptc36_bCS3LSDBhJv1MpOwPQRRtSZ9feiKFc__0dlyjD0U9fHCaZ6O0K2QOOK4XwF9zIcpL3zzmWDGDhsX30xg1u0ODV-SPeHnaDDj11pe3fXVX6bQtauuF0Fic/s1600/cover.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilMFMoJikQCVkR1uEPptc36_bCS3LSDBhJv1MpOwPQRRtSZ9feiKFc__0dlyjD0U9fHCaZ6O0K2QOOK4XwF9zIcpL3zzmWDGDhsX30xg1u0ODV-SPeHnaDDj11pe3fXVX6bQtauuF0Fic/s1600/cover.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Necklace 是我最近發布的一套open source Maya python plug-in, 可以幫助我們簡單快速得在曲線上產生多個物件，並且可以控制物件的軸向還有動態。參考影片:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/n5faWpQxJjc/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;http://www.youtube.com/embed/n5faWpQxJjc?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&quot;&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/g6la4DodgqE/0.jpg&quot; frameborder=&quot;0&quot; height=&quot;266&quot; src=&quot;http://www.youtube.com/embed/g6la4DodgqE?feature=player_embedded&quot; width=&quot;320&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
下載連結 :&amp;nbsp;&lt;a href=&quot;https://github.com/r4inm4ker/necklace/releases&quot;&gt;https://github.com/r4inm4ker/necklace/releases&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
安裝方法: &lt;a href=&quot;https://github.com/r4inm4ker/necklace&quot;&gt;https://github.com/r4inm4ker/necklace&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;clear: both; text-align: left;&quot;&gt;
1. 套件下載完之後放到某個目錄，例如 C:\plug-ins\necklace&lt;br /&gt;
2. 打開 necklace.mod, 並且修改檔案裡的路徑，改為你的安裝路徑, e.g : C:\plug-ins\necklace&lt;br /&gt;
3. 編輯 maya 設定目錄裡的 maya.env (e.g : C:\users\rainmaker\documents\maya\2015-x64\maya.env)，加上這個變數 :&amp;nbsp;&lt;span style=&quot;background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;&quot;&gt;MAYA_MODULE_PATH =&amp;nbsp;&lt;/span&gt;C:\plug-ins\necklace&lt;span style=&quot;background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: rgba(0, 0, 0, 0.0392157); font-size: 13.6000003814697px; line-height: 21.7600002288818px;&quot;&gt;4.開啟 maya,然後執行以下這一行 mel:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, Liberation Mono, Menlo, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: rgba(0, 0, 0, 0.0392157); font-size: 13.6000003814697px; line-height: 21.7600002288818px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;&quot;&gt;source &quot;necklaceSetup.mel&quot;;necklaceSetup();&lt;/span&gt;&amp;nbsp; &amp;nbsp; shelf 上會增加一個 icon, 按下那個 icon 就可以使用簡易介面產生 necklace 物件。如果要進行細調，可以到 channel box 或 scriptEditor 找 testNecklace 的 node 調整裏頭的參數。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
官網說明 :&amp;nbsp;&lt;a href=&quot;http://www.brainyart.me/tools/necklace&quot;&gt;http://www.brainyart.me/tools/necklace&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: rgba(0, 0, 0, 0.0392157); color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 13.6000003814697px; line-height: 21.7600002288818px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/3590234328198851803/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2015/03/necklace-maya-python-plugin.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3590234328198851803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3590234328198851803'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2015/03/necklace-maya-python-plugin.html' title='Necklace 外掛 (Maya python plugin) : 在曲線上產生以及編輯多個物件的動態。'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilMFMoJikQCVkR1uEPptc36_bCS3LSDBhJv1MpOwPQRRtSZ9feiKFc__0dlyjD0U9fHCaZ6O0K2QOOK4XwF9zIcpL3zzmWDGDhsX30xg1u0ODV-SPeHnaDDj11pe3fXVX6bQtauuF0Fic/s72-c/cover.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-3732229099378364146</id><published>2015-01-17T11:26:00.000+08:00</published><updated>2015-01-17T11:36:40.040+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="polygon"/><category scheme="http://www.blogger.com/atom/ns#" term="建模(modeling)"/><title type='text'>python 小程式 : 使用一圈的線 + 一個點來選取一群面。 </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8LMe5YOMz-nJuo2XwVfOWIy8Esw1Z3nIuLtPVCdO-G-Wb8QzzdOAugrOGo59VON2rhvF9bZqTwaCugnmXvR_zTYUeusRa2if2zmhQ4JI5zIBfmqWelL1f10jTM4K0wTN6wygKGpGdgUI/s1600/select_before.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8LMe5YOMz-nJuo2XwVfOWIy8Esw1Z3nIuLtPVCdO-G-Wb8QzzdOAugrOGo59VON2rhvF9bZqTwaCugnmXvR_zTYUeusRa2if2zmhQ4JI5zIBfmqWelL1f10jTM4K0wTN6wygKGpGdgUI/s1600/select_before.png&quot; height=&quot;320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPl0GV5W90I1V22_5hk13eJKwjY5dBOg65vB1-N22D6dQaaO09MUa5ZGqvgQUNEkkzf3RiylP7V08YEmrymY8cdLi1Ibtnl7Z8hDhnytsySflIIG17bmqNkAo4B5k9cfC2AZnaVdYvIQo/s1600/select_after.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPl0GV5W90I1V22_5hk13eJKwjY5dBOg65vB1-N22D6dQaaO09MUa5ZGqvgQUNEkkzf3RiylP7V08YEmrymY8cdLi1Ibtnl7Z8hDhnytsySflIIG17bmqNkAo4B5k9cfC2AZnaVdYvIQo/s1600/select_after.png&quot; height=&quot;320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
當我們需要選取某一塊模型面時都會常常遇到不小心選錯或漏選一些面的這種問題，尤其是像以上這種結構比較複雜的模型特別容易發生。&lt;br /&gt;
以下這個程式可以幫助我們快速選取 edge loop 裡的面，只要選取一圈的線加上一個圈裡的點 就可以轉換成那一圈裏的面了。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;(由於程式有點長 所以放到 github gist 方便大家瀏覽 + copy paste)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://gist.github.com/r4inm4ker/2f87fd75aa6f4a4ea8b4&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://sciactive.com/pnotify/includes/github-icon.png&quot; /&gt;程式連結&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
打開連結後按下右邊的 RAW 按鈕就可以把程式複製貼到 maya script editor 裡執行 (或做成 shelf 按鈕 或 快速鍵)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/3732229099378364146/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2015/01/python.html#comment-form' title='9 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3732229099378364146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3732229099378364146'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2015/01/python.html' title='python 小程式 : 使用一圈的線 + 一個點來選取一群面。 '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8LMe5YOMz-nJuo2XwVfOWIy8Esw1Z3nIuLtPVCdO-G-Wb8QzzdOAugrOGo59VON2rhvF9bZqTwaCugnmXvR_zTYUeusRa2if2zmhQ4JI5zIBfmqWelL1f10jTM4K0wTN6wygKGpGdgUI/s72-c/select_before.png" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-1765793628243634050</id><published>2015-01-08T21:56:00.000+08:00</published><updated>2015-01-17T11:26:32.337+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="polygon"/><category scheme="http://www.blogger.com/atom/ns#" term="建模(modeling)"/><title type='text'>python 小程式 : 安全複製模型面 不影響原本模型的 history 或 名稱</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7PSBJ82Lh5kIxrSjmKzWL80vlFYt4wLcAEDdbAozqwEMUxi_Qnc-HUkogiH1E8YH7QbFZd5NR6Q1qYTbxNLbvBEApYN1XQfJkZcTpShAYE2CXswJvdx7SLtlhbyqz8y_JB2ICN-_chqA/s1600/Screenshot+-+08_01_2015+,+21_50_49.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7PSBJ82Lh5kIxrSjmKzWL80vlFYt4wLcAEDdbAozqwEMUxi_Qnc-HUkogiH1E8YH7QbFZd5NR6Q1qYTbxNLbvBEApYN1XQfJkZcTpShAYE2CXswJvdx7SLtlhbyqz8y_JB2ICN-_chqA/s1600/Screenshot+-+08_01_2015+,+21_50_49.png&quot; height=&quot;265&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Maya 的 duplicate face 工能雖然不錯用，但複製完模型面之後原本的模型不管是名稱或是 history 都會受影響。名稱會變成 polySurface* ，node history 也同樣會加上polyChipOff，polySeparate 這種 node, 對有rigging 過或 reference 進來的模型都是一種困擾。因此，我前陣子寫下了以下這個小程 (python) 式可以避免這種副作用，複製後遠本那個模型不會受任何影響 !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;import pymel.core as pm
import re

def getComponentId(component):
    &quot;&quot;&quot;get id number from a component (i.e. pCube.vtx[12]) , and return as int (i.e. 12 ) .&quot;&quot;&quot;
    tokens = re.split(&#39;[\[\]]&#39;,str(component))
    
    try:
        return int(tokens[1])
    except (ValueError,IndexError):
        return -1

faces = pm.filterExpand(ex=True,sm=34)

meshNode = pm.ls(faces,o=1)[0]

dupNode = pm.duplicate(meshNode)[0]

idList = [getComponentId(fc) for fc in faces]

pm.select(&quot;%s.f[*]&quot;%str(dupNode),r=1)

preStr = str(dupNode)+&quot;.f[%d]&quot;

pm.select([preStr%eachId for eachId in idList],d=1)

pm.delete()
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/1765793628243634050/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2015/01/history.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1765793628243634050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1765793628243634050'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2015/01/history.html' title='python 小程式 : 安全複製模型面 不影響原本模型的 history 或 名稱'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7PSBJ82Lh5kIxrSjmKzWL80vlFYt4wLcAEDdbAozqwEMUxi_Qnc-HUkogiH1E8YH7QbFZd5NR6Q1qYTbxNLbvBEApYN1XQfJkZcTpShAYE2CXswJvdx7SLtlhbyqz8y_JB2ICN-_chqA/s72-c/Screenshot+-+08_01_2015+,+21_50_49.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-1007829152215551797</id><published>2015-01-01T21:11:00.001+08:00</published><updated>2015-01-01T21:11:35.458+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="一般(general)"/><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>如何在 pyside 的程式裡直接使用 Qt designer 產生的 .ui 檔</title><content type='html'>Maya 每次更新一個版本都會多塞幾個外掛進去，包括 python 的 package 也是如此。2011版加了 pymel, 2014版則是把 PySide 也裝進去了。在那之前 大家如果要在 maya 裡使用 QT 寫介面就得自己裝 PyQt &amp;nbsp;或&amp;nbsp;PySide&amp;nbsp;，現在既然有內建的就應該好好利用它。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
有很多人喜歡使用 Qt Designer 先把介面設計好再 load 進 pyqt/pyside 裡. 但如果每次都要把 .ui 檔轉成 .py 檔 (pyuic4 / pyside-uic)實在是有點麻煩，所以大家通常都想直接 load .ui 檔。pyqt 本身有個 function 叫 loadUi 可以達到這件事 (http://pyqt.sourceforge.net/Docs/PyQt4/designer.html) , 但目前 pyside 好像沒有相對的功能，所以有人在 github 上放了一個 wrapper, 把&amp;nbsp;&lt;a class=&quot;reference internal&quot; href=&quot;http://srinikom.github.io/pyside-docs/PySide/QtUiTools/QUiLoader.html#PySide.QtUiTools.QUiLoader&quot; style=&quot;background-color: white; color: #009491; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-stretch: normal; text-decoration: none;&quot; title=&quot;PySide.QtUiTools.QUiLoader&quot;&gt;&lt;tt class=&quot;xref py py-class docutils literal&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-stretch: normal;&quot;&gt;&lt;span class=&quot;pre&quot; style=&quot;font-family: monospace; font-stretch: normal;&quot;&gt;PySide.QtUiTools.QUiLoader&lt;/span&gt;&lt;/tt&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;包成 loadUi function, 也讓 pyqt &amp;nbsp;code 可以&quot;無接縫&quot; 的轉換 pyside code.&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
https://github.com/lunaryorn/snippets/blob/master/qt4/designer/pyside_dynamic.py&lt;br /&gt;
&lt;br /&gt;
大家只需要把這個 module 下載放到自己的 python path 裡 (&lt;span class=&quot;pl-st&quot; style=&quot;background-color: white; box-sizing: border-box; color: #a71d5d; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 16.7999992370605px; white-space: pre;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 16.7999992370605px; white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pl-en&quot; style=&quot;background-color: white; box-sizing: border-box; color: #795da3; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 16.7999992370605px; white-space: pre;&quot;&gt;MainWindow&lt;/span&gt;&lt;span class=&quot;pl-en&quot; style=&quot;background-color: white; box-sizing: border-box; font-family: Consolas, &#39;Liberation Mono&#39;, Menlo, Courier, monospace; font-size: 12px; line-height: 16.7999992370605px; white-space: pre;&quot;&gt;&lt;span style=&quot;color: #333333;&quot;&gt; &lt;/span&gt;&lt;/span&gt;以下的 範例程式可以刪掉)，就可以像 pyqt 一樣使用 loadUi(&#39;mainwindow.ui&#39;) 把 ui 檔裡的元件直接匯入 pyside 程式裡。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEV7SOJVrTRUuWb7MHZF5OVVCuIZ9bOsm0hE4Om_9rt2MfAD7vqcpW5FxNXy8NuRL3DkIy9Q7hDYwSAOe6xU84AP4lx2JWSpYK9Fmw4bpgQ3wGipclMFF0ZTde1-1NTmsoEKYDs8NWiD4/s1600/Screenshot+-+01_01_2015+,+21_06_24.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEV7SOJVrTRUuWb7MHZF5OVVCuIZ9bOsm0hE4Om_9rt2MfAD7vqcpW5FxNXy8NuRL3DkIy9Q7hDYwSAOe6xU84AP4lx2JWSpYK9Fmw4bpgQ3wGipclMFF0ZTde1-1NTmsoEKYDs8NWiD4/s1600/Screenshot+-+01_01_2015+,+21_06_24.png&quot; height=&quot;257&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzm8SGkYhHmYgbIb2m58eCzXhcKuON0JZ_61zDmB9w4mokn4NBedwkoCJaac5AwF13WC4lHnhwhxkTnmNY14M8nzmbe9ucx1pP40kcUmBsAnmJT1ZYrqPKOosbMUZDnPBUOZMN5gM7cUU/s1600/Screenshot+-+01_01_2015+,+21_06_53.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzm8SGkYhHmYgbIb2m58eCzXhcKuON0JZ_61zDmB9w4mokn4NBedwkoCJaac5AwF13WC4lHnhwhxkTnmNY14M8nzmbe9ucx1pP40kcUmBsAnmJT1ZYrqPKOosbMUZDnPBUOZMN5gM7cUU/s1600/Screenshot+-+01_01_2015+,+21_06_53.png&quot; height=&quot;263&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/1007829152215551797/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2015/01/pyside-qt-designer-ui.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1007829152215551797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1007829152215551797'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2015/01/pyside-qt-designer-ui.html' title='如何在 pyside 的程式裡直接使用 Qt designer 產生的 .ui 檔'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEV7SOJVrTRUuWb7MHZF5OVVCuIZ9bOsm0hE4Om_9rt2MfAD7vqcpW5FxNXy8NuRL3DkIy9Q7hDYwSAOe6xU84AP4lx2JWSpYK9Fmw4bpgQ3wGipclMFF0ZTde1-1NTmsoEKYDs8NWiD4/s72-c/Screenshot+-+01_01_2015+,+21_06_24.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-7538272062393045129</id><published>2014-08-05T14:04:00.001+08:00</published><updated>2014-08-05T14:04:34.729+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="一般(general)"/><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>如何把 maya 預設 icon 通通存下來 (how to save maya default icon to a directory)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU88HnZMeOo_cLlbmuvVQ3Bfq0jiOGBFES8Wrjylr9O6MhAfc7zb1XtgNL1ra2cJNSuM_z2LPd-h-gEoa-OlMzSreckJ6mXPb4bmSboTyuhK0RlGHdBZJsxXdrXfMTLP-eE5Yziqih3fI/s1600/maya_icon.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU88HnZMeOo_cLlbmuvVQ3Bfq0jiOGBFES8Wrjylr9O6MhAfc7zb1XtgNL1ra2cJNSuM_z2LPd-h-gEoa-OlMzSreckJ6mXPb4bmSboTyuhK0RlGHdBZJsxXdrXfMTLP-eE5Yziqih3fI/s1600/maya_icon.jpg&quot; height=&quot;452&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
假設你想 &quot;美化&quot; shelf 上的一些小工具，不妨可以換一下工具的小圖案。有哪些圖案可以用呢? 其實 maya 內建就有很多不錯的圖案，個人覺得大部分的狀況下其實不需要自己製作一個圖案(除非是個用途很重要需要一眼就認出來的工具)。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
在 shelf editor 裡可以透過選取介面去選你想要替換的圖案。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWJbdNc_k_YanOI7ihqD5Y3E-m_PSw7BD-GF43NL51YQHB-CcTAweMKrFrtCAYOqkt3ePGtr8vwfPPEFbmLd58dTaj56hg1Z8psh5_rfSOTVsqONADZ65ULiIog_8jM7blNiDwHxQjrVw/s1600/script.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWJbdNc_k_YanOI7ihqD5Y3E-m_PSw7BD-GF43NL51YQHB-CcTAweMKrFrtCAYOqkt3ePGtr8vwfPPEFbmLd58dTaj56hg1Z8psh5_rfSOTVsqONADZ65ULiIog_8jM7blNiDwHxQjrVw/s1600/script.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;→&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUe-xSozKRQCtF8Ai4gn9ur9UzF3KFXAPQtYHzfZXfBm3KT-VIedE0QAeWEOzEUNrZb_EojVN44l4somiPp-ua0Diwsb38ubqzDPBbiYJl7tSkBf9TDzpFViS7oHQdAUZqfk5WyKv8g8M/s1600/maya_with_icon.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUe-xSozKRQCtF8Ai4gn9ur9UzF3KFXAPQtYHzfZXfBm3KT-VIedE0QAeWEOzEUNrZb_EojVN44l4somiPp-ua0Diwsb38ubqzDPBbiYJl7tSkBf9TDzpFViS7oHQdAUZqfk5WyKv8g8M/s1600/maya_with_icon.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWJbdNc_k_YanOI7ihqD5Y3E-m_PSw7BD-GF43NL51YQHB-CcTAweMKrFrtCAYOqkt3ePGtr8vwfPPEFbmLd58dTaj56hg1Z8psh5_rfSOTVsqONADZ65ULiIog_8jM7blNiDwHxQjrVw/s1600/script.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpzhwuIiuJ_WQcyq4qlKCQowH9FhI4jXDAHH9f-aHrqrMEt4dKddPpDam8xker39fwNjG79kAu1G_zbXij3QIjKDKHAeQ8PHTGVgG5YnXjjNp_uc3y1y8rD_tzUMiG1JEJz_zjDiszb1E/s1600/maya_shelf_editor.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpzhwuIiuJ_WQcyq4qlKCQowH9FhI4jXDAHH9f-aHrqrMEt4dKddPpDam8xker39fwNjG79kAu1G_zbXij3QIjKDKHAeQ8PHTGVgG5YnXjjNp_uc3y1y8rD_tzUMiG1JEJz_zjDiszb1E/s1600/maya_shelf_editor.jpg&quot; height=&quot;147&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
只是這樣一行一行預覽可能很難選到你滿意的圖案來表示這工具的用途。以下的小程式可以幫你把所有 maya 內建的圖案下載到一個目錄裡，方便你使用 file browser 來瀏覽。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
python:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;import maya.cmds as cmds
for item in cmds.resourceManager(nf=&#39;*png&#39;):
&amp;nbsp;&amp;nbsp;&amp;nbsp; cmds.resourceManager(s=(item, &quot;H:/rainmaker/maya_icon/{0}&quot;.format(item)))&lt;/code&gt;&lt;/pre&gt;
(把 H:/rainmaker/maya_icon 改為你的指定目錄)&lt;br /&gt;
&lt;br /&gt;
有了這些圖案你就可以快速找到滿意的，然後在 shelf editor 裡直接 filter 圖案名稱去快速替換你想要用的那個圖案。</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/7538272062393045129/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2014/08/maya-icon-how-to-save-maya-default-icon.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7538272062393045129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7538272062393045129'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2014/08/maya-icon-how-to-save-maya-default-icon.html' title='如何把 maya 預設 icon 通通存下來 (how to save maya default icon to a directory)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU88HnZMeOo_cLlbmuvVQ3Bfq0jiOGBFES8Wrjylr9O6MhAfc7zb1XtgNL1ra2cJNSuM_z2LPd-h-gEoa-OlMzSreckJ6mXPb4bmSboTyuhK0RlGHdBZJsxXdrXfMTLP-eE5Yziqih3fI/s72-c/maya_icon.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-2736063595523103136</id><published>2014-07-22T18:58:00.002+08:00</published><updated>2014-07-22T18:58:59.244+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><title type='text'>筆記 : 列出 maya 預設 (無法刪除) 物件</title><content type='html'>&lt;br /&gt;
MEL:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;ls -undeletable&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
pymel:&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;import pymel.core as pm
pm.ls(undeletable=1)&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;試完這指令的結論是 : 還不錯用，但有點怪怪的。 它會多列出一些其實可以被 delete 的物件，例如 objectTypeFilter74, objectScriptFilter10 等等。但除此之外，看起來好像可以透過這指令去找出 maya 的預設 nodes, e.g : defaultRenderLayer, persp, time1.</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/2736063595523103136/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2014/07/maya.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/2736063595523103136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/2736063595523103136'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2014/07/maya.html' title='筆記 : 列出 maya 預設 (無法刪除) 物件'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-4611481237866515953</id><published>2014-06-07T13:03:00.001+08:00</published><updated>2014-06-07T13:03:59.693+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="render"/><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>Render Setting  視窗壞了要怎麼修? (How to fix broken render setting window)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGHF5RVToHPrjtNOsQ1VtKOG6kCuNsczzI5e2rhEKrcnfvBNM7IsnjRfgpm1gaALAkKTfuecWHur7KZPUvgBiPwLAFkb_YrqDTzf9CsoUYBt_YLwlCszzEszlcLhhwCJsllzJBo5YJFF4/s1600/RhIOUWI.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGHF5RVToHPrjtNOsQ1VtKOG6kCuNsczzI5e2rhEKrcnfvBNM7IsnjRfgpm1gaALAkKTfuecWHur7KZPUvgBiPwLAFkb_YrqDTzf9CsoUYBt_YLwlCszzEszlcLhhwCJsllzJBo5YJFF4/s1600/RhIOUWI.jpg&quot; height=&quot;320&quot; width=&quot;214&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
有時候也不知是什麼原因，開啟 render setting window 畫面一整個是空的，所有render選項都消失了，這時候該怎麼修呢?網路上查了一下有人提出了一方法可以殺掉 Maya 的 render setting window 物件，然後再重新產生一個，就可以讓 render setting window 恢復原狀。&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.creativecrash.com/maya/tutorials/scripting/mel/c/fix-broken-render-setting-window-using-simple-mel-command--2&quot;&gt;http://www.creativecrash.com/maya/tutorials/scripting/mel/c/fix-broken-render-setting-window-using-simple-mel-command--2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
簡單來說執行以下這兩行 MEL 指令就對了!&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; deleteUI unifiedRenderGlobalsWindow;  
 buildNewSceneUI;  
&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/4611481237866515953/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2014/06/render-setting-how-to-fix-broken-render.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4611481237866515953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4611481237866515953'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2014/06/render-setting-how-to-fix-broken-render.html' title='Render Setting  視窗壞了要怎麼修? (How to fix broken render setting window)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGHF5RVToHPrjtNOsQ1VtKOG6kCuNsczzI5e2rhEKrcnfvBNM7IsnjRfgpm1gaALAkKTfuecWHur7KZPUvgBiPwLAFkb_YrqDTzf9CsoUYBt_YLwlCszzEszlcLhhwCJsllzJBo5YJFF4/s72-c/RhIOUWI.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-7243904235455478635</id><published>2014-02-17T14:27:00.002+08:00</published><updated>2014-03-18T23:24:53.194+08:00</updated><title type='text'>Maya 教學影片 (官方 Autodesk Area 連結)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://static.squarespace.com/static/526b5a8ee4b00a92c905be24/52cf5156e4b0110907906c47/52cf515de4b0110907906c52/1389318495787/Maya2014.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://static.squarespace.com/static/526b5a8ee4b00a92c905be24/52cf5156e4b0110907906c47/52cf515de4b0110907906c52/1389318495787/Maya2014.png&quot; height=&quot;320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Maya Tips and Tricks from Autodesk University 2013 (1 of 5)&lt;br /&gt;
&lt;div&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/N6p2YKBvZtI&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maya Tips and Tricks from Autodesk University 2013 (2 of 5)&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/N6p2YKBvZtI&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
Maya Tips and Tricks from Autodesk University 2013 (3 of 5)&lt;br /&gt;
customizing Maya&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/2wQMzsyLKJQ&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Maya Tips and Tricks from Autodesk University 2013 (4 of 5)&lt;br /&gt;
Rigging&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/S7XJsaDb3Vk&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Maya Tips and Tricks from Autodesk University 2013 (5 of 5)&lt;br /&gt;
Dynamics&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/NUyeZup3Y0c&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

Maya Mondays - Camera Tips and Tricks&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/hRfflCrNVbc&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Maya Monday - Set Driven Key&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/VR2AF5gaAkw&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
Link to Dave model: https://www.dropbox.com/s/typtbvmq88o7bty/monster_101_ver02.mb.zip&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maya Mondays - Depth of Field&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/nLzKwh1wtjQ&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Maya tips and tricks for the new year&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;//www.youtube.com/embed/PQOLJyw8szU&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Maya BonusTools - Display Tools&lt;br /&gt;
&lt;a href=&quot;https://area.autodesk.com/blogs/stevenr/maya-bonustools---display-tools&quot;&gt;https://area.autodesk.com/blogs/stevenr/maya-bonustools---display-tools&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
來源:&amp;nbsp;&lt;a href=&quot;https://area.autodesk.com/blogs/&quot;&gt;https://area.autodesk.com/blogs/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/7243904235455478635/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2014/02/maya-area.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7243904235455478635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7243904235455478635'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2014/02/maya-area.html' title='Maya 教學影片 (官方 Autodesk Area 連結)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-3702086332270685774</id><published>2014-02-13T10:18:00.000+08:00</published><updated>2014-03-18T23:25:32.953+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="一般(general)"/><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>Maya 2014 的 multi component selection 問題 </title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV-9bUXJZ1Tt93SI7oF0uvH2bjP4EsVcnKuFoMuLXy4_nEbbWEeqo6TpvUZLASUujbOBWGWMjjxxgRXFaEESKRhQdkTgQniWb8suAe7HP4N9DS-WhlhlcAYIeWaNzI4dzfiKKiqlZ2gWQ/s1600/multi_component_select.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV-9bUXJZ1Tt93SI7oF0uvH2bjP4EsVcnKuFoMuLXy4_nEbbWEeqo6TpvUZLASUujbOBWGWMjjxxgRXFaEESKRhQdkTgQniWb8suAe7HP4N9DS-WhlhlcAYIeWaNzI4dzfiKKiqlZ2gWQ/s1600/multi_component_select.png&quot; height=&quot;272&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
在 Maya 2014 之前的版本，要同時選取不同的 component （vertex &amp;amp; edge, face &amp;amp; vertex) 是件很容易做到的事情。例如 edge&amp;amp;vertex, 只要先選好 edge, 在按右鍵 切換到 vertex 模式 shift+選 vertex 就可以了。但在maya 2014 這版本卻無法做到這件事。只要切換到別的 component 模式，原本被選取的 component 就會消失。&lt;br /&gt;
&lt;br /&gt;
原來 Maya 2014 的 multi component selection 行為是有做了些變動。但幸好在 preference 裡還是保留了可以回到舊行為的選項。那就是在 preference 裡的 selection-&amp;gt; preserve component selection 這個選項。只要不打勾它就可以回到以前的 &quot;正常&quot; 行為 。&lt;br /&gt;
&lt;br /&gt;
n.b. : 這選項的寫法其實也有點怪。照常來說一般人會認為 &quot;preserve component selection &quot; 就是要保留不同的 component 選取結果，但它卻是反過來的意思。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglRHdeZfqkK9yTIv4C-jh1S1Rq2Wihowf9ZcHW9__3-JRtckoZigppUNxwNVCsaBBBPaBKmReIcXQ-p4cq74Chd7oUmfo37VhWQ0eXzCNInYc5CYX4w1dogaQglUXZgrm7S3hpgQNQF_w/s1600/multi_component_select_preference.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglRHdeZfqkK9yTIv4C-jh1S1Rq2Wihowf9ZcHW9__3-JRtckoZigppUNxwNVCsaBBBPaBKmReIcXQ-p4cq74Chd7oUmfo37VhWQ0eXzCNInYc5CYX4w1dogaQglUXZgrm7S3hpgQNQF_w/s1600/multi_component_select_preference.png&quot; height=&quot;279&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;


&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
當然在 Maya 裡還有一個 component 模式是可以達到類似的效果，也就是 Multi 這個模式。但是有些人還是會習慣切換到專屬模式來做選取。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBhpRXpD7ohpSV2Sa1Thm6AAjbGnYq6McwQrfSL3i_F02dQyNYaFIULi7lV0euydU9kWSKGmUpP9kV-hyut7Q8lJGAVGZRF2ZrZeEbE2Mu1wCkcDRmkqeYRUEe45Sa9DmtSRfiCj49YDo/s1600/multi_mode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBhpRXpD7ohpSV2Sa1Thm6AAjbGnYq6McwQrfSL3i_F02dQyNYaFIULi7lV0euydU9kWSKGmUpP9kV-hyut7Q8lJGAVGZRF2ZrZeEbE2Mu1wCkcDRmkqeYRUEe45Sa9DmtSRfiCj49YDo/s1600/multi_mode.png&quot; height=&quot;282&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/3702086332270685774/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2014/02/maya-2014-multi-component-selection.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3702086332270685774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/3702086332270685774'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2014/02/maya-2014-multi-component-selection.html' title='Maya 2014 的 multi component selection 問題 '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV-9bUXJZ1Tt93SI7oF0uvH2bjP4EsVcnKuFoMuLXy4_nEbbWEeqo6TpvUZLASUujbOBWGWMjjxxgRXFaEESKRhQdkTgQniWb8suAe7HP4N9DS-WhlhlcAYIeWaNzI4dzfiKKiqlZ2gWQ/s72-c/multi_component_select.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-667034199991217577</id><published>2013-12-15T21:06:00.002+08:00</published><updated>2014-03-18T23:25:57.499+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="一般(general)"/><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>存 .ma 檔時保留節點屬性的全名 (save attribute full names in .ma file)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirrppTnVyGB-opO6va4EDykCkLlrKc4LXUFcCaexqNF9TrwXCHnA8NhNsUXaEnu5VDq8Gpfdrau7jTm_o8wJZ2AC6SBzn7hoBdTKJr8vHTxWLl7L3vbLifyrWs0aGB_WYMTJGxSAPfYPs/s1600/save_full_attribute_name.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirrppTnVyGB-opO6va4EDykCkLlrKc4LXUFcCaexqNF9TrwXCHnA8NhNsUXaEnu5VDq8Gpfdrau7jTm_o8wJZ2AC6SBzn7hoBdTKJr8vHTxWLl7L3vbLifyrWs0aGB_WYMTJGxSAPfYPs/s320/save_full_attribute_name.jpg&quot; height=&quot;262&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
有時候為了偷學 Maya 怎麼做事或是想知道某個節點 ( node ) 會有哪一些屬性 ( attribute )可以用，我們可能需要使用文字編輯器打開 Maya 的 .ma 檔。但一般來說 Maya 並不會在 .ma 檔裡把屬性的全名存起來，而是用簡稱來代替 (可能是為了縮減檔案大小吧)。&lt;br /&gt;
&lt;br /&gt;
以下是 &quot;正常&quot; Maya 會存的格式。我們從這裡並很難看出來 .s .g .wgt 這種屬性到底是代表什麼，必須到 maya 官方 help 才可以查得出來 wgt --&amp;gt; &lt;span style=&quot;font-family: arial;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;weightedTangents, &amp;nbsp;cuv --&amp;gt; createUVs .&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; createNode lightLinker -s -n &quot;lightLinker1&quot;;  
     setAttr -s 2 &quot;.lnk&quot;;  
     setAttr -s 2 &quot;.slnk&quot;;  
 createNode displayLayerManager -n &quot;layerManager&quot;;  
 createNode displayLayer -n &quot;defaultLayer&quot;;  
 createNode renderLayerManager -n &quot;renderLayerManager&quot;;  
 createNode renderLayer -n &quot;defaultRenderLayer&quot;;  
     setAttr &quot;.g&quot; yes;  
 createNode polyCube -n &quot;polyCube1&quot;;  
     setAttr &quot;.cuv&quot; 4;  
 createNode animCurveUL -n &quot;pCube1_translateX&quot;;  
     setAttr &quot;.tan&quot; 18;  
     setAttr &quot;.wgt&quot; no;  
     setAttr -s 3 &quot;.ktv[0:2]&quot; 0.00078463554382324219 0 3.7023928165435791   
         -6.4533541657909801 5.9996156692504883 -0.74532827237241772;  
 createNode animCurveUL -n &quot;pCube1_translateY&quot;;  
     setAttr &quot;.tan&quot; 18;  
     setAttr &quot;.wgt&quot; no;  
     setAttr -s 3 &quot;.ktv[0:2]&quot; 0.00060009956359863281 0 3.7026000022888184   
         6.453 5.9995999336242676 -0.745;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;


有一個方法可以強迫 Maya 把屬性全名存下來，也就是在 save as[] 時打開 Use full names for attributes on nodes 這選項。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
相較之下，這種存法就清楚多了。不需要額外上網搜尋就大概可以了解每個屬性到底是可以用來設定什麼參數。&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; createNode lightLinker -shared -name &quot;lightLinker1&quot;;  
     setAttr -size 2 &quot;.link&quot;;  
     setAttr -size 2 &quot;.shadowLink&quot;;  
 createNode displayLayerManager -name &quot;layerManager&quot;;  
 createNode displayLayer -name &quot;defaultLayer&quot;;  
 createNode renderLayerManager -name &quot;renderLayerManager&quot;;  
 createNode renderLayer -name &quot;defaultRenderLayer&quot;;  
     setAttr &quot;.global&quot; yes;  
 createNode polyCube -name &quot;polyCube1&quot;;  
     setAttr &quot;.createUVs&quot; 4;  
 createNode animCurveUL -name &quot;pCube1_translateX&quot;;  
     setAttr &quot;.tangentType&quot; 18;  
     setAttr &quot;.weightedTangents&quot; no;  
     setAttr -size 3 &quot;.keyTimeValue[0:2]&quot; 0.00078463554382324219 0 3.7023928165435791   
         -6.4533541657909801 5.9996156692504883 -0.74532827237241772;  
 createNode animCurveUL -name &quot;pCube1_translateY&quot;;  
     setAttr &quot;.tangentType&quot; 18;  
     setAttr &quot;.weightedTangents&quot; no;  
     setAttr -size 3 &quot;.keyTimeValue[0:2]&quot; 0.00060009956359863281 0 3.7026000022888184   
         6.453 5.9995999336242676 -0.745;  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/667034199991217577/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2013/12/ma-save-attribute-full-names-in-ma-file.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/667034199991217577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/667034199991217577'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2013/12/ma-save-attribute-full-names-in-ma-file.html' title='存 .ma 檔時保留節點屬性的全名 (save attribute full names in .ma file)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirrppTnVyGB-opO6va4EDykCkLlrKc4LXUFcCaexqNF9TrwXCHnA8NhNsUXaEnu5VDq8Gpfdrau7jTm_o8wJZ2AC6SBzn7hoBdTKJr8vHTxWLl7L3vbLifyrWs0aGB_WYMTJGxSAPfYPs/s72-c/save_full_attribute_name.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-1328138120138652496</id><published>2013-12-08T14:21:00.001+08:00</published><updated>2014-03-18T23:26:23.177+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'> 在 Outliner 展開節點底下的所有階層 ( expand all hierarchy in outliner)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz44fiyfV3JIjFJcNp1imDIXQkRtXJAolz3alfSoveUeybPI48julfsHDIL6wl_QE_W-oobnbnaoX1L0AeRjVwmDvBM6cQTCBl6wGtP-30V-hnRlQH2C4X_662xg4ui6SK-43-IAT5WCk/s1600/outliner_spread.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz44fiyfV3JIjFJcNp1imDIXQkRtXJAolz3alfSoveUeybPI48julfsHDIL6wl_QE_W-oobnbnaoX1L0AeRjVwmDvBM6cQTCBl6wGtP-30V-hnRlQH2C4X_662xg4ui6SK-43-IAT5WCk/s320/outliner_spread.jpg&quot; height=&quot;320&quot; width=&quot;248&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
大部分的 Maya 使用者應該都知道在 Outliner裡按 F 的話可以顯示被選取的物件所在的位子。但最近實作一些檔案時需要檢查某個節點的所有階層關係，於是我就在網路上發現了一個方法，也就是 按住&amp;nbsp;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR97ISYZEme_7brwjVU_yXYMc-h-dxuBPNEHoW9DusDGiDbKiAIpmu7snrV8hGwAWg536iMBx1Dq9JssxY76keeGiQSpalDc1RzsJD4AV4Ev_myvSo_F0hTWFxy6nDgvr3TjtvbhhjlE8/s1600/GUID-08667A50-F943-4CA7-AF8B-4BF2A40E3297-low.png&quot; /&gt;&amp;nbsp; +&amp;nbsp;左鍵按下 outliner 裡的&amp;nbsp;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JnjztRZ9vCYYfP8ajaz-yPNnFIiii9vjD4NFxnxrprq4FnXKlxiWaZhBCrUimY-qKsAsFTrwD5AR9ONZGQlLS-HBQef4TWYm7lNMFm_Yj90FuCl9Z65ywgpdvJtvidMOKn3MDZgTUMA/s1600/GUID-370190BF-6612-4E4A-AD24-7A5100A32840-low.png&quot; /&gt;&amp;nbsp; (shitft&amp;nbsp;+ left click &amp;nbsp;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3JnjztRZ9vCYYfP8ajaz-yPNnFIiii9vjD4NFxnxrprq4FnXKlxiWaZhBCrUimY-qKsAsFTrwD5AR9ONZGQlLS-HBQef4TWYm7lNMFm_Yj90FuCl9Z65ywgpdvJtvidMOKn3MDZgTUMA/s1600/GUID-370190BF-6612-4E4A-AD24-7A5100A32840-low.png&quot; /&gt;&amp;nbsp;)&amp;nbsp;, 就可以把目前選取的物件所有底下的階層都展開。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;

</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/1328138120138652496/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2013/12/outliner-expand-all-hierarchy-in.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1328138120138652496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/1328138120138652496'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2013/12/outliner-expand-all-hierarchy-in.html' title=' 在 Outliner 展開節點底下的所有階層 ( expand all hierarchy in outliner)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz44fiyfV3JIjFJcNp1imDIXQkRtXJAolz3alfSoveUeybPI48julfsHDIL6wl_QE_W-oobnbnaoX1L0AeRjVwmDvBM6cQTCBl6wGtP-30V-hnRlQH2C4X_662xg4ui6SK-43-IAT5WCk/s72-c/outliner_spread.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-7584232572393842510</id><published>2013-11-24T22:23:00.001+08:00</published><updated>2013-11-24T22:23:31.915+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="一般(general)"/><category scheme="http://www.blogger.com/atom/ns#" term="介面(UI)"/><title type='text'>如何關掉 Maya 2014 的 Help 訊息 (In View Messages) ?</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOezA2Rg-5gK-Z5RN0mjLvXAzEakXUqxbxcBwaU9vFmqGoUkAvp2M7S6N1t-X9ML7wiKKoypFAaHELiCAbqoiAYiPRHmfNLF_TyqQBCYBBiAlk6JUX_7yWTKTzHuXKSZQh13eB4TO8Yic/s1600/help_01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOezA2Rg-5gK-Z5RN0mjLvXAzEakXUqxbxcBwaU9vFmqGoUkAvp2M7S6N1t-X9ML7wiKKoypFAaHELiCAbqoiAYiPRHmfNLF_TyqQBCYBBiAlk6JUX_7yWTKTzHuXKSZQh13eB4TO8Yic/s400/help_01.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Maya 2014 新增了一個功能，看來是針對 Maya 新手所設計的，也就是當你用了一些快速鍵時，在 畫面上會顯示訊息告訴你這快速鍵的用法。這功能雖然很貼切，但對於靠 Maya 吃飯的人來說卻可能只是一種干擾。如此&quot;假會&quot;的功能要在哪關掉呢?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
最快的方式就是透過 Display -&amp;gt; Heads up Display -&amp;gt; In View Messages 這裡切換。&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVP6R7vBlHG2S5RtAx599XTNsMKYId71XS07ccOioLKoDRBDUSDbjtko6ChK7xgzrRgA1Z-lSbjrRx0GEhTxIGqP4iICWYvmKwOEqSxO98ektfT8cJqLwehnQXMy_bhqMMpMzSmLXh5qg/s1600/help_02.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVP6R7vBlHG2S5RtAx599XTNsMKYId71XS07ccOioLKoDRBDUSDbjtko6ChK7xgzrRgA1Z-lSbjrRx0GEhTxIGqP4iICWYvmKwOEqSxO98ektfT8cJqLwehnQXMy_bhqMMpMzSmLXh5qg/s400/help_02.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;把 In View Messages 勾勾拿掉，就可以再也不用看到礙眼的 Help 訊息。&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
另外還有一個地方可以調整這個Help 設定就在 Window-&amp;gt; Settings/Preferences-&amp;gt; Preferences 裡的 Help 分區。在這有比較完整的 &quot;小幫手&quot; 選項，例如 顯示時間長短，字體大小，還有透明度等設定可以調。&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE_rJSn1Gjk9SfDGGDr3VU59SBS3iwySzHDvylUSFwQBksGlZM4B85XsFMlZXTH4ORRVuBZK3rqqbXXKiR3NWkhHH-5knt2_VhzNXl3Yzm0RfcSXfYIEc24_lyQMWpHgsKDi_IdMAyM18/s1600/help_03.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;292&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE_rJSn1Gjk9SfDGGDr3VU59SBS3iwySzHDvylUSFwQBksGlZM4B85XsFMlZXTH4ORRVuBZK3rqqbXXKiR3NWkhHH-5knt2_VhzNXl3Yzm0RfcSXfYIEc24_lyQMWpHgsKDi_IdMAyM18/s400/help_03.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/7584232572393842510/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2013/11/maya-2014-help-in-view-messages.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7584232572393842510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/7584232572393842510'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2013/11/maya-2014-help-in-view-messages.html' title='如何關掉 Maya 2014 的 Help 訊息 (In View Messages) ?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOezA2Rg-5gK-Z5RN0mjLvXAzEakXUqxbxcBwaU9vFmqGoUkAvp2M7S6N1t-X9ML7wiKKoypFAaHELiCAbqoiAYiPRHmfNLF_TyqQBCYBBiAlk6JUX_7yWTKTzHuXKSZQh13eB4TO8Yic/s72-c/help_01.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-4165990492849476827</id><published>2013-11-09T21:34:00.002+08:00</published><updated>2014-02-13T11:32:53.359+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><title type='text'>如何安裝與使用 python script ( How to install and use Python script in Maya)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXJMxmxBCGRlrLaU210bI12XQFM8S1MIdNxG9pg9ig788zbRqmzACrdnYQHkn67_a_7JFE6V6JkbGhlxIfnsXcffmfCy92DDPyo-frI4ImqdBuANr5IZxuvepeMG-m_QNhPymCjMXZ0GA/s1600/maya_love_python.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXJMxmxBCGRlrLaU210bI12XQFM8S1MIdNxG9pg9ig788zbRqmzACrdnYQHkn67_a_7JFE6V6JkbGhlxIfnsXcffmfCy92DDPyo-frI4ImqdBuANr5IZxuvepeMG-m_QNhPymCjMXZ0GA/s320/maya_love_python.jpg&quot; height=&quot;149&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
在網路上看到不少人說 自從 Autodesk 併購 Alias 之後，Maya 就沒什麼功能上的突破了。這批評不完全失真，但這麼說就有點委屈Autodesk Maya 團隊了，因為從 Maya8.5 至 2014 ，Autodesk Maya 團隊最大的貢獻之一就是把Maya 變成一個客製性非常高並且相對穩定的一個系統。這一點對一個中大型製作團隊來說非常有吸引力。其中一個亮點就是 Python 。&lt;br /&gt;
&lt;br /&gt;
在 2007 年 (Maya 8.5版，Autodesk(或Alias) 團隊開始把 Python 引進 Maya 裡當一個工具開發語言之一(其他兩個就是 MEL &amp;amp; C++)。相對於其他那兩位，Python 是一個易懂，方便，功能有強大的一個語言。MEL 雖然是 Maya 的core script language, 可是因為功能上限制太多了，也沒有額外的 library 支援，所以可以開發的工具非常有限。C++ 又是一個 hardcore 的程式語言 ，需要經過編譯過才可以用，執行檔又無法跨作業系統使用，所以開發起來非常不便。Python 就剛好可以站在這兩位的中間，而且可以取代很多 Mel &amp;amp; C++ 的必要性，所以也難怪近年來 Python 的程式 (尤其是 script 類的) 越來越普遍了。&lt;br /&gt;
&lt;br /&gt;
在這我就大概分享一下 Python script 的第一門課。也就是如何安裝以及使用它 。其實我的 blog 第一篇文章就有稍微解釋如何安裝 python 程式，只是又跟 MEL &amp;amp; C++&amp;nbsp;混雜在一起，所以在這就特別針對 python 在分享一次。&lt;br /&gt;
&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- middle of post ads --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:728px;height:90px&quot;
     data-ad-client=&quot;ca-pub-2570508290450438&quot;
     data-ad-slot=&quot;9681059042&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;br /&gt;
呼叫一個python 程式時，Maya Python 需要先知道這程式的位子在哪。不像 Mel script 可以直接指定絕對路徑 (source &quot;C:/mymaya/scripts/myscript.mel&quot;) ，Python 指令並沒有這一種 source 絕對路徑的方式。所以我們必須告知 Python 編譯器要在哪找這程式。有幾種方法可以用:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;大家可能最熟悉的方式就是把 Python script 放在 maya 預設的 script 目錄裡，例如 :
&lt;ul&gt;
&lt;li&gt;C:\Users\rainmaker\Documents\maya\2013\scripts&lt;/li&gt;
&lt;li&gt;/home/rainmaker/maya/2011-x64/scripts&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
放在這的好處就是方便，但缺點就是不好做分類或管控。&lt;/li&gt;
&lt;li&gt;在 Maya.env 檔案裡列出你想要增加的目錄，例如:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;PYTHONPATH = C:\mymaya\scripts\python; D:\others\maya_scripts\;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
(Maya.env 的檔案位子請參考&lt;a href=&quot;http://maya-tricks.blogspot.tw/search/label/mel%2Fpython?updated-max=2009-11-23T18:50:00%2B08:00&amp;amp;max-results=20&amp;amp;start=20&amp;amp;by-date=false&quot;&gt;此文章&lt;/a&gt;)

&lt;br /&gt;&lt;br /&gt;
&lt;li&gt;直接在 script editor 裡指定目錄的路徑。例如 :&lt;/li&gt;
&lt;div&gt;
&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; import sys  
 sys.path.append(&#39;C:/home/myfolder&#39;)  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;或&lt;/li&gt;
&lt;li&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; import sys  
 sys.path.insert(0,&#39;C:/home/myfolder&#39;)  
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
append 跟 insert 的差異就是 append 會吧目錄搜尋順序放到最後面，insert 是放到最前面。這就看你想讓 python 先搜尋哪一個目錄來決定。&lt;br /&gt;
用這方法的好處就是 可以直接在 Maya裡增加script目錄，缺點就是每次開 Maya 都需要執行一次 (一個目錄 insert/append 一次就夠了，不需要每次呼叫 python 程式都增加一次)。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8JkCZE-jn5cFQuZ8882h9QkIsJbNI2lInyruKMC6tAIWGNoQfP2nmeT_-zRkfo8QzQt0XVY6QsQ2AnMSQsCEPUU6U0BS-xN7Fx7LkcisM_1BSg0rwLlxwTKSCt5PT5JrZ2tO4GapanKk/s1600/insert_python_folder.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8JkCZE-jn5cFQuZ8882h9QkIsJbNI2lInyruKMC6tAIWGNoQfP2nmeT_-zRkfo8QzQt0XVY6QsQ2AnMSQsCEPUU6U0BS-xN7Fx7LkcisM_1BSg0rwLlxwTKSCt5PT5JrZ2tO4GapanKk/s320/insert_python_folder.jpg&quot; height=&quot;200&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
把 script 目錄增加完過後，我們就可以開始在 script editor 裡呼在此目錄裡的叫 python script 了。&lt;br /&gt;
&lt;br /&gt;
一般來說，呼叫 python script 的 &amp;nbsp;方法就是 import [檔案名字 (不包含.py 或 .pyc)] ，然後在執行 script 裡的某一個 function。 通常 script 作者都會告訴你要執行哪一個 function 來開工具視窗或執行工具的某個功能。在呼叫 function 之前也可以加一行 reload([檔案名字]) 。加這一行的目的是為了強迫 python 編譯器重新讀取該檔案 (如果沒重開Maya 然後檔案內容有更新就需要執行這一行)。&lt;br /&gt;
&lt;br /&gt;
以下我有提供一個簡單的 Maya python script 來方便做測試. 呼叫方法就是:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; import callMe  
 callMe.go()  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://brainyart.me/others/maya_scripts/callMe.pyt&quot;&gt;callMe.pyt&lt;/a&gt;&lt;br /&gt;
(把副檔名從 .pyt 改為 .py)&lt;br /&gt;
&lt;br /&gt;
成功執行的話，在Maya script editor 就會顯示 : I am here&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQNgFqBS8aMiQoGGsqgmqLDqVJRT52Gn5CvtESZBykjUiQOYbPQ3mh0fVn_C0PNvVVr_Bdwol5RCY_GsIy8qhxMq8oRlaPMLXDFuEOMrOkLJBtJcTBLAuDj24VXweKmEG7SFvDhGIB2vY/s1600/callme.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQNgFqBS8aMiQoGGsqgmqLDqVJRT52Gn5CvtESZBykjUiQOYbPQ3mh0fVn_C0PNvVVr_Bdwol5RCY_GsIy8qhxMq8oRlaPMLXDFuEOMrOkLJBtJcTBLAuDj24VXweKmEG7SFvDhGIB2vY/s320/callme.jpg&quot; height=&quot;230&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
失敗的話大概就會出現紅字吧 XD&lt;br /&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/4165990492849476827/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2013/11/python-script-how-to-install-and-use.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4165990492849476827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4165990492849476827'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2013/11/python-script-how-to-install-and-use.html' title='如何安裝與使用 python script ( How to install and use Python script in Maya)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXJMxmxBCGRlrLaU210bI12XQFM8S1MIdNxG9pg9ig788zbRqmzACrdnYQHkn67_a_7JFE6V6JkbGhlxIfnsXcffmfCy92DDPyo-frI4ImqdBuANr5IZxuvepeMG-m_QNhPymCjMXZ0GA/s72-c/maya_love_python.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-4167030955115641706</id><published>2013-10-25T11:54:00.000+08:00</published><updated>2013-10-25T11:54:06.308+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="動畫 (animation)"/><title type='text'> 移除數值不變的 animation curve ( delete static animation curve or static channel)</title><content type='html'>在 Maya 製作動畫時，比較 &quot;懶惰&quot; 的大家 （包括我) 都常常會使用 快速鍵 &quot;s&quot; 來直接 key 所有的 channel. 雖然方便，但有個缺點就是數值不變的 channel 也會被 key 到. 之後要在 graph editor 編輯 animation curve 時 就會發現有一堆 &quot;垃圾&quot; curve 存在.&lt;br /&gt;
&lt;br /&gt;
Maya 裡有一個功能可以直接移除這些&amp;nbsp;數值不變的 animation curve.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;選取物件 (例如 pSphere1)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnIgVqu8Ri1nCvOSWTgdY9c05YHPvNwkB5sAHJnSFNyzdbv5ljYgzpNRx-v335sZhRpzx71hi-BdHZPyPwZ8d9EHkGMrJ9xOUAV4INZmZDokd8lW47rQNZhbSxG3KWL_aKUns43_mavRc/s1600/delete_static_channel_before.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnIgVqu8Ri1nCvOSWTgdY9c05YHPvNwkB5sAHJnSFNyzdbv5ljYgzpNRx-v335sZhRpzx71hi-BdHZPyPwZ8d9EHkGMrJ9xOUAV4INZmZDokd8lW47rQNZhbSxG3KWL_aKUns43_mavRc/s320/delete_static_channel_before.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;rotate &amp;amp; scale channel 都沒變動&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;執行 Edit -&amp;gt; Delete by Type -&amp;gt; Static Channels&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibEcKPIq_F_hwL0hinLygZF0gRIfoCXvjhfEJMBeFtTtw3KdOGWiJQll4dc0PR40714oh4sCz52-apjtwyiOt-Xun2Mkej7uP7RgHc0amG2AiQTiVNd7sciQa-QLpPTuLH3NsZf78TFvU/s1600/delete_static_channel_command.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibEcKPIq_F_hwL0hinLygZF0gRIfoCXvjhfEJMBeFtTtw3KdOGWiJQll4dc0PR40714oh4sCz52-apjtwyiOt-Xun2Mkej7uP7RgHc0amG2AiQTiVNd7sciQa-QLpPTuLH3NsZf78TFvU/s320/delete_static_channel_command.png&quot; style=&quot;cursor: move;&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
移除&amp;nbsp;&lt;i&gt;沒變動的 channel&lt;/i&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4rDK13CYGbPRl-8DLgVvL9Qh8DbVKEVSH2WyL3KQEz01Aq0OBt6BZcIfxsWCKnflYdHr4bEzCMPYyAGDucQMqjR3Fnc3rNeML09CDd_eYLJOz2oqPkULsrasevFQp7tZlsazVEfL0uR4/s1600/delete_static_channel_after.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4rDK13CYGbPRl-8DLgVvL9Qh8DbVKEVSH2WyL3KQEz01Aq0OBt6BZcIfxsWCKnflYdHr4bEzCMPYyAGDucQMqjR3Fnc3rNeML09CDd_eYLJOz2oqPkULsrasevFQp7tZlsazVEfL0uR4/s320/delete_static_channel_after.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;i&gt;執行完的結果&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/4167030955115641706/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2013/10/animation-curve-delete-static-animation.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4167030955115641706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4167030955115641706'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2013/10/animation-curve-delete-static-animation.html' title=' 移除數值不變的 animation curve ( delete static animation curve or static channel)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnIgVqu8Ri1nCvOSWTgdY9c05YHPvNwkB5sAHJnSFNyzdbv5ljYgzpNRx-v335sZhRpzx71hi-BdHZPyPwZ8d9EHkGMrJ9xOUAV4INZmZDokd8lW47rQNZhbSxG3KWL_aKUns43_mavRc/s72-c/delete_static_channel_before.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-5442717882605532227</id><published>2013-09-11T15:49:00.004+08:00</published><updated>2013-09-11T15:49:47.865+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="rigging"/><category scheme="http://www.blogger.com/atom/ns#" term="建模(modeling)"/><title type='text'>把物件軸心移到原點 (0,0,0) 的位子</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnNQr7VHhabwh10ttihPZap3JBNfhsupx_TNpBByhgePPzeZPjYxPUo6ThDLyv7uEa2BcIPCtboYTNGqcXVQiGyNtOrrARjy870j-OIZJK68qYGGycd0BMaUa_gH75FhTaaHJ50KXkf4/s1600/movePivotToOrigin.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;288&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnNQr7VHhabwh10ttihPZap3JBNfhsupx_TNpBByhgePPzeZPjYxPUo6ThDLyv7uEa2BcIPCtboYTNGqcXVQiGyNtOrrARjy870j-OIZJK68qYGGycd0BMaUa_gH75FhTaaHJ50KXkf4/s320/movePivotToOrigin.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
以下小程式是用來把物件的&amp;nbsp;軸心 / 中心點 快速移到場景原點 (0,0,0) 的位子.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MEL:&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; {  
   string $sel[]=`ls -sl`;  
   for($each in $sel)  
     xform -ws -piv 0 0 0 $each;  
 }  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Pymel:&lt;br /&gt;
&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GeEPQe1a1JHJaK2caAlWYStTquseAy0o5Hy6X9j3sv6w5NzppmkoLXiLAoDJ-P0QQyWWZMsvSrDtf8H5HwsMu0vwgMxMOg85T2KBwg1f8S7_QZaB-17gSIsxlHT0SHoJNfQyc6tySRRt/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; import pymel.core as pm  
 selected = pm.ls(sl=1)  
 for eachSel in selected:  
   pm.xform(eachSel,ws=True,pivots=[0,0,0])  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/5442717882605532227/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2013/09/000.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/5442717882605532227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/5442717882605532227'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2013/09/000.html' title='把物件軸心移到原點 (0,0,0) 的位子'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJnNQr7VHhabwh10ttihPZap3JBNfhsupx_TNpBByhgePPzeZPjYxPUo6ThDLyv7uEa2BcIPCtboYTNGqcXVQiGyNtOrrARjy870j-OIZJK68qYGGycd0BMaUa_gH75FhTaaHJ50KXkf4/s72-c/movePivotToOrigin.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-4514281267510060650</id><published>2012-09-01T15:21:00.000+08:00</published><updated>2012-09-01T15:21:06.339+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mel/python"/><category scheme="http://www.blogger.com/atom/ns#" term="rigging"/><title type='text'>快速建立 blendshape 小程式</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRrpzNTuHMP1_xtgNeS7wLIttHPzuDq73fxddzXq1BBAhmhbF6RSBWbd0x65zgojCcafgvma7ekAhEt80HYgkVc2nh1uGeW6Cykq47LhXRJli_fui7ckALMLdUmagO76OI5-45GDdqzOo/s1600/bs.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRrpzNTuHMP1_xtgNeS7wLIttHPzuDq73fxddzXq1BBAhmhbF6RSBWbd0x65zgojCcafgvma7ekAhEt80HYgkVc2nh1uGeW6Cykq47LhXRJli_fui7ckALMLdUmagO76OI5-45GDdqzOo/s320/bs.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Maya 的 Blendshape 功能 (Animation Menu --&amp;gt; Create Deformers --&amp;gt; Blend Shape) 有個不方便的地方就是 : 設定裡沒有一個選項是可以讓 weight 的預設值為 1 的 ! (或是其時有但我從沒發現過?!?)&lt;br /&gt;
&lt;br /&gt;
於是在這我提供一段小程式來協助大家快速建立 blendshape 並且把 weight 設為 1 :&lt;br /&gt;
&lt;br /&gt;
MEL:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;{

&amp;nbsp;$origin = &quot;world&quot;;

$blendNode = `blendShape -origin $origin`;

setAttr ($blendNode[0]+&quot;.weight[0]&quot;) 1;

}

&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
pymel:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;&quot;&gt;&lt;code&gt;import pymel.core as pm
origin = &#39;world&#39;

blendNode = pm.blendShape(origin=origin)[0]

blendNode.weight[0].set(1)&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
若 blendshape 座標想從世界座標改為物件相對座標，那就把&amp;nbsp;origin 從 &quot;world&quot; 改為 &quot;local&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/4514281267510060650/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2012/09/blendshape.html#comment-form' title='5 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4514281267510060650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/4514281267510060650'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2012/09/blendshape.html' title='快速建立 blendshape 小程式'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRrpzNTuHMP1_xtgNeS7wLIttHPzuDq73fxddzXq1BBAhmhbF6RSBWbd0x65zgojCcafgvma7ekAhEt80HYgkVc2nh1uGeW6Cykq47LhXRJli_fui7ckALMLdUmagO76OI5-45GDdqzOo/s72-c/bs.jpg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8400563081117910408.post-526949078801051143</id><published>2012-06-26T20:47:00.003+08:00</published><updated>2012-06-26T20:55:15.775+08:00</updated><title type='text'>切換貼圖的方法之一 ( a practical way to switch texture in rig file)</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWYNnNNos_4Wl36e-JGqoIifqHa1BFboPAYOax7h1H6FR4rhTzpTnbX2cTqVPlK291Dl2fH4lm4KI5rbrX5DGHlsvuRGcmb3SJWJ4aMNIKmRSkQhbZonu3Dml6jZWiNfSPMcvB2Wh8EMA/s1600/title.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWYNnNNos_4Wl36e-JGqoIifqHa1BFboPAYOax7h1H6FR4rhTzpTnbX2cTqVPlK291Dl2fH4lm4KI5rbrX5DGHlsvuRGcmb3SJWJ4aMNIKmRSkQhbZonu3Dml6jZWiNfSPMcvB2Wh8EMA/s1600/title.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
某些角色或物件或場景可能只差在於貼圖長得不一樣，所以需要在 rig 檔案裡做切換貼圖的功能。要達到這件事有好幾種方法，例如使用 condition node, 或 file sequence 當 input等。個人覺得以下這方法(使用 choice node 當切換機) 還不錯用，也是最近才發現的一個 node.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
首先在 hypershade 裡選 utilities -&amp;gt; choice node (此稱為 choice1)。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPi2plsMeklbQ5Qy84WrKzpVaPI63MShyo0AEIM9Owh-IT0xACEIJVw0p6whH4IW2RygUl67DHpRGwjnJSoGnT3ODQ5YtTfb9JmB7i2l2YjhNg3vVmuYfCPpGfZAXCIOvcxX7lqnVDk6M/s1600/choice_node.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPi2plsMeklbQ5Qy84WrKzpVaPI63MShyo0AEIM9Owh-IT0xACEIJVw0p6whH4IW2RygUl67DHpRGwjnJSoGnT3ODQ5YtTfb9JmB7i2l2YjhNg3vVmuYfCPpGfZAXCIOvcxX7lqnVDk6M/s320/choice_node.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
選取 choice 1, 然後在 attribute editor 裡的 Extra Attributes-&amp;gt;Input 按下 Add New Item (要切換幾個貼圖就按幾次)。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaNuhHhLPT6SdvYvHCzTJaoYtX7aeIrpktI7naoKGamf9h0KjNAZzupxGk7ltECsy6erLI_oicNXjfrwX0VLIZJFGTKr5gHwSkZkac84xaF-23WrHnXV8zMAvKXvEjkTi0TM3FQw0qJA0/s1600/add_new_item.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;258&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaNuhHhLPT6SdvYvHCzTJaoYtX7aeIrpktI7naoKGamf9h0KjNAZzupxGk7ltECsy6erLI_oicNXjfrwX0VLIZJFGTKr5gHwSkZkac84xaF-23WrHnXV8zMAvKXvEjkTi0TM3FQw0qJA0/s320/add_new_item.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
接下來先產生 N 個 file node &amp;nbsp;(file2,file3,file4) 當 input 以及 一個 file node &amp;nbsp;(file1) 當 output. 然後使用 connection editor 把每一個 input file node 的 fileTextureName 屬性 連結到 choice1 的 input (input[0] 或 input[1] 或 input[2] )&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifJSRWYoWVPW5J0CnHdgfWhdrfLWZu1ZWm64L-mfyBPHFZaVJ0FhSGljMPI1dvvjsS-K9tDN96iS5wCcgM1uYy8p3ZSx21UUFH0XMdamKTeC3LMznQnVXi-tYoQ5Box6uoe8SrFSzcTlQ/s1600/in_connect.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifJSRWYoWVPW5J0CnHdgfWhdrfLWZu1ZWm64L-mfyBPHFZaVJ0FhSGljMPI1dvvjsS-K9tDN96iS5wCcgM1uYy8p3ZSx21UUFH0XMdamKTeC3LMznQnVXi-tYoQ5Box6uoe8SrFSzcTlQ/s320/in_connect.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
然後把 choice1 的 output &amp;nbsp;屬性連結到 file1 的 fileTextureName 上. 連完之後就看你要把 file1 的 outColor 連到 材質的哪一個屬性 (例如 color 或 specular 或 &amp;nbsp;bump 等).&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV2I5PpKX19fzBeX0OSqcoyBGu7Oy7l03zU0pxgDNXA8gkRPTW87QtQzdgrx4Jnr0ue8FDuET47z3irHC8sbuX_Pk5YmEmV581DbTOAfYUPpszBx9sxFIWVig6eNyGorQNxy-DajJ9Brw/s1600/out_connect.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV2I5PpKX19fzBeX0OSqcoyBGu7Oy7l03zU0pxgDNXA8gkRPTW87QtQzdgrx4Jnr0ue8FDuET47z3irHC8sbuX_Pk5YmEmV581DbTOAfYUPpszBx9sxFIWVig6eNyGorQNxy-DajJ9Brw/s320/out_connect.jpg&quot; width=&quot;249&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
choice node 的切換屬性叫做 selector, 你可以把 某個控制器的屬性連到 choice1.selector 的屬性上，就可以輕鬆達到切換貼圖的功能。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_n0u-HOXMPLZXNgRJo7V_X2IwUu_ANcVTKoejHj0GG6hOMkJGPF80FfXAorkrRJeywjmQbiDO1BtEW3EltGu4w-xxu9AW8Ogsq0UWaPCJkvPww9e6dCPjXtSuK3nujNn2LDUyWpZ1FEU/s1600/using_selector.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_n0u-HOXMPLZXNgRJo7V_X2IwUu_ANcVTKoejHj0GG6hOMkJGPF80FfXAorkrRJeywjmQbiDO1BtEW3EltGu4w-xxu9AW8Ogsq0UWaPCJkvPww9e6dCPjXtSuK3nujNn2LDUyWpZ1FEU/s320/using_selector.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
(還有，記得要把 N 個 input file node 的 貼圖路徑填好，否則你不管怎麼切換都會是一片黑底XD ).&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://maya-tricks.blogspot.com/feeds/526949078801051143/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://maya-tricks.blogspot.com/2012/06/practical-way-to-switch-texture-in-rig.html#comment-form' title='5 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/526949078801051143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8400563081117910408/posts/default/526949078801051143'/><link rel='alternate' type='text/html' href='http://maya-tricks.blogspot.com/2012/06/practical-way-to-switch-texture-in-rig.html' title='切換貼圖的方法之一 ( a practical way to switch texture in rig file)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/07496899857287348384</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWYNnNNos_4Wl36e-JGqoIifqHa1BFboPAYOax7h1H6FR4rhTzpTnbX2cTqVPlK291Dl2fH4lm4KI5rbrX5DGHlsvuRGcmb3SJWJ4aMNIKmRSkQhbZonu3Dml6jZWiNfSPMcvB2Wh8EMA/s72-c/title.jpg" height="72" width="72"/><thr:total>5</thr:total></entry></feed>