Setting Render Settings

3,316 views
Skip to first unread message

Tim Crowson

unread,
Jul 15, 2015, 11:07:52 AM7/15/15
to python_in...@googlegroups.com
Hey folks,

I did a quick search through this group's threads and couldn't really find the answers I was looking for...

I am still quite a novice with how Maya does things. I touched the tip of the iceberg a few months ago but got pulled onto other things. I'm struggling with how to set render settings in Maya. Specifically, I'm wanting to set things like render resolution, aspect ratio, image format, render cam.

On a related note, I'm also curious about how to set render paths properly. In Softimage there is a root path field in the scene settings, but Maya seems to want to me to set this in the Project Settings. Any insight here?

Thanks for your help! Someday I won't be a Maya noob anymore, I promise.

-Tim

Kurian O.S

unread,
Jul 15, 2015, 12:40:20 PM7/15/15
to python_in...@googlegroups.com
welcome to maya world ;)

if you do a listAttr on renderglobals you will see all the attrs which connected to renderglobals eg :

cmds.listAttr("defaultRenderGlobals")
# Result: [u'message', u'caching', u'isHistoricallyInteresting', u'nodeState', u'binMembership', u'macCodec', u'macDepth', u'macQual', u'comFrrt', u'renderAll', u'ignoreFilmGate', u'quality', u'resolution', u'clipFinalShadedColor', u'enableDepthMaps', u'enableDefaultLight', u'currentRenderer',etc .....] #  list was long so i just removed bunch of items

then you can say 

cmds.setAttr("defaultRenderGlobals.imageFormat", 8) #this will set jpg as image format.

Hope this help


--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPh%3D1bnFvhgVG%2BPKW%3DqFs4d08%3DfqoHuaWekRTsihm4mPVxeVeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
--:: Kurian ::--

Tim Crowson

unread,
Jul 15, 2015, 1:22:16 PM7/15/15
to python_in...@googlegroups.com
Thanks. I've used this for certain attributes, but I can't figure out resolution specifically. 

For example, cmds.getAttr("defaultRenderGlobals.resolution") throws an error: "Error: Message attributes have no data values." Hence some confusion....


Marcus Ottosson

unread,
Jul 15, 2015, 1:35:06 PM7/15/15
to python_in...@googlegroups.com

Have a look at what you get in the Attribute Editor when you select the “defaultRenderGlobals” node. It’ll give you some hints as to what is going on. By the looks of it, resolution is hooked up to “defaultResolution” which is another node. You can change the attributes from there.

If you aren’t familiar with selecting nodes by name,

  1. try the little box to the top of the GUI, it’ll have a little fly-out menu to allow you to “Select by name”.
  2. Otherwise, they will all be available via the Outliner and can be filtered from there too, if you untick “Show DAG Objects only”,
  3. and thirdly there is cmds.select('defaultRenderGlobals').

Hope it helps!



For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Kurian O.S

unread,
Jul 15, 2015, 1:40:42 PM7/15/15
to python_in...@googlegroups.com
Okay defaultRenderGlobals, defaultRenderQuality and defaultResolution those are separate nodes in maya, if you want to get rez then 
cmds.getAttr("defaultResolution.width")
cmds.getAttr("defaultResolution.height")

As Marcus  said you can select each of them and see what attrs there :)


For more options, visit https://groups.google.com/d/optout.



--
--:: Kurian ::--

Tim Crowson

unread,
Jul 15, 2015, 1:44:59 PM7/15/15
to python_in...@googlegroups.com
Thanks, I figured those attrs were on a different node, but I didn't know what node to look at.

For setting framerate, am I right in thinking I need to target yet another node, some preference node? I can work with attributes, as long as I know which node I need. I just don't know what nodes are out there and which ones have the attributes I want...

Thanks for your help!

Tim Crowson

unread,
Jul 15, 2015, 1:52:50 PM7/15/15
to python_in...@googlegroups.com
Oh, and I figured I would take a look at the Node and Attribute Reference section in the docs, but that doesn't list even the nodes you've pointed me to here. defaultRenderGlobals and defaultResolution aren't even listed there. Is there a place where I can get a more accurate list of nodes? (on 2016 SP1 here)

Marcus Ottosson

unread,
Jul 15, 2015, 3:32:11 PM7/15/15
to python_in...@googlegroups.com

That’s right, you can look them up in the Node documentation, but what you searched for was not the node type, it was their name. Their type is listed to the left of it’s name in the Attribute Editor.

Inline images 1

This node is of type: resolution.



For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Tim Crowson

unread,
Jul 15, 2015, 5:34:31 PM7/15/15
to python_in...@googlegroups.com

Marcus Ottosson

unread,
Jul 16, 2015, 1:25:15 AM7/16/15
to python_in...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages