can't find MEL command to switch texture baking on

I have this batch bake script that’s part of my V-Ray Tuner script but one thing I can’t figure out how to get working is how to switch texture baking on as a MEL command (the dropdown attached). If someone can tell me what the command is, that would be great.

I’m not in front of my machine right now, so I can’t check, but it should be an attribute of the vraySettings node.

Best regards,
Vlado

Hello,

Not sure which of the following you need, but here you go:

That will change the selected item in the drop-down menu:

optionMenuGrp -e -sl 2 vrayBakingEngineCtrl;

The following will set the baking render:

setAttr “vraySettings.bakeRender” 1;

This is another setting you may need:

setAttr “vraySettings.sh_export_on” 0;

And these are for the interface - to enable other controls:

attrControlGrp -edit -enable true vrayBakeChannelCtrl;
attrControlGrp -edit -enable true vrayBakeDilationCtrl;
attrControlGrp -edit -enable false vraySphericalHarmonicsOptions;

You can see what happens when you change the selected item in that drop-down menu in vrayCreateCommonGlobalsTab.mel

Hope that helps. Let me know if there is anything else you need.

thanks - that did it.