The following methods allow you to pick one or more objects based on their position in the viewports. All coordinates used in these methods are in Windows format with the origin in the upper left. The gw.getWinSizeX() and gw.getWinSizeY() methods can be used to determine the size of the viewport in pixels. The objects to pick are filtered based on the Selection Filter specified in the 3ds Max main toolbar.
Returns an array of the nodes within the specified rectangular region. The <box2> value specifies the corner in pixel values within the active viewport. If the crossing: parameter value is true , an object only partially in the region will be picked. If false , the object must be completely within the region to be picked. The default crossing: value is true .
Returns an array of the nodes within the specified circular region. The <box2> value specifies the center of the circle and a point on the circle in pixel values within the active viewport. If the crossing: parameter value is true , an object only partially in the region will be picked. If false , the object must be completely within the region to be picked. The default crossing: value is true . The [left, bottom] and [right, top] components of the box2 parameter value correspond to the center and radius points, respectively. The box2 parameter value needs to be set up in a specific manner as shown in the following script:
This will print the names of all nodes completely within a circular region, where the center of the circle is the center of the viewport and the point on the circle is located one quarter of the distance from the edge to the center of the viewport.
Returns an array of the nodes within the specified fenced region. The fenced area is defined by the array of point2 values. The default crossing: value is true .