MAXScript Language Reference > 3ds Max Objects > NURBS > The NURBS Classes > NURBS Associated Classes >

# NURBSSelection : Value

An NURBSSelection represents a set of NURBS sub-objects for a scene NURBS node as a virtual array. As such, you can access a sub-object by index, iterate over the sub-objects, and apply mapped functions to the sub-objects. The NURBSSelection array is dynamic, i.e., its contents will change as the sub-objects of the NURBS node change. NURBSSelection values are mappable.

Constructors

    <node>.selectedCurveCVs
    <node>.selectedCurves
    <node>.selectedImports
    <node>.selectedPoints
    <node>.selectedSurfaces
    <node>.selectedSurfCVs
    <node>.curveCVs -- read-only
    <node>.curves -- read-only
    <node>.imports -- read-only
    <node>.surfaces -- read-only
    <node>.surfCVs -- read-only
    <node>.points -- read-only

Properties

    <nurbsselection>.count: Integer, read-only

Returns the number of sub-objects in the NURBSSelection array.

    <nurbsselection>.selSetNames: Array of names, read-only

Returns an array of names of the current named selection sets corresponding to the NURBSSelection level for the object the NURBSSelection is associated with.

The following property is present for singleton selections (of the form $foo.curveCVs[n]):

    <nurbsselection>.index: Integer, read-only

Returns the index of the selected sub-object in the NURBS object,

FOR EXAMPLE,
    $foo.selectedcurveCVs[2].index
returns the curve CV index of the 2nd curve CV in the current selection.

Note

that iterating over a selection yields singleton selections in the loop body:

    sCVs = for i in $foo.selectedcurveCVs collect i.index

sCVs contains selected curve CVs as array

Operators

    <node>.selectedCurveCVs = (<array> | <bitarray>)
    <node>.selectedCurves = (<array> | <bitarray>)
    <node>.selectedImports = (<array> | <bitarray>)
    <node>.selectedPoints = (<array> | <bitarray>)
    <node>.selectedSurfaces = (<array> | <bitarray>)
    <node>.selectedSurfCVs = (<array> | <bitarray>)

Selects the specified sub-objects.

    <nurbsselection> [<integer>]

Retrieves the indexed sub-object as a singleton NURBSSelection. Index starts at 1

    <nurbsselection> [(<integer_array> | <bitarray>)]

Retrieves the indexed sub-objects as a NURBSSelection. Index starts at 1.

    <nurbsselection> [(<#name> | <string>)]

Retrieves the sub-object level named selection set, where the name of the named selection set can be specified as a name or string value.

    <nurbsselection> [(<#name> | <string>)] = (<nurbsselection> | <integer_array> | <bitarray>)

Sets the sub-object level named selection set to the specified edges. The name of the named selection set can be specified as a name or string value, and the edges can be specified as an array, bitArray, or a NURBSSelection from the same object and of the same sub-object level.

Methods

    move <nurbsselection> <point3>

Moves the sub-objects in the NURBSSelection.

    rotate <nurbsselection> <quat_or_other_rotation_form>

Rotates the sub-objects in the NURBSSelection.

    scale <nurbsselection> <point3>

Scales the sub-objects in the NURBSSelection.

    select <nurbsselection>

Selects the sub-objects in the NURBSSelection.

    deselect <nurbsselection>

Deselects the sub-objects in the NURBSSelection.

    delete <nurbsselection>

Deletes the sub-objects in the NURBSSelection.

    append <nurbsselection> (<nurbsselection> | <integer>)

Appends the sub-objects(s) to the NURBSSelection.

    findItem <nurbsselection> (<nurbsselection[<integer>] | <integer>)

Returns the selection index of the matching item or 0 if not found. The item is selection index or singleton NURBSSelection.

EXAMPLES
    $foo.surfCVs[#baz] -- retrieves the surf CV selection named baz
    move $foo.curves[#bar] [0,0,10] -- moves the "bar" curve selection 10 in Z
    move $foo.selectedSurfCVs [0,0,10] -- moves the current surface CV selection 10 in Z
    coordsys local scale $foo.surfaces [#baz] [2,2,2]
    select $foo.curveCVs[#(1,2,3,4,5)] -- select the specified curve CVs
    deselect $foo.curves-- deselect all curves
    delete $foo.points[#{1..31, 40..50}] -- delete the specified points
    $foo.curveCVs[#fred] = $foo.selectedCurveCVs -- "snapshot" the selected curve CVs

#### See Also

- Value Common Properties, Operators, and Methods