PDA

View Full Version : deselect renderlayers prior to deleting them


katisss
04-25-2007, 09:26 AM
I need to deselect all renderlayers in the editor because a selection causes an error
when deleting them.

// Error: file: D:\maya\mel\workflow_WORK\rtt_stillKonfigurator.mel line 225: Connection not broken: 'renderLayerManager.renderLayerId[1]' -> 'BasisKonfig.identification'. Render layer 'BasisKonfig' is in use. //
// Error: file: D:\maya\mel\workflow_WORK\rtt_stillKonfigurator.mel line 225: Connection not made: 'renderLayerManager.renderLayerId[1]' -> 'BasisKonfig.identification'. Source node will not allow the disconnection. //



Sounds easy enough but this layermanager mel script from the interface doesnt distiguish display and renderlayers.

layerEditorLayerButtonSelect 0 ($layer);
works in the scripteditor but only when the renderlayers are selected. Any ideas?
Or do i need to change the current layer somehow?

katisss
04-25-2007, 01:10 PM
setAttr renderLayerManager.currentRenderLayer 0; is the answer

CGTalk Moderation
04-25-2007, 01:10 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.