--
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/4927f0c7-f770-4509-8822-b9f2bb8a49ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This would give you the string name of the enum value:cmds.getAttr("defaultRenderGlobals.imageFormat", asString=True)
On Sat, Jul 12, 2014 at 6:58 AM, md <acco...@mdonovan.com> wrote:
Hey Guys,So I am pulling the information from RenderGlobals and I see that when I have a pass set up as an .exr Maya is returning a value of 51 from imageFormat. 51 indicates a file type of Custom (51).Is there a way to access the constant definitions so I can return a string ? Also .. I assume Custom(51) does not indicate exr but rather its a catch bucket for any formats not currently defined in Maya's API.So is the best way to get the file extension to query renderSettings path and grab the extension using string manipulation ?? That just seems a bit hacky to me.Thanks
M
--
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_maya+unsub...@googlegroups.com.
try getting the defaultRenderGlobals.imfkey attribute - it'll give you the extension as per the dropdown? This only applies for MR I suspect however..
(I'm sure there's an analogue for every other renderer out there though, I only worked this one out by reading through the Mel callback itself)
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/eae25b47-613a-42d5-956f-4c17db59a7da%40googlegroups.com.
This is how I would imagine things to go down in order to avoid the issue of parsing strings along with potential pitfalls down the line.
____________________________ _________ _________________
| | | | | |
| 1. Rendering requirements |--->| 2. Maya |--->| 3. Image format |
|____________________________| |_________| |_________________|
.
Currently, you’re process might look something like this:
_________
| |
____________________________ _| 2. Maya |
| | | |_________|
| 1. Rendering requirements |--|
|____________________________| | _________________
|_| |
| 3. Image format |
|_________________|
.
Alternatively, what do you think about defining and persisting requirements separate to Maya, such as in a .json or .ini configuration file? That way, you could go about it this way instead:
That is, having Maya and your scripts access the same requirements, both decoupled and independent from each other.
Best,
Marcus
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/201407141258.s6ECwbQU032319%40atl4mhob07.myregisteredsite.com.