TIFF file handling in PIL

TIFF is a flexible, if somewhat aged, image file format originally # defined by Aldus. Although TIFF supports a wide variety of pixel # layouts and compression methods, the name doesn’t really stand for # “thousands of incompatible file formats,” it just feels that way. thousands of incompatible file formats, 這個的確有挖苦到 TIFF 這個格式 XD

January 27, 2010 · 1 分鐘 · Drake Guan

Python Programming Coding Style in Entertainment Industry

Python Programming in Entertainment Industry: Coding Style View more Microsoft Word documents from drakeguan .

June 23, 2009 · 1 分鐘 · Drake Guan

Why Pyton in Entertainment Industry

Why Python In Entertainment Industry? View more Microsoft Word documents from drakeguan .

June 17, 2009 · 1 分鐘 · Drake Guan

How to clean up "Render Stats" of all geometry in Maya?

No matter what renderer you are going to use, you should take care of geometry’s “Render Stats” before rendering, especially when you are planning to decompose a rendering job into several layers/passes. Here is a quick python scripts based on pymel to do that. from pymel import * def dgVerifyRenderStats(surfaces=None): ''' dgVerifyRenderStats deps: none verify and adjust all surface's render stats. double sided, opposite, smooth shading, motion blur visible in reflections/refractions, casts/receive shadows primary visibility ''' def _verifier(surface): surface.doubleSided.set(0) surface.opposite.set(0) surface.smoothShading.set(1) surface.motionBlur.set(1) surface.visibleInReflections.set(1) surface.visibleInRefractions.set(1) surface.castsShadows.set(1) surface.receiveShadows.set(1) surface.primaryVisibility.set(1) # save the selection selections = ls(selection=True) if surfaces is None: surfaces = ls(long=True, type='surfaceShape') map(_verifier, surfaces) # restore the selection select(selections, r=True)

March 5, 2009 · 1 分鐘 · Drake Guan

Maya Scripting - MEL V.S. Python

Maya scripting 現在有了 MEL 與 Python 可供選擇,對於大部分的 Maya 使用者來說,這是件微不足道的事,但對於天天使用與撰寫 Maya scripting 的人來說(ex, TD?!)(或保守一點的說,很有機會被要求寫點程式的人),這重要極了。 ...

February 8, 2009 · 7 分鐘 · Drake Guan

把 MSN 放進 Maya 裏頭?!

Chris Chia 在他的 blog 發表了一篇 Maya ChatWin v0.6.1 (100% Built on Python) ,完成了一件非常有趣的事:在 Autodesk Maya 裏頭實作了一個 MSN 外加一個遠端的 script editor 出來。 這個 Maya ChatWin 運作起來就像 MSN,只是聯絡人清單是來自於同網段(內網)的電腦,目的……大概是讓你工作到一半有個小問題,想找人問一下時使用的吧,我想基本立意應該是這樣。它另外比較有趣的功能是,可以直接遠端傳送 mel 或 python script,所以可以做到遠端執行一些 fixing scripts 之類的。這功能目前是單向的,不過也夠應付 supporting TD 使用。 ...

February 5, 2009 · 2 分鐘 · Drake Guan

pymel 讓 optionVar 用起來看起來,更像 dictionary

Maya 裏頭有個非常 high level 的 mel function: optionVar,有別於其它的 functions 的簡單與立即反應,它的目的在提供一個跟 Maya session 的設定檔的存取。換個說法,你可以在一次執行 Maya 的時候,存一個自訂的變數 IamSoHandsome,然後在下一次執行時取出來用。所以你可以把它想成是 Windows 上頭的 registry、Unix-like 下的 .ooxx 個人設定檔、或是會永續存在下去的 environment variables。 ...

February 4, 2009 · 1 分鐘 · Drake Guan

Maya UI 裏的 Callback

GUI 是個非常偉大的發明,它讓電腦就這麼快速地滲透進家家戶戶與各大小商辦或公家機關,因為我們有 Mac OS、Windows、X Window System,再加上現下當紅的掌上型界面(iPhone、NDSL、PDS、Android)與從 web browser 裏出生的 web interface,世界就此進入資訊高科技時代,人人都會使用這些電腦設備,因為它們都提供了一套容易使用的 GUI。 ...

February 4, 2009 · 3 分鐘 · Drake Guan