Alter pixel aspect ratio in python


#1

Hey guys,

I’m writing a script in python which alters render settings, specifically the pixel aspect ratio.

Here are both bits of code I’ve tried:
mc.setAttr(“defaultResolution.pixelAspect”, 1)
mc.setAttr(“vraySettings.pixelAspect”, 1)

Both alter the vraySettings node and the defaultResolution node but fail to change the settings in the Render Settings window so when the render settings window is re-open the settings are changed back to the value stored before my script is run.

Any help would be awesome,
Cheers