View Single Post
# 4 25-07-2011 , 02:31 PM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095
oki, solved a little something so far

string $currentFrame = "pattern_" + `currentTime -q`;
connectAttr -force ($currentFrame + ".outColor") shader_pattern.color;


this 2 lines of code I´ve entered in the Pre render frame MEL field from render globals.
if rendering single files maya connects the textures alright. but when batch rendering only the currently connected texture is used. either the Pre render MEL section is buggy (Maya 8.5) or I don´t know. I´ve tried all fields -

Pre render MEL
Pre render layer MEL
Pre render frame MEL

none of them are called at rendertime.

any ideas?


edit:
more modifications..

setAttr -type "string" defaultRenderGlobals.imageFilePrefix "<$currentFrame>";

I still need to figure out a way to tell maya to render files into custom folders related to the frames in the timeline. since I got 260 textures and pre render MEL tells maya to connect a different texture at each frame, it would also be necessary to output everything into folders like: FRAME1, FRAME2, ... with the renderings names derived from the render layer names.


everything starts and ends in the right place at the right time.

Last edited by Falott; 25-07-2011 at 03:18 PM.