PDA

View Full Version : pre Render MEL + set camera


mbort
12-01-2010, 02:57 PM
hi guys,

is there a way to change the renderable camera using a pre render Mel?
i'm trying to change by using something like:


import maya.cmds as cmds

shotCamera = "cam02Shape" # dynamic variable

allCameras = cmds.listCameras()
for cam in allCameras :
camShape = cmds.listRelatives( cam, shapes=True )[0]
if camShape == shotCamera :
cmds.setAttr( camShape+".renderable", True )
else :
cmds.setAttr( camShape+".renderable", False )


but it does seems to work proper.
anyone know how to setup this? perhapes the attributte "renderable" is not what i'm looking for....

when setting in the pre render MEL,( using python(); proper of course) the script does not work.

sorry, i'm new in maya/python/mel and this is a part of a script for rendering the maya 2011 camera sequencer.

Thx.

CGTalk Moderation
12-01-2010, 02:57 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.