CIS682 MEL Scripting Overview. CIS682 MEL commands Maya help -> MEL command reference MEL command line Script editor –Icon –Window->General Editors->Script.

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

Copyright © 2002 Pearson Education, Inc. Slide 1.
Introduction to Macromedia Director 8.5 – Lingo
Introduction to Programming Lecture 15. In Today’s Lecture Pointers and Arrays Manipulations Pointers and Arrays Manipulations Pointers Expression Pointers.
A MATLAB function is a special type of M-file that runs in its own independent workspace. It receives input data through an input argument list, and returns.
Chapter 2, Part 1: An interpreter architecture for C-like languages Xinming (Simon) Ou CIS 505: Programming Languages Kansas State University Fall 2010.
Programming III SPRING 2015 School of Computer and Information Sciences Francisco R. Ortega, Ph.D. McKnight Fellow and GAANN Fellow LECTURE #3 Control.
1 Uso de MEL (Maya Embedded Language) Para: Números aleatorios Fractales.
CS231A Matlab Tutorial Philip Lee Winter Overview  Goals › Introduction to Matlab › Matlab Snippets › Basic image manipulations › Helpful Matlab.
© 2010 Delmar, Cengage Learning Chapter 9: Using ActionScript.
PHP Conditions MIS 3501, Fall 2014 Jeremy Shafer Department of MIS Fox School of Business Temple University September 11, 2014.
3D Modelling & Animation
Sketchify Tutorial Graphics and Animation in Sketchify sketchify.sf.net Željko Obrenović
CIS 101: Computer Programming and Problem Solving Lecture 5 Usman Roshan Department of Computer Science NJIT.
CIS 101: Computer Programming and Problem Solving Lecture 4 Usman Roshan Department of Computer Science NJIT.
FORTRAN.  Fortran or FORmula TRANslation was developed in the 1950's by IBM as an alternative to Assembly Language. First successfull high level language.
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
Introduction to programming in MATLAB MATLAB can be thought of as an super-powerful graphing calculator Remember the TI-83 from calculus? With many more.
CS140: Intro to CS An Overview of Programming in C by Erin Chambers.
Python  By: Ben Blake, Andrew Dzambo, Paul Flanagan.
XP Tutorial 5 Buttons, Behaviors, and Sounds. XP New Perspectives on Macromedia Flash MX Buttons Interactive means that the user has some level.
CIS Computer Programming Logic
Computer Science 111 Fundamentals of Programming I Overview of Programming.
Introduction to Maya. Maya’s Layout User Interface Elements In Maya, you can tear off menus to create separate floating boxes that you can place anywhere.
Prof: Dr. Shu-Ching Chen TA: Samira Pouyanfar Spring 2015 C Tutorial CIS5027.
CIS 218 Advanced UNIX1 CIS 218 – Advanced UNIX (g)awk.
Writing Scala Programs. Command Line There are three common operating systems: Windows (various flavors; I recommend Windows 7) UNIX or Linux (basically.
Computer Science 101 Introduction to Programming.
Introduction to Awk Awk is a convenient and expressive programming language that can be applied to a wide variety of computing and data manipulation tasks.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering –Intro to the Robotics –Introducing the IC –Discuss.
Mel & Hot Keys Review. What’s MEL?  Maya Embedded Language  Most of Maya's interface is built using MEL commands and scripts.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
ROUND 1 Name a method associated with class String 1.) 15 compareTo() 26 indexOf() 34 length() 2.) 3.) 4.) 3 toUpper() 7 substring() 11 charAt() 5.)
Awk Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
WS09-1 VND101, Workshop 09 MSC.visualNastran 4D Exercise Workbook Belted Cylinder.
Animation with Maya
Utility Nodes in an Animation Pipeline Joe Harkins Creature Technical Director Tippett Studio.
CONTENTS Processing structures and commands Control structures – Sequence Sequence – Selection Selection – Iteration Iteration Naming conventions – File.
CS140: Intro to CS An Overview of Programming in C by Erin Chambers.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
1 of 16 Microsoft ® Business Solutions–Navision ® Development I – C/SIDE Introduction.
Computer Programming Modeling a Passive Solar Home.
1 Chapter 3: Loops and Logic. 2 Control Statements If statement Example NumberCheck.java Relational operators (, >=, ==, !=) Using code blocks with If.
Structuring Data: Arrays ANSI-C. Representing multiple homogenous data Problem: Input: Desired output:
CIS 205—Web Design & Development Flash Chapter 3 Appendix on Using Buttons.
CSC115: Matlab Special Session Dr. Zhen Jiang Computer Science Department West Chester University.
Midterm Exam Topics (Prof. Chang's section) CMSC 201.
Scott Marino MSMIS Kean University MSAS5104 Programming with Data Structures and Algorithms Week 1 Scott Marino.
Dept. of Animal Breeding and Genetics Programming basics & introduction to PERL Mats Pettersson.
OVERVIEW OF CLIENT-SIDE SCRIPTING
CIS682 Maya Internal Structure Overview. CIS682 Programming Interfaces MEL - Maya Embedded Language –Scripting language –Interpreted –Fast prototyping,
Introducing To 3D Studio Max George Atanasov Telerik Corporation
CIS3023: Programming Fundamentals for CIS Majors II Summer 2010 Ganesh Viswanathan Programming in JAVA – II (A Whirlwind Tour of Java) Course Lecture Slides.
3D Animation 3. Animation Dr. Ashraf Y. Maghari Information Technology Islamic University of Gaza Ref. Book: The Art of Maya.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Intro to the Robotics Introducing the IC Discuss.
Unit Lessons Work with actions
Introduction to Programming
Programming Interface Overview
Introduction to Basic Animation Model Building
MEL Interface with Maya.
Counting Loops.
First Animation Exercise
First Animation Exercise
Relational, Logical, and Equality Operators
CSCI N207 Data Analysis Using Spreadsheet
EXP file structure.
Introduction to MATLAB
Presentation transcript:

CIS682 MEL Scripting Overview

CIS682 MEL commands Maya help -> MEL command reference MEL command line Script editor –Icon –Window->General Editors->Script editor

CIS682 Script editor Type in commands Shelf button: highlight, cmd-click, drag Script file: File->source script

CIS682 Attributes sphere; listAttr nurbsSphere1; getAttr nurbsSphere1.tx; setAttr nurbsSphere1.translateY 10; aliasAttr up nurbsSphere1.ty setAttr nurbsSphere1.up

CIS682 Simple Example For ($j=0; $j<10;$j++) { sphere; move –r 0 $j 0 }

CIS682 Example // arrayOfSpheres.mel // shows simple nested 'for' loops to create objects for ($i=0; $i<10; $i++) { for ($j=0; $j<10; $j++) { sphere; move -r $i $j 0; } };

CIS682 Example // simpleKeyframes.mel // shows // setting object attributes (x and y translation in this case) // how to set the special *currentTime* variable // setting keyframes // the animation can then be played back sphere -name ball; currentTime 0; SetKey; currentTime 50; setAttr ball.translateX 10; SetKey; currentTime 100; setAttr ball.translateY 10; SetKey; currentTime 150; setAttr ball.translateX 0; SetKey; currentTime 200; setAttr ball.translateY 0; SetKey;

CIS682 Example // from polyCube -name myObj; $mesh = "myObj"; float $vert[]; int $vertexCount[] = `polyEvaluate -v myObj`; print ("number of vertices: " + $vertexCount[0] + "\n"); for($i=0;$i<$vertexCount[0];$i++) { // get world space vertex coords $vert = `xform -ws -q -t $mesh.vt[$i]`; // $mesh.vtx[$i] = >; print( $vert[0] + " " + $vert[1] + " " + $vert[2] + "\n" ); };

CIS682 Animation expressions expression -s "nurbsSphere1.tx = sin(time)"; Manipulate time slider (or ‘hit play’) to move object Window->Animation Editors->Expression Editor Maya->Help Search on ‘MEL’ Differences between expression and MEL syntax

CIS682 Animation expressions // // NOTE: `spherè returns 2 strings. that’s why $obj is an array // and why $obj[0] is used in the expression string $exp = ""; string $obj[]; int $i; for ($i=0;$i<3;$i++) { $obj = `sphere`; move (rand(-3,3)) (rand(-3,3)) (rand(-3,3)); $exp += "select -r " + $obj[0] + ";\n" + "move -moveY (rand(0,2));\n"; } $exp += "select -clear;\n"; expression -s $exp -ae 1; playbackOptions -min 1 -max 30; play;