MAXScript Language Reference > 3ds Max Objects > Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper > Modifier and SpacewarpModifier Types > Modifiers > Mesh Editing >

# Edit_Normals : Modifier

    Edit_Normals - superclass: modifier; super-superclass:MAXWrapper - classID: #(1252338403, 902438110)

Value > MAXWrapper > Modifier > Edit_Normals

| Modifier Classes - Quick Navigation

Description and Notes:

The Edit_Normals modifier lets the user edit the normal vectors used for realtime rendering of Editable Poly objects.

In 3ds Max 5, only PolyObjects supported edited normals. If you did anything that converted the Edit_Normals result into a non-PolyObject (such as a "Convert to Patch" or a "Mesh Select"), you would lose the normals.

This has been changed in 3ds Max 6 and higher where edited normals are supported by TriMeshes.

Any modifiers that change topology will remove the normals. This includes MeshSmooth, Tessellate, Slice, Mirror, Symmetry, Face Extrude, and Vertex Weld. Note that this also means that the Normal modifier (used to flip face orientations) will not support the edited normals. Since Turn to Poly can be used to modify face topology, it also strips off the edited normals.

All compound objects strip off the edited normals from their operands.

Because of its many topological operations, Editable Poly does not support the edited normals. If you collapse the stack, you'll lose the normals. If you want to collapse to EPoly but keep the normals, consider using "Collapse To" the modifier below Edit Normals.

All deformation and map modifiers will preserve the normals. For instance if you apply a Bend, the normals should be bent along with the geometry. Map modifiers (like UVW Unwrap) will not affect the normals at all.

A few geometric modifiers will not fully support the edited normals. They will not strip them away, but neither will they correctly deform any explicit normals. Modifiers in this category include Push and Relax.

The Smooth modifier should correctly modify any non-specified normals, while not changing the specified and explicit normals.

Edit_Normals is like Mesh Select or Poly Select in the following way: If you create a box, apply an Edit_Normals, change some normals, and then apply a second Edit_Normals modifier, the top Edit_Normals will "inherit" the user-specified normals from the pipeline. But after that, the top Edit_Normals will ignore any changes to the original Edit_Normals modifier just like Mesh Select will ignore any changes to the selection coming up the pipe.

There are three categories of normals in the Edit_Normals modifier.

Unspecified- these are the usual normals that are computed from smoothing groups. All normals are unspecified by default.

Specified- these are normals that are intended for use by particular corners of particular faces, without regard to smoothing groups. Specified normals are not set to explicit values - they ignore smoothing groups, but they're still based on the face normals of the faces that use them.

Explicit- these are normals that are set to particular values. All explicit normals are also considered to be specified.

Constructor

    Edit_Normals ... editNormals ...

Properties

    <Edit_Normals>.displayLength Float default: 10.0 -- world units; Display_Length

Get/set the length of the normals displayed in the viewport.

    <Edit_Normals>.ignoreBackfacing Boolean default: false -- boolean; Ignore_Backfacing

Get/set the Ignore Backfacing option.

    <Edit_Normals>.selectBy Integer default: 0 -- integer; Select_By

Set the selection options.

0 - Select By Normal

1 - Select By Vertex

2 - Select By Edge

3 - Select By Face

    <Edit_Normals>.showHandles Boolean default: false -- boolean; Show_Handles

When set to true, the modifier displays handles at the ends of the normals.

## Edit_Normals interfaces:

    Interface:EditNormalsMod

Properties:

    .SelLevel: enum : Read|Write

    SelLevel enums: {#Object|#Normal|#Vertex|#Edge|#Face}

Gets/Sets the selection level.

Methods:

    <bool>Move <&point3>offset

    offset is In and Out parameter

Moves the selected normals by the specified offset. Returns true on success.

    <bool>Rotate <&quat>rotation

    rotation is In and Out parameter

Rotates the selected normals by the specified quaternion value. Returns true on success.

    <bool>Break [selection:<bitArray>] [node:<node>] [toAverage:<bool>]

    selection default value: undefined
    node default value: undefined
    toAverage default value: false

Breaks the current selection. Returns true on success.

When the same modifier is applied to multiple nodes, specifying the optional node: parameter will limit the method to this single node only.

node : <node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>Unify [selection:<bitArray>] [node:<node>] [toAverage:<bool>]

    selection default value: undefined
    node default value: undefined
    toAverage default value: false

Unifies the current selection. Returns true on success.

node : <node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>Average [useThresh:<bool>] [threshold:<float>] [selection:<bitArray>] [node:<node>]

    useThresh default value: false
    threshold default value: 0.0
    selection default value: undefined
    node default value: undefined

    <bool>AverageGlobal [useThresh:<bool>] [threshold:<float>]

    useThresh default value: false
    threshold default value: 0.0

Average normals with optional threshold.

    <bool>AverageTwo <node>node1 <index>normalID1 <node>node2 <index>normalID2

Average two normals from two different nodes.

    <bool>Reset [selection:<bitArray>] [node:<node>]

    selection default value: undefined
    node default value: undefined

Resets the current selection. Returns true on success.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>Specify [selection:<bitArray>] [node:<node>]

    selection default value: undefined
    node default value: undefined

Makes the normals of the current selection Specified. Returns true on success.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>MakeExplicit [selection:<bitArray>] [node:<node>]

    selection default value: undefined
    node default value: undefined

Makes the normals of the current selection Explicit. Returns true on success.

When the same modifier is applied to multiple nodes, specifying the optional node: parameter will limit the method to this single node only.

    <bool>Copy <index>normalID [node:<node>]

    node default value: undefined

Copies the indexed normal to clipboard. Returns true on success.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>Pasteselection:<bitArray> [node:<node>]

    selection default value: undefined
    node default value: undefined

Pastes the copied normal to the current selection. Returns true on success.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

NoteWhile Copy can accept just one normal, Paste can apply the single copied value to any number of selected normals.

    <bitArray>GetSelection [node:<node>]

    node default value: undefined

Returns the currently selected normals as bitArray.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>SetSelection <&bitArray>newSelection node:<node>

    newSelection is In and Out parameter
    node default value: undefined

Sets the currently selected normals using the supplied bitArray.

    <bool>Select <&bitArray>newSelection [invert:<bool>] [select:<bool>] [node:<node>]

    newSelection is In and Out parameter
    invert default value: false
    select default value: true
    node default value: undefined

Selects the normals specified by the bitArray. This method does not clear any existing selections.

When the optional invert: parameter is set to true , the specified normals’ selection state will be inverted.

When the optional select : parameter is set to false , the specified normals will be deselected. When set to true or not supplied, the normals will be selected.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <void>ConvertVertexSelection <&bitArray>vertexSelection <&bitArray>normalSelection [node:<node>]

    vertexSelection is In and Out parameter
    normalSelection is In and Out parameter
    node default value: undefined

Two bitArrays are passed by reference as In and Out parameters. The first bitArray defines the vertices to convert from. After calling the method the second bitArray will contain the normals shared by the specified vertices.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

EXAMPLE
    --create a Box, convert to EPoly, add Edit_Normals modifier
    my_verts = #{1} --define a bitArray specifying vertex 1
    my_normals = #{} --define an empty bitArray to store the result
    --call the method with the two bitArrays passed by-reference:
    $Box01.Edit_Normals.ConvertVertexSelection &my_verts &my_normals
    my_normals--now take a look at the bitArray
    #{1, 9, 22}--it will contain the normal indices used by vertex 1

    <void>ConvertEdgeSelection <&bitArray>edgeSelection <&bitArray>normalSelection [node:<node>]

    edgeSelection is In and Out parameter
    normalSelection is In and Out parameter
    node default value: undefined

Two bitArrays are passed by reference as In and Out parameters. The first bitArray defines the edges to convert from. After calling the method, the second bitArray will contain the normals shared by the specified edges.

When the same modifier is applied to multiple nodes, specifying the optional node: parameter will limit the method to this single node only.

    <void>ConvertFaceSelection <&bitArray>faceSelection <&bitArray>normalSelection [node:<node>]

    faceSelection is In and Out parameter
    normalSelection is In and Out parameter
    node default value: undefined

Two bitArrays are passed by reference as In and Out parameters. The first bitArray defines the faces to convert from. After calling the method, the second bitArray will contain the normals shared by the specified faces.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <integer>GetNumNormals [node:<node>]

    node default value: undefined

Returns the number of normals.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <point3>GetNormal <index>normalIndex [node:<node>]

    node default value: undefined

Returns the specified indexed normal.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <void>SetNormal <index>normalIndex <&point3>normalValue [node:<node>]

    normalValue is In and Out parameter
    node default value: undefined

Sets the value of the specified indexed normal.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>GetNormalExplicit <index>normalIndex [node:<node>]

    node default value: undefined

Returns true if the specified indexed normal is Explicit, false otherwise.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <void>SetNormalExplicit <index>normalIndex [explicit:<bool>] [node:<node>]

    explicit default value: true
    node default value: undefined

Sets the Explicit state of specified indexed normal. When the optional parameter explicit: is set to false , removes the explicit state and makes the normal Specified. When set to true or not supplied, makes the normal explicit.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <integer>GetNumFaces [node:<node>]

    node default value: undefined

Returns the number of faces.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <integer>GetFaceDegree <index>face [node:<node>]

    node default value: undefined

Returns the number of corners of the specified indexed face.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <index>GetNormalID <index>face <index>corner [node:<node>]

    node default value: undefined

Returns the normal ID of the specified corner of the specified indexed face.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <void>SetNormalID <index>face <index>corner <index>normalID [node:<node>]

    node default value: undefined

Sets the normal ID of the specified corner of the specified indexed face.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <bool>GetFaceNormalSpecified <index>face <index>corner [node:<node>]

    node default value: undefined

Returns true if the normal of the indexed corner of the specified indexed face is Specified, false otherwise.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <void>SetFaceNormalSpecified <index>face <index>corner [specified:<bool>] [node:<node>]

    specified default value: true
    node default value: undefined

Sets the normal of the specified corner of the indexed face to Specified. If the optional specified: parameter is true or nor supplied, sets the Specified state of the normal. If the optional specified: parameter is set to false, resets the Specified state.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <integer>GetNumVertices [node:<node>]

    node default value: undefined

Returns the number of vertices.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <index>GetVertexID <index>face <index>corner [node:<node>]

    node default value: undefined

Returns the vertex index of the specified corner of the indexed face.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <point3>GetVertex <index>vertexID [node:<node>]

    node default value: undefined

Returns the position of the specified vertex.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <integer>GetNumEdges [node:<node>]

    node default value: undefined

Returns the number of edges.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <index>GetEdgeID <index>face <index>side [node:<node>]

    node default value: undefined

Returns the index of the edge at the specified side of the indexed face.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <index>GetFaceEdgeSide <index>face <index>edge [node:<node>]

    node default value: undefined

Returns the side index of the specified edge and face. Obviously, the edge must be used by the face to get a side index.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <index>GetEdgeVertex <index>edge <index>end [:<node>]node

    node default value: undefined

Returns the index of the vertex at the specified end of the specified indexed edge.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <index>GetEdgeFace <index>edge <index>side [node:<node>]

    node default value: undefined

Returns the index of the face using the specified edge and the specified side.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <index>GetEdgeNormal <index>edge <index>end <index>side [node:<node>]

    node default value: undefined

Returns the normal at the specified end of the indexed edge.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <void>RebuildNormals [node:<node>]

    node default value: undefined

Rebuilds the normals.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

    <void>RecomputeNormals [node:<node>]

    node default value: undefined

Recomputes the normals.

node :<node> is used when the Edit Normal modifier is applied to more than one node. For methods where this is a keyword argument, the operation is applied to the single node. Which node the operation applied to depends on the order in which the nodes were selected. As such, results can be unpredictable unless the node is specified.

#### See Also

- Modifier Common Properties, Operators, and Methods

- MAXWrapper Common Properties, Operators, and Methods

- Value Common Properties, Operators, and Methods