Construction Of A Window Through MEL


MEL scripting offers a variety of ways to define the presentation of the window and control the way in which it operates. For example, the medium-term MEL script called newcam.mel included in Chapter 1 of the MEL folder on the CD. newcam.mel allows the user to create a 1 -, 2 - or 3-node camera button.

Newcam.mel to use, open the Script Editor, choose File. The script font, and locate the file. newcam.mel is loaded into memory, but it will not work instantly. Newcam must write in script editor work area and press Ctrl + Enter to bring up the window. To create a new camera, type a new value in the center

Length of the field, press Enter, type a new value of the far clipping

Flat field, press Enter, and click on node 1, node 2, or 3 buttons node. Ctrl + Enter newcam in the work area is required by the proc command. The script begins: newcam global proc () {proc means procedure. A procedure is a group of MEL instructions that can be used multiple times in a script. The beginning of a process is defined by an opening brace {, which appears after the procedure name and double parentheses. The end of a procedure is determined by a closing brace}. For newcam.mel, the stopcock is in the last line of the script.

A procedure is not activated until it is called. Carry the name of the procedure

Script Editor workspace is a way to call a procedure. This implies that the procedure is global, as determined by the inclusion of the word planet. When a procedure is global, you can call from any part of a script that is not part of the procedure. In other words, you can call global procedures for non-procedural parts of the script from other procedures, or as an order of a button or menu item. If the variables (symbolic names that hold values) are correctly configured in the script, the global setting is not required and the procedures are local. For further discussion of global and local variables, and when to use

Another feature of newcam.mel writing is the use of three frames collapsible (shown by arrows pointing down on the left side of the window). To create a folding frame, a code like the following is required:

under schemes collapsable true-label "Frame Name"

Width-250;

rowLayout-3-numberOfColumns columnWidth3 100 100 100;

[Text, buttons, fields, or click here]

setParent ..;

setParent ..;

The two commands are required to setParent as part of the job. If you have images you want in a window, provided that each order has two corresponding frameLayout

setParent command. In addition, each image must have its own control layout in this example, rowLayout used. NumberOfColumns-flag indicates the number of columns in a frame. ColumnWidth3-flag indicates the width in pixels of each column, pixel width of 100 sets, including 100 100 100, after the flag. Although these are optional flags, make the results much cleaner.

Post a Comment

أحدث أقدم