EditPointMod - superclass: modifier; super-superclass:MAXWrapper - classID: #(2187850444L, 2631120225L)The Edit Point modifier provides point-level editing of point objects (Editable Point and 3D Gaussian Splat objects) in the modifier stack. It supports point sub-object selection and soft selection, creating, deleting, disabling and moving points, creating and editing per-point data channels, assigning instance shapes to points, and overriding the display and Gaussian-splat rendering settings of the incoming point object. It appears in the Points modifier category as Edit Point.
Available in 3ds Max 2027.3 and higher.
EditPointMod...<EditPointMod>.displayIcon BooleanClass default: true -- booleanSpecifies whether the point object's icon is displayed in the viewports. Corresponds to the Display Icon checkbox in the Display rollout. This property is hidden from Track View but is still accessible from MAXScript.
<EditPointMod>.iconSize Float default: 10.0 -- worldUnitsGets/sets the size of the point object's viewport icon, in world units. Range: 0.000001 to 9999999.9. This property is also hidden from Track View.
<EditPointMod>.displayPoints BooleanClass default: true -- booleanSpecifies whether the points are drawn in the viewports. Corresponds to the Display Points checkbox.
<EditPointMod>.pointSize Float default: 5.0 -- floatGets/sets the viewport display size of each point. Range: 0.0 to 999.9.
<EditPointMod>.viewportLimitEnabled BooleanClass default: false -- booleanSpecifies whether the number of points drawn in the viewports is limited to viewportLimitPercent of the active points. Corresponds to the Viewport Limit checkbox.
<EditPointMod>.viewportLimitPercent Float default: 100.0 -- floatGets/sets the percentage of active points drawn in the viewports when viewportLimitEnabled is true. Range: 0.0 to 100.0.
<EditPointMod>.renderLimitEnabled BooleanClass default: false -- booleanSpecifies whether the number of points sent to the renderer is limited to renderLimitPercent of the active points. Corresponds to the Render Limit checkbox.
<EditPointMod>.renderLimitPercent Float default: 100.0 -- floatGets/sets the percentage of active points sent to the renderer when renderLimitEnabled is true. Range: 0.0 to 100.0.
<EditPointMod>.instanceDisplay BooleanClass default: true -- booleanSpecifies whether instance shapes assigned to points are displayed in the viewports. Corresponds to the Instance Display group checkbox.
<EditPointMod>.instanceDisplayType Integer default: 1 -- integerGets/sets how instance shapes are drawn in the viewports when instanceDisplay is true:
<EditPointMod>.displayLimit Integer default: 25000 -- integerGets/sets the maximum number of instance shapes drawn in the viewports. Range: 0 to 99999999. Corresponds to the Display Limit spinner in the Instance Display group.
<EditPointMod>.displaySplats BooleanClass default: false -- booleanSpecifies whether Gaussian splats are displayed.
<EditPointMod>.displaySplatPercent Float default: 100.0 -- floatGets/sets the percentage of Gaussian splats displayed. Range: 0.0 to 100.0.
<EditPointMod>.selectedSplatsOnly BooleanClass default: false -- booleanSpecifies whether only the selected points are displayed as Gaussian splats.
<EditPointMod>.splatDisplayType Integer default: 0 -- integerGets/sets how Gaussian splats are displayed in the viewports:
<EditPointMod>.splatsAffectCamera BooleanClass default: true -- booleanSpecifies whether the Gaussian splats are visible to the camera when rendering. Corresponds to the Affect Camera checkbox.
<EditPointMod>.splatsAffectShadows BooleanClass default: true -- booleanSpecifies whether the Gaussian splats cast shadows when rendering. Corresponds to the Affect Shadows checkbox.
<EditPointMod>.splatsAffectReflections BooleanClass default: true -- booleanSpecifies whether the Gaussian splats appear in reflections when rendering. Corresponds to the Affect Reflections checkbox.
<EditPointMod>.splatsAffectRefractions BooleanClass default: true -- booleanSpecifies whether the Gaussian splats appear in refractions when rendering. Corresponds to the Affect Refractions checkbox.
<EditPointMod>.splatsAffectMatteSurfaces BooleanClass default: true -- booleanSpecifies whether the Gaussian splats affect matte surfaces when rendering. Corresponds to the Affect Matte Surfaces checkbox.
<EditPointMod>.splatsColor Color default: (color 255 255 255) -- animatable; RGB colorGets/sets the color applied to the Gaussian splats. Corresponds to the Color swatch in the Gaussian Splat rollout.
<EditPointMod>.splatsIntensity Float default: 100.0 -- animatable; floatGets/sets the intensity of the Gaussian splats, as a percentage. Range: 0.0 to 9999999.9. Corresponds to the Intensity spinner.
<EditPointMod>.splatsRGBSpace Integer default: 1 -- integerGets/sets the RGB color space in which the Gaussian splat colors are interpreted. Corresponds to the RGB drop-down list.
<EditPointMod>.useSoftSelection BooleanClass default: false -- booleanSpecifies whether soft selection is used, so that unselected points near the selection are partially affected by transforms. Corresponds to the Use Soft Selection group checkbox.
<EditPointMod>.softSelectionDistance Float default: 20.0 -- worldUnitsGets/sets the soft selection falloff distance from the selection, in world units. Range: 0.0 to 9999999.9. Corresponds to the Distance spinner.
<EditPointMod>.softSelectionFalloffType Integer default: 0 -- integerGets/sets the shape of the soft selection falloff curve. Corresponds to the Falloff drop-down list.
<EditPointMod>.selectSimilarTo Integer default: 0 -- integerGets/sets where the result of Select Similar is sent. Corresponds to the Send to: drop-down list in the Channel Data rollout.
selectSimilarToChannelName)selectSimilarToNamedSelectionName)<EditPointMod>.selectSimilarToChannelName String default: undefined -- stringGets/sets the name of the channel that receives the Select Similar result when selectSimilarTo is 1.
<EditPointMod>.selectSimilarToNamedSelectionName String default: undefined -- stringGets/sets the name of the named selection that receives the Select Similar result when selectSimilarTo is 2.
<EditPointMod>.instanceNodes ArrayParameter default: #() -- node arrayThe scene nodes used as instance shapes by this modifier. Nodes are appended to this list when an instance shape is picked in the UI or added with EditPoint.AddInstanceNode(); a point's instance index refers to a position in this list.
<EditPointMod>.instanceTypes ArrayParameter default: #() -- integer arrayThe instance type of each entry in instanceNodes, in the same order:
Nodes added from the UI or with EditPoint.AddInstanceNode() are always added as Dynamic.
The EditPoint mixin interface gives script access to the points and channels of a point object as edited by this modifier. Each method takes a modNode argument: the scene node the modifier is applied to, which identifies which object's edits to read or change when the modifier is instanced across several nodes. Methods that change data add an undoable edit operation to the modifier and return true on success. All methods return false if no Edit Point data can be found for modNode.
Points are referenced by their point ID, an integer that identifies a point within the point object (as returned by GetAllIds(), GetActiveIds() or AddPoints()). Channels are referenced by their integer channel ID, as returned by GetChannelId(), GetStandardChannelId(), AddChannel() or AddStandardChannel(). Point IDs are 0-based (a 100-point object has IDs 0 to 99), unlike MAXScript array indices.
Because this is a mixin interface, its methods can be called directly on the modifier, for example $.modifiers[#Edit_Point].GetPointCount $ &count.
Methods
<boolean>GetPointCount <node>modNode <&integer>countOut
countOut is Out parameterReturns the number of enabled points (points not flagged in the PointDisable channel) in countOut. If the object has no PointDisable channel, all points are counted.
<boolean>AddChannel <string>channelName <enum>dataType <value>defaultValue <node>modNode <&integer>channelIdOut
dataType enums: {#I8|#I16|#I32|#I64|#U8|#U16|#U32|#U64|#F32|#F64|#Point2|#Point3|#Point4|#Quat|#Matrix2|#Matrix3|#Color24|#Color48|#Color64|#BMMColor24|#BMMColor32|#BMMColor48|#BMMColor64|#BMMColorFloat|#IPoint3}
channelIdOut is Out parameterCreates a new custom channel with the given name, data type and default value, and returns its channel ID in channelIdOut. Returns false if the name is not a valid channel name (a channel name must have three words, such as Autodesk User Weight), a channel with that name already exists, the name is a standard channel name (use AddStandardChannel() for those), or the name denotes a named selection channel and dataType is not #U8.
<boolean>AddStandardChannel <enum>channelEnum <node>modNode <&integer>channelIdOut
channelEnum enums: {#Selection|#PointDisable|#Positions|#InstanceShape|#Color|#InstanceNormal|#Scale|#Rotation|#Transform|#PosOffset|#Velocity|#TimeScale|#TimeOffset|#PointTime|#CachingType|#SeedId|#GSScale|#GSOrient|#GSOpacity|#MaterialFlags|#MaterialColor|#MaterialOpacity|#MaterialLuminance|#MaterialRoughness|#MaterialShininess}
channelIdOut is Out parameterCreates the specified standard channel, with its standard data type and default value, and returns its channel ID in channelIdOut.
<boolean>GetChannelId <string>channelName <node>modNode <&integer>channelIdOut
channelIdOut is Out parameterReturns in channelIdOut the channel ID of the channel with the given name. Returns false if no such channel exists.
<boolean>GetStandardChannelId <enum>channelEnum <node>modNode <&integer>channelIdOut
channelEnum enums: {#Selection|#PointDisable|#Positions|#InstanceShape|#Color|#InstanceNormal|#Scale|#Rotation|#Transform|#PosOffset|#Velocity|#TimeScale|#TimeOffset|#PointTime|#CachingType|#SeedId|#GSScale|#GSOrient|#GSOpacity|#MaterialFlags|#MaterialColor|#MaterialOpacity|#MaterialLuminance|#MaterialRoughness|#MaterialShininess}
channelIdOut is Out parameterReturns in channelIdOut the channel ID of the specified standard channel. Returns false if the object does not have that channel.
<boolean>GetChannelProps <integer>channelId <node>modNode <&enum>dataTypeOut <&value>defaultValueOut
dataTypeOut enums: {#I8|#I16|#I32|#I64|#U8|#U16|#U32|#U64|#F32|#F64|#Point2|#Point3|#Point4|#Quat|#Matrix2|#Matrix3|#Color24|#Color48|#Color64|#BMMColor24|#BMMColor32|#BMMColor48|#BMMColor64|#BMMColorFloat|#IPoint3}
dataTypeOut is Out parameter
defaultValueOut is In and Out parameterReturns the data type and default value of the specified channel. Returns false if channelId is not a valid channel.
<boolean>DeleteChannel <integer>channelId <node>modNodeDeletes the specified channel. Returns false if channelId is not a valid channel. The positions channel cannot be deleted.
<boolean>AddPoints <point3 array>positions <node>modNode <&integer array>idsOut
idsOut is In and Out parameterAdds one new point at each of the given positions and returns the point IDs of the new points in idsOut. Passing an empty array does nothing and returns true.
<boolean>GetPosition <integer>pointId <node>modNode <&point3>positionOut
positionOut is Out parameterReturns the position of the specified point in positionOut. pointId is not validated. Passing an ID that does not exist can raise a system exception.
<boolean>GetPositions <integer array>pointIds <node>modNode <&point3 array>positionsOut
positionsOut is In and Out parameterReturns the positions of the specified points in positionsOut, in the same order as pointIds.
<boolean>SetPosition <integer>pointId <point3>position <node>modNodeMoves the specified point to the given position.
<boolean>SetPositions <integer array>pointIds <point3 array>positions <node>modNodeMoves each specified point to the corresponding position. Returns false if the two arrays are not the same length.
<boolean>GetChannelValue <integer>channelId <integer>pointId <node>modNode <&value>valueOut
valueOut is In and Out parameterReturns in valueOut the value of the specified channel for the specified point. The MAXScript type of the value depends on the channel's data type.
<boolean>GetChannelValues <integer>channelId <integer array>pointIds <node>modNode <&value array>valuesOut
valuesOut is In and Out parameterReturns in valuesOut the values of the specified channel for the specified points, in the same order as pointIds.
<boolean>SetChannelValue <integer>channelId <integer>pointId <value>value <node>modNodeSets the value of the specified channel for the specified point. The value is converted to the channel's data type. Returns false if channelId is not a valid channel.
<boolean>SetChannelValues <integer>channelId <integer array>pointIds <value array>values <node>modNodeSets the values of the specified channel for the specified points. Returns false if channelId is not a valid channel, the two arrays are not the same length, or any point ID is invalid (in which case nothing is changed).
<boolean>GetSelectedIds <node>modNode <&integer array>pointIdsOut
pointIdsOut is In and Out parameterReturns the point IDs of the currently selected points in pointIdsOut.
<boolean>SelectIds <integer array>pointIds <boolean>select <node>modNodeSelects (select:true) or deselects (select:false) the specified points. The selection state of other points is unchanged.
<boolean>InvertSelection <node>modNodeInverts the point selection.
<boolean>DeletePoints <integer array>pointIds <node>modNodeDeletes the specified points.
<boolean>DisablePoints <integer array>pointIds <node>modNodeDisables the specified points by flagging them in the PointDisable channel. Disabled points are not displayed or rendered but are not deleted, so they can be re-enabled later with EnablePoints().
<boolean>EnablePoints <integer array>pointIds <node>modNodeRe-enables the specified points by clearing their disabled flag in the PointDisable channel.
<boolean>GetAllIds <node>modNode <&integer array>pointIdsOut
pointIdsOut is Out parameterReturns the point IDs of all points in the object, including disabled points, in pointIdsOut.
<boolean>GetActiveIds <node>modNode <&integer array>pointIdsOut
pointIdsOut is In and Out parameterReturns the point IDs of all active (enabled) points in pointIdsOut.
<boolean>SelectAllPoints <node>modNodeSelects all points.
<boolean>DeselectAllPoints <node>modNodeClears the point selection.
<boolean>AddInstanceNode <node>node <node>modNode <&integer>indexOut
indexOut is Out parameterAdds node to the modifier's instanceNodes list as a Dynamic instance shape and returns its index in indexOut. The index is 0-based. If the node is already in the list, its existing index is returned instead. Pass this index to SetPointInstances().
<boolean>SetPointInstances <integer array>pointIds <integer>instanceIndex <node>modNodeAssigns the instance shape at instanceIndex (as returned by AddInstanceNode()) to the specified points.
<boolean>GetStandardChannelEnums <node>modNode <&enum array>enumsOut
enumsOut enums: {#Selection|#PointDisable|#Positions|#InstanceShape|#Color|#InstanceNormal|#Scale|#Rotation|#Transform|#PosOffset|#Velocity|#TimeScale|#TimeOffset|#PointTime|#CachingType|#SeedId|#GSScale|#GSOrient|#GSOpacity|#MaterialFlags|#MaterialColor|#MaterialOpacity|#MaterialLuminance|#MaterialRoughness|#MaterialShininess}
enumsOut is Out parameterReturns in enumsOut the standard channels that are present on the object.
<boolean>GetAllChannelNames <node>modNode <&string array>namesOut
namesOut is Out parameterReturns the full names of all channels on the object in namesOut.
<boolean>SetChannelAttribute <integer>channelId <enum>attribute <boolean>state <node>modNode
attribute enums: {#TransformWithGeometry}Intended to turn the specified attribute of a channel on or off; #TransformWithGeometry makes the channel's values transform along with the point geometry.
FOR EXAMPLE
-- Create a point sphere and add an Edit Point modifier ps = PointSphere radius:50 count:100 em = EditPointMod() addModifier ps em -- Evaluate the stack so the modifier has point data for this node classof ps count = 0 em.GetPointCount ps &count count -- Add three points through the modifier newIds = #() em.AddPoints #([0,0,80], [0,0,90], [0,0,100]) ps &newIds newIds -- Move the last new point and read its position back em.SetPosition newIds[3] [0,0,120] ps pos = [0,0,0] em.GetPosition newIds[3] ps &pos pos -- Select the new points em.SelectIds newIds true ps sel = #() em.GetSelectedIds ps &sel sel -- Delete the first 10 original points (point IDs are 0-based) em.DeletePoints (for i = 0 to 9 collect i) ps em.GetPointCount ps &count count -- Check the result on a collapsed copy chk = convertTo (copy ps) Editable_Point chk.GetPointCount()OUTPUT:
100 #(100, 101, 102) [0,0,120] #(100, 101, 102) 93 93
NOTE
- The modifier has no point data for a node until its stack has been evaluated. Right after
addModifier, every method returnsfalse. Evaluate the stack first, for example withclassof <node>, which is why the example callsclassof ps.- Initialize every by-reference (
&) variable before passing it, for examplenewIds = #()orcount = 0. When a method returnsfalse, do not rely on the value left in its output variable.- Do not name a variable
ok. It is a read-only MAXScript constant.
FOR EXAMPLE: Add Gaussian Splat channels so the points can be exported to PLY
PLY Export only exports objects that have the Gaussian Splat channels (see PLYExport : ExporterPlugin). This example adds those channels to a Point Sphere with Edit Point, exports it, and loads the file back into a Gaussian Splat object.
-- Create a point sphere and add an Edit Point modifier ps = PointSphere radius:50 count:500 name:"SplatFromPoints" em = EditPointMod() addModifier ps em -- Evaluate the stack so the modifier has point data for this node classof ps ids = #() em.GetActiveIds ps &ids -- Add the Gaussian Splat channels that PLY Export requires (Positions already exists) colorId = 0 em.AddStandardChannel #Color ps &colorId opacityId = 0 em.AddStandardChannel #GSOpacity ps &opacityId scaleId = 0 em.AddStandardChannel #GSScale ps &scaleId orientId = 0 em.AddStandardChannel #GSOrient ps &orientId -- Fill the channels: orange, 80% opacity, 2-unit splats (must be greater than 0), no rotation em.SetChannelValues colorId ids (for i in ids collect (color 255 128 0)) ps em.SetChannelValues opacityId ids (for i in ids collect 0.8) ps em.SetChannelValues scaleId ids (for i in ids collect [2,2,2]) ps em.SetChannelValues orientId ids (for i in ids collect (quat 0 0 0 1)) ps -- Export the object to a PLY file (with the default Scene Units option, no rescaling is applied) f = (getDir #temp) + @"\SplatFromPoints.ply" select ps exportFile f #noPrompt selectedOnly:true using:PLYExport -- Load the file back into a Gaussian Splat object, in the scene's own units gs = GaussianSplat name:"SplatFromPointsReloaded" gs.units = (findItem #(#inches, #feet, #miles, #millimeters, #centimeters, #meters, #kilometers) units.SystemType) - 1 gs.sourceFile = f -- Check the reloaded splats on a collapsed copy chk = convertTo (copy gs) Editable_Point chk.GetPointCount() sid = 0 chk.GetStandardChannelId #GSScale &sid v = [0,0,0] chk.GetChannelValue sid 0 &v v delete chkOUTPUT:
true -- exportFile succeeded 500 -- all points were written and reloaded as splats [2,2,2] -- the splat scale round-trips unchanged
NOTE
- PLY Export requires these channels in addition to Positions:
#Color,#GSOpacity(0.0 to 1.0),#GSScaleand#GSOrient. If any of them is missing, nothing is exported.- Give every point a
#GSScalegreater than 0 in each axis. The exporter writes the logarithm of the scale, so a zero scale produces invalid data.- With its default Scene Units option, PLY Export writes positions and scales without rescaling. When you load the file back, set the Gaussian Splat
.unitsto the scene's system units (as the example does), otherwise the default of Centimeters rescales the data.