View Full Version : MEL and the render globals
Hey, does anyone know the mel commands to change presets in the render globals?
i.e. the anti aliasing presets from low to production quality and the custom resolution to CCIR 601?
thanks
Norb
|
|
svenip
02-18-2003, 10:40 AM
this is from a script that i wrote a while ago :
if(`getAttr defaultRenderGlobals.preRenderMEL` == ...... )
setAttr defaultRenderGlobals.preRenderMEL -type "string" "yourcommand";
that should help you on the way.
sortof helps, I know what you're trying to do, but can't seem to figure it out, I'm a noob at mel. Also, i have a slider in a window i made using the floatSliderGrp command, and I want to make it control the blinn2.glowIntensity, how would I do that?
Norb
svenip
02-18-2003, 12:01 PM
for the floatslider simply use the flag -cc (changeCommand) and attach the command what you wanna do.
read the manuals. the mel part is very good for beginners, it covers all UI and so on...
well I got that workin, turns out it was completely my fault...
forgot the ` ` things at the beginning and end of my command
Norb
mark_wilkins
02-18-2003, 03:13 PM
small stylistic point, but I prefer to avoid using inline command execution (where you put a command in backquotes ``) directly in an "if" statement.
More often than not, you're going to use that value that you're comparing within the code that your if block executes, so I'll usually do this instead:
$variable = `getAttr whatever.tx`;
if ($variable < whatever) {
... and so on.
}
This has the advantage that for someone new to MEL it may be easier to follow because operations aren't nested so deeply on the same line.
-- Mark
CGTalk Moderation
01-14-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.