I'm trying to query what animation layers are selected using Python.
MEL works fine:
treeView -query -selectItem ("AnimLayerTabanimLayerEditor")
However a similar Python command returns an error:
cmds.treeView(q=True, selectItem=[True, "AnimLayerTabanimLayerEditor"])
Error:
// Error: TypeError: file <maya console> line 1: Flag 'selectItem' must be passed a boolean argument when query flag is set //
The weird part is that selectItem asks for 2 arguments: a string, then a boolean (I've tried it in that order too). The MEL command works without a boolean (tried that in Python too).