I'm writing a python script and I'm trying to work out how to make the viewport update as when I set the attribute with Python for "vraySettings.width" it doesn't change the viewport frame. If I change it in the VRay Render Settings UI it changes the viewport aspect ratio.... any ideas?
Announcement
Collapse
No announcement yet.
Changing Render Aspect Ratio by script doesn't change viewport aspect ratio
Collapse
X
-
Changing Render Aspect Ratio by script doesn't change viewport aspect ratio
Maxscript made easy....
davewortley.wordpress.com
Follow me here:
facebook.com/MaxMadeEasy
If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.Tags: None
-
Found out how... you need to set the defaultResolution values too.
cmds.setAttr("defaultResolution.width", newWidth)
cmds.setAttr("defaultResolution.height", newHeight)
cmds.setAttr("defaultResolution.deviceAspectRatio" , (newWidth / newHeight)
cmds.setAttr("defaultResolution.lockDeviceAspectRa tio", 0)
cmds.setAttr("defaultResolution.pixelAspect", 1.0)Maxscript made easy....
davewortley.wordpress.com
Follow me here:
facebook.com/MaxMadeEasy
If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.
-
We automatically do this when stuff is changed in the UI (we transfer to the defaultResolution node) but it might not work for script accessing those values in the vraySettings.
Comment
-
Yeah I ripped apart the template files for VRay and found out what VRay was doing under the hoodMaxscript made easy....
davewortley.wordpress.com
Follow me here:
facebook.com/MaxMadeEasy
If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.
Comment
Comment