Dear Jeremy,

I hope this code may help you.

import maya.OpenMaya as om
import maya.OpenMayaUI as mui

activeView = mui.M3dView.active3dView()

om.MGlobal.selectFromScreen(0,0,activeView.portWidth(),activeView.portHeight(),om.MGlobal.kReplaceList)

it selects all the objects in the active view.

Thank and Regards,
Sudeepth Patinjarayil.
On Jul 16, 2012 10:05 AM, "Jeremy YeoKhoo" <[email protected]> wrote:

> Hi guys,
>
> I am trying to write a simple tool that selects the objects within the
> cameras frustum. I am pretty sure the tool can be written as a one off
> python command. But my lack of experience with the maya API is taking me a
> while to create one.
>
> Would anyone have any experience is creating/building one?
>
> -Jeremy
>
> --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to