【Nuke教程】FXPHD NUK227: Python for NUKE and Gizmology

4 一月, 2015

Python(英语发音:/ˈpaɪθən/), 是一种面向对象、解释型计算机程序设计语言,由Guido van Rossum于1989年底发明,第一个公开发行版发行于1991年。Python语法简洁而清晰,具有丰富和强大的类库。它常被昵称为胶水语言,它能够把用其他语言制作的各种模块(尤其是C/C++)很轻松地联结在一起。常见的一种应用情形是,使用Python快速生成程序的原型(有时甚至是程序的最终界面),然后对其中有特别要求的部分,用更合适的语言改写,比如3D游戏中的图形渲染模块,性能要求特别高,就可以用C++重写。


Class 1: Introduction: What is Python and what can I do with it in Nuke? Useful bibliography and reference web sites: How to search for the information when I need it. Nuke’s Script Editor vs 3rd party script editors (for Mac OS X, Windows and Linux). More than just Python: Nuke expressions, how they work and when it’s better to use then rather than a Python script. Units of Information in Python: Types. What is a Variable? How to create and modify Variables.
Class 2: Handling Python Types: Transforming numeric units into strings and the other way around; Modifying lists by adding, removing or picking elements. Compound statements I: ‘if’, ‘while’.
Class 3: Compound statements II: ‘for’ and try’. Defining, storing and executing functions within Nuke. Introduction to the ‘nuke’ module: node selection methods. Accessing nodes and their knobs.
Class 4: Getting and setting values on target knobs. Node Classes demystified. Creating and deleting nodes and groups of nodes from Python commands. Accessing grouped nodes (nested structures). Customizing nodes on creation. Making connections between nodes. Setting expressions on target knobs.
Class 5: Customizing Nuke GUI: the ‘.nuke’ folder, creating a folder structure, the ‘menu.py’ and ‘init.py’ Python scripts, add Nuke menu items and toolbar items (to call gizmos), default values for node classes.
Class 6: Other useful modules in Python: how to create folders in the OS from Nuke. Creating blank nodes and populating them with knobs from Python.
Class 7: Callbacks: the ‘knobChange’ utility and common applications. Disabling and enabling knobs based on user actions. Frame related functions.
Class 8: Designing a gizmo: What’s the purpose of my gizmo? Planning and laying out its controls, building the node structure and linking its nodes to its knobs. The ‘V_EdgeMatte’ case study. You can find this gizmo published on Nukepedia: http://www.nukepedia.com/gizmos/filter/v_edgematte
Class 9: Creating Nuke custom panels, dialogs and messages. Rendering customization scripts. Aesthetic considerations to build user friendly gizmos, common standard organisation. Cross-platform solutions for OS-dependent actions.
Class 10: Node Graph position knob utilities. Input-format depending expressions. Naming conventions. Nuke icons guidelines. Publishing recommendations.