Mewa Film User's Guide/Scripting

From Wikibooks, open books for an open world
< Mewa Film User's Guide
Jump to: navigation, search

Introduction[edit]

Mewa Film scripting offers the artist a huge creative freedom, not only by giving the ability to use a wide variety of expressions and script code directly within any parameter of the application but also by giving the ability to create scripts.

Scripts can be written for numerous purposes, one of the most common uses is the automation of a specific set of tasks.

Concepts[edit]

An expression is any non-numeric entry, such as a variable or a mathematical expression. Any parameter can use an expression. Some expressions, such as time, are extremely simple. When you type the expression variable time into a value field, Mewa Film returns the numeric value of the current playhead position. For example, if the playhead (current time in player toolbar) is parked at frame 1, typing time into a value field returns a value of 1 in that field.

Script Editor[edit]

To open the script editor choose the menu View >> Script Editor.

Script Editor window

The script editor window is divided in 2 areas, the top area is a text editor where you can edit your script and then press run to execute the script. The script output comes on the bottom pane. The bottom pane ... command line, you can type a command followed by Enter.

Using the command line[edit]

To check an expression using the script editor, in the command line area, just type your expression ...

Creating a script[edit]

Mewa Script is based on the ECMAScript scripting language, as defined in standard ECMA-262, most known as Java Script.

print() function[edit]

the print function is very useful for simple debugging purposes as to give feedback during a script execution.

a=4;
print(a);

will print the contents of a.

str="this is text";
print(str);

The time variable[edit]

time=5

moves the play head to frame number 5.


Back to contents page