Hey, first post here, so I hope this is what you're looking for. Though it only
works for the set render folder in the project.
I'm not sure what your exact setup is, we use BackBurner for our queue and
MentalRay for our renders. I have a script set up to assign the file prefix
(for each frame) and a location for the renders to go. Using:
mc.setAttr("defaultRenderGlobals.imageFilePrefix", prefix, type='string')
(for file name - "prefix" is queried from a textfield)
and this lovely string concatenation for the path: (someone may have a better
answer)
# query workspace and get the root directory
projectName = mc.workspace(q=True, rootDirectory=True)
#add a \ at the end (only works for sub directories within the set folder
projectNameReplace = projectName[:-1] + '\\'
# I have all my renders going to "images"
# modify text path is a string i get from a text field listing any
# other necessary parameters
projectNameWithDir = projectName + "images" + modifyPathText
Hope that helps.
-r
On Monday, March 11, 2013 1:10:23 PM UTC-4, denis-jose francois wrote:
> hi folks
>
> is it possible to change the filename (and location) of a render (using
> mental ray) from a python script? I can't see any flags which allow this
> directly in the command documentation.
>
> As a work around I've tried setting the project to a new location (workspace)
> but I still get my renders in a sub directory called 'tmp'.
>
> I'd really like to be able to the renderer: "render here with this filename",
> but without changing the project settings or such.
>
> hope that makes sense
>
> DJF
--
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.