在 Maya 2011 下,準備好 PyQt4 的開發環境

Maya 2011 可能是有史以來,對於開發人員最最有善的一次改版了:整個 GUI 使用 Nokia Qt 重寫一遍。Maya 過去的版本發表中,影響程度足以和 2011 相提並論的,我想只有 Maya 8.5 推出時提供的 Python binding ,以及隨後由 Chad Dombrova 個人領軍執行的 pymel open source project 可以匹敵 。事實上我覺得,Maya 2011 以 Qt 重寫這件事,不止是用哪個 GUI framework 的差別而已,包括整個 GUI 的能力,與系統的整合,使用第三方程式庫的能力……等,差別遠比想像中的大很多。 ...

February 27, 2011 · 3 分鐘 · Drake Guan

Python versions for 3D softwares in VFX industry

I start this tiny post to collect embedded python version for several major players of 3D softwares in VFX/Animation industry. It is a personal desire to build the list such that we don’t need to guess or google it while facing python version issue. Hopefully, this post can get someone’s notice and help to make it as complete as possible. Any information is welcome~ Python versoins for 3D softwares Software version Python version Autodesk Maya Maya 2011 Linux 64bit Python 2.6.4 Maya 2009 Linux 64bit Python 2.5.1 Maya 8.5 Linux 64bit Python 2.4.3 The Foundry Nuke Nuke 6.2v1 Python 2.6.5 Nuke 6.1v3 Python 2.5.1 Side Effects Houdini Houdini 11 Python 2.6 Pixar’s RenderMan Pro Server Realflow Blender Blender 2.5 Python 3.1 Blender 2.49 Python 2.6 Realflow Realflow 5 Python 2.6.2 TBA TBA Python ?.?

January 31, 2011 · 1 分鐘 · Drake Guan

The Definition of Functional Programming Language

目前我覺得非常中肯且值得特別一一去了解,並且在 coding 時,時時提醒自己的 Functional Programming Paradigm ,如下: First-class function Higher-order function Lexical closure Pattern matching Single assignment Lazy evaluation Garbage collection Type inference Tail recursion List comprehension Monad 其中 Python 有提供的,有第 1, 2, 3 (部分?), 6, 7, 8 (部分?), 10, 11 (部分 ?),就我微薄的知識所了解後的,可能會有一些出入。 ...

October 4, 2010 · 1 分鐘 · Drake Guan

用 Python 寫一個精簡的 Lisp Interpreter

Peter Norvig 在他的個人網站上頭,寫了一篇 (How to Write a (Lisp) Interpreter (in Python)) (註), 他寫了約莫 100 行的 python script 來小小模擬一個簡化版的 Lisp Interpreter,看了不禁拍案叫絕。 下頭這個表格截取自他的網頁,指出他這 100 行的程式碼,所實作的 syntax 只有 9 個(註)。 var: variable reference A symbol is interpreted as a variable name; its value is the variable’s value. Example: x number: constant literal A number evaluates to itself. Examples: 12 or -3.45e+6 (quote exp): quotation Return the exp literally; do not evaluate it. Example: (quote (a b c)) ⇒ (a b c) (if test conseq alt): conditional Evaluate test; if true, evaluate and return conseq; otherwise evaluate and return alt. Example: (if (< 10 20) (+ 1 1) (+ 3 3)) ⇒ 2 (set! var exp): assignment Evaluate exp and assign that value to var, which must have been previously defined (with a define or as a parameter to an enclosing procedure). Example: (set! x2 (* x x)) (define var exp): definition Define a new variable in the innermost environment and give it the value of evaluating the expression exp. Examples: (define r 3) or (define square (lambda (x) (* x x))). (lambda (var…) exp): procedure Create a procedure with parameter(s) named var… and the expression as the body. Example: (lambda (r) (* 3.141592653 (* r r))) (begin exp…): sequencing Evaluate each of the expressions in left-to-right order, and return the final value. Example: (begin (set! x 1) (set! x (+ x 1)) (* x 2)) ⇒ 4 (proc exp…): procedure call If proc is anything other than one of the symbols if, set!, define, lambda, begin, or quote then it is treated as a procedure. It is evaluated using the same rules defined here. All the expressions are evaluated as well, and then the procedure is called with the list of expressions as arguments. Example: (square 12) ⇒ 144 ...

October 3, 2010 · 3 分鐘 · Drake Guan

Lisp 初體驗:Grammar Induction

我們這個地球上的人實在太多了,加上上天賦與我們的大腦又過於活躍,以致於時時可以聽聞到,又有什麼人做出了驚人之舉。 幾個禮拜前,無意間得知一個網頁:Random CG Paper Generator 。每 reload 這個頁面一次,就會亂數產生一篇圖學論文的標題出來(以假亂真似地)。也許,苦於找不到研究方向的研究生,可以來這個頁面 reload, re-roll your brain,看看有沒有什麼意外的研究靈感可以借用的。 ...

September 19, 2010 · 5 分鐘 · Drake Guan

你是怎麼使用 Python 的?

上上週的某個深夜,電動也玩夠了(一直輸),Erlang 也看煩了,上網查看 Python, RenderMan, Maya, Computer Graphics, Game, Animation, Lighting, Stereoscopy, …… 等關鍵字的各種組合過程中,發現到一篇 2009 年的文章:What do you do with Python? 。 ...

August 31, 2010 · 3 分鐘 · Drake Guan

Introducing Python 的影片

以非常……..宅……..的方式介紹 Python,整個畫面很 low, 很南方公園的 video。雖然這樣,不過裏頭出現很多 Python Community 的大頭!

March 26, 2010 · 1 分鐘 · Drake Guan

Interesting Python Shells

I’ve found several very interesting and active python shells. Each has it’s own strength and the most often mentioned feature is syntax highlight, auto-complete and function attributes info. Here they are: IPython bpython DreamPie Interactive server-side Python shell

March 13, 2010 · 1 分鐘 · Drake Guan