Select mesh with rotate or translate value in the scene


#1

Hi I am trying to write a python script that will give me selection of the meshes in the maya scene that has translate or rotate value …I am getting the value of selected objects but not able to get the selection …below is the code i was trying to write. If any one can help me out with the same …instead of give the list selected i fine with querying it in the scene.

import maya.cmds as cmds
 filterSel=()
 mysel = cmds.ls(selection=True )
 print mysel
 for i in mysel:
 	value=cmds.xform(i,q =True,rotation=True)
 	print value
 	if value > [0.0, 0.0, 0.0]:
 		filterSel = i
 		print filterSel