is it possible to nest quotations at all??? like if I want to do a command something like this: eval("print("dogs " + $cats)")
how do I go about doing it??? Surely how I've done it there won't work, because they're one sided quotes... is there a way? the only other programming I've done before was with javascript, and it sort of got around the problem by having two types of quotes you could use. so the above code would looks something like: eval("print('dogs ' + $cats)")
but that doesn't seem to work in maya. I can't find anything in the docs about that sort of syntax. maybe this is common knowledge to c++ coders or something, but that aint me.
ok, that seems to work fine, but I can't find any documentation on "masking". is there some place i can find out exactly what masking is? Like, I've seen it used in other scripts before, but haven't quite understood exactly how its used. theres nothing in the docs about it, so would anyone care to shed some light on it?
From the MEL Fundamentals book -- which does NOT come with the other manuals -- in an inset note ...
The print command allows you to view the contents of a variable. The proper syntax is print $variable. The contents of the variable will be displayed in the history section of the script editor. To go to a new line in the history section of the script editor use the following syntax; print "Hellon"; The forward slash is used to tell Maya that the next character is a special one. In this case "n" means new line. The forward slash is an escape sequence. An escape sequence is a method to tell Maya that the character following it is special. n creates a newline, t creates tab, double slash tells the system that the second slash is to be treated like a normal character, " tells the system that the quotation is to be treated like a normal character.
The MEL Fundamentals really ought to be included with the online docs. Speaking of which it would certainly be help if the MEL command reference contained all of the syntax commands. For instance, I was trying to find out how some stuff on formatting the proc command to declare a procedure. There was nothing in the command reference and even the Fundamentals book only helped by kind of pointing me in a focused trial-and-error direction.