PDA

View Full Version : Mental Ray Baking Help


AtrusDni
02-28-2011, 06:45 PM
Hey guys, I'm trying to write a script that bakes selected objects lighting and texture. I create a bake set and everything fine, but what I am missing are the options in the 'Mental Ray Baking Options' such as Baking Optimization, multiple objects, etc that are above the bake set options.

How can one specify those attributes when baking thru a mel script only? Any help will be appreciated. Thanks!

AtrusDni
02-28-2011, 07:18 PM
Nevermind, I found the answer to my own question. For anyone who is interested, the options at the top of the Mental Ray Baking Options window are set using optionVar's. The ones in question are:
v_mrBakeScope
v_mrSkipDefault
v_mrBakeTo
v_mrBakeOptim
v_mrBakeShadows
v_mrCamera
v_mrKeepOrgSG
useBakeSetOverride

You can set the values like so:
optionVar -stringValue v_mrBakeScope "Selected";
optionVar -intValue v_mrSkipDefault 1;
optionVar -stringValue v_mrBakeTo "Texture";
optionVar -intValue v_mrBakeOptim 1;
optionVar -intValue v_mrBakeShadows 1;
optionVar -stringValue v_mrCamera "persp";
optionVar -intValue v_mrKeepOrgSG 0;
optionVar -intValue useBakeSetOverride 1;

Woot!

CGTalk Moderation
02-28-2011, 07:18 PM
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.