I'm trying to make a portrait resolution preset via python, but for some
reason if a execute this little script line by line it works,
but if I try to execute all as a script, the last line, the one that
changes pixel aspect, doesn't work, is not being changed to 1.
cmds.setAttr("defaultResolution.aspectLock", 0)
cmds.setAttr("defaultResolution.width", 720)
cmds.setAttr("defaultResolution.height", 1280)
cmds.setAttr("defaultResolution.aspectLock", 1)
cmds.setAttr("defaultResolution.pixelAspect", 1)
I already try without luck:
- time.sleep(1), wait one second between commands.
- cmds.evalDeferred()
- maya.utils.executeDeferred()
- put it inside a function
Any ideas why this could happen?? or workarounds for this?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/d23f9534-b276-413d-b810-19e01be21706%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.