1 / 18

3D Modelling & Animation

Picture. 3D Modelling & Animation. Programming Maya. Picture. Agenda. MEL Expressions and Scripting Referencing MEL Scripts Python Scripting The Maya C++ API. MEL Expressions. Create MEL Expressions using the expression editor Windows - Animation Editors - Expression Editor

Download Presentation

3D Modelling & Animation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Picture... 3D Modelling & Animation Programming Maya Picture...

  2. Agenda • MEL Expressions and Scripting • Referencing MEL Scripts • Python Scripting • The Maya C++ API

  3. MEL Expressions • Create MEL Expressions using the expression editor • Windows - Animation Editors - Expression Editor • Set animation times on objects transformations/ rotations/ scaling Expression Editor

  4. Maya Embedded Language • Syntax very similar to the C language syntax • Supports usual types, conditional statements and control structures • Variables declared before use prefixed with the $ symbol • string $message = “Hello World”; • print ($message + “ from Maya”) • Supports arrays • string $names[] // an array of names • Does not support structured types or arrays of arrays (tables) string $name[] string $meshPosition[] $meshPostion[2] = $name not supported

  5. Maya Embedded Language • Has many functions to manipulate strings which can overcome limitations having no support for structured types or tables - see Maya MEL API from Help • Suppotrs procedures to encapsulate functionality for resuse global proc makeSphere() { sphere; move 0 0 1; };

  6. Maya Embedded Language • Procedures can take arguments and return values global proc string[] generatePopulation(int $popSize, int $length){ /* generates and returns an initial population of binary string values of length $length and population size $popSize */

  7. Maya Embedded Language • Maya has a script editor for entering MEL statements • Very basic scripting support - Maya 8.5 introduced script line numbering! • No syntax highlighting or auto indent etc. MEL Script Editor

  8. Maya Embedded Language output 2. Evaluate Expression (Press Enter on Numeric Keypad) 1. Define Expression

  9. Access Script editor here or here MEL output result here and here Enter MEL commands here

  10. Cutter - MEL (Java) Based Editor • Java based editor called Cutter • Provides enhanced editing environment syntax highlighting indent etc. • Easier access to MEL command reference from Maya • Also support for Renderman (Pixar) • see www.fundza.com

  11. MEL Editor (Cutter) GUI see www.fundza.com

  12. see www.fundza.com

  13. Accessing MEL Scripts • Maya must access procedures via the usersetup.mel filefound here: C:\Documents and Settings\username\My Documents\maya\8.5\scripts\userSetup.mel

  14. procedures listed in userSetup.mel

  15. Use MEL to Customize the Maya GUIand Create new Interface Components

  16. Python Scripting Python open-source object oriented language Interfaces with development frameworks such as .NET Enter Python expressions using the text interface choose the Python tab

  17. Maya C++ API • Maya supports the development of plug-ins written in C++ • Creates dynamic link libraries for extending Maya via additional plug-ins for various utilities and tools • May also has a MIDI API • Versions of Maya come with a Visual Studio Project Wizard that can be installed in Visual Studio to facilitate the creation of Maya dynamic link library plug-ins (.mll) e.g the 3D Studio mesh import plug-in is 3ds.mll (Maya Link Library) (see the readme in the zip file) • Maya 8.5 has a project wizard for Visual Studio 8 (Visual Studio 2005) • Reminder:These products are free to CEMS students via the Microsoft Software Alliance

  18. Further Reading • David Gould has written two books onMAYA programming see www.davidgould.com • Some excellent MEL tutorials and other resources at www.robthebloke.org

More Related