Editable_Point - superclass: GeometryClass; super-superclass:node - classID: #(1147554007, 1405554402)The Editable_Point GeometryClass object (UI name Editable Point, Create panel category Points) is the editable point object. It holds an arbitrary number of points, each carrying a set of typed data channels (positions, selection, color, scale, rotation, Gaussian Splat data, user-defined channels, and so on). It is the object that point files (.PLY/.SPZ) load into, the object that point modifiers operate on, and the collapse target for the other point objects. It can display its points directly, display instanced geometry at each point, or render Gaussian Splats when the points carry Gaussian Splat channels. Available in 3ds Max 2027.2 and higher. Some properties and the Segment Point Object action were added in 3ds Max 2027.3, as noted below.
Constructor
Editable_Point...Properties
Point IDs and channel IDs used throughout this page are the integer identifiers of the points and channels in the object, not 1-based MAXScript indices.
<Editable_Point>.useSoftSelection BooleanClass default: false -- booleanSpecifies whether soft selection is used. Corresponds to the Use Soft Selection checkbox.
<Editable_Point>.softSelectionDistance Float default: 20.0 -- worldUnitsGets/sets the soft selection falloff distance in world units. Range 0.0 to 9999999.9. Corresponds to the Distance spinner.
<Editable_Point>.softSelectionFalloffType Integer default: 0 -- integerGets/sets the soft selection falloff curve. Corresponds to the Falloff drop-down list.
<Editable_Point>.selectSimilarTo Integer default: 0 -- integerGets/sets where the result of Select Similar is sent. Corresponds to the Send to: drop-down list.
.selectSimilarToChannelName..selectSimilarToNamedSelectionName.<Editable_Point>.selectSimilarToChannelName UndefinedClass default: undefined -- stringGets/sets the name of the channel that receives the result of Select Similar when .selectSimilarTo is 1 (Channel).
<Editable_Point>.selectSimilarToNamedSelectionName UndefinedClass default: undefined -- stringGets/sets the name of the named selection that receives the result of Select Similar when .selectSimilarTo is 2 (Named Selection).
<Editable_Point>.displayIcon BooleanClass default: true -- booleanSpecifies whether the object's viewport icon is displayed. Corresponds to the Display Icon checkbox.
<Editable_Point>.iconSize Float default: 10.0 -- worldUnitsGets/sets the size of the viewport icon in world units. Range 0.000001 to 9999999.9.
<Editable_Point>.displayPoints BooleanClass default: true -- booleanSpecifies whether the points are drawn in the viewport. Corresponds to the Display Points checkbox.
<Editable_Point>.pointSize Float default: 5.0 -- floatGets/sets the size used to draw the points in the viewport. Range 0.0 to 999.9.
<Editable_Point>.viewportLimitEnabled BooleanClass default: false -- booleanSpecifies whether the number of points drawn in the viewport is limited to .viewportLimitPercent of the active points. Corresponds to the Viewport Limit checkbox. The limit also applies to instance display, together with .displayLimit (the tighter of the two wins). The displayed subset is a stable pseudo-random selection, not the first N points. Available in 3ds Max 2027.3 and higher.
<Editable_Point>.viewportLimitPercent Float default: 100.0 -- floatGets/sets the percentage of the active points drawn in the viewport when .viewportLimitEnabled is true. Range 0.0 to 100.0. Available in 3ds Max 2027.3 and higher.
<Editable_Point>.renderLimitEnabled BooleanClass default: false -- booleanSpecifies whether the number of points (instances and Gaussian Splats) sent to the renderer is limited to .renderLimitPercent. Corresponds to the Render Limit checkbox. The rendered subset is a stable pseudo-random selection. Available in 3ds Max 2027.3 and higher.
<Editable_Point>.renderLimitPercent Float default: 100.0 -- floatGets/sets the percentage of points sent to the renderer when .renderLimitEnabled is true. Range 0.0 to 100.0. Available in 3ds Max 2027.3 and higher.
<Editable_Point>.instanceDisplay BooleanClass default: true -- booleanSpecifies whether geometry instanced on the points is displayed in the viewport. Corresponds to the Instance Display group checkbox.
<Editable_Point>.instanceDisplayType Integer default: 0 -- integerGets/sets how instanced geometry is displayed in the viewport.
<Editable_Point>.displayLimit Integer default: 25000 -- integerGets/sets the maximum number of instances (or Gaussian Splats drawn as instances) displayed in the viewport. Range 0 to 999999999. Corresponds to the Display Limit spinner.
The Gaussian Splats rollout is shown only when the object's points carry Gaussian Splat data.
<Editable_Point>.splatDisplayType Integer default: 0 -- integerGets/sets how Gaussian Splats are displayed. Corresponds to the Display drop-down list.
<Editable_Point>.selectedSplatsOnly BooleanClass default: false -- booleanSpecifies whether only the selected points are displayed as Gaussian Splats. Not exposed in the UI.
<Editable_Point>.displaySplatPercent Float default: 100.0 -- floatGets/sets the percentage of Gaussian Splats to display. Range 0.0 to 100.0. Not exposed in the UI.
<Editable_Point>.splatsAffectCamera BooleanClass default: true -- booleanSpecifies whether the Gaussian Splats are visible to the camera when rendering. Corresponds to the Affect Camera checkbox.
<Editable_Point>.splatsAffectShadows BooleanClass default: true -- booleanSpecifies whether the Gaussian Splats cast shadows when rendering. Corresponds to the Affect Shadows checkbox.
<Editable_Point>.splatsAffectReflections BooleanClass default: true -- booleanSpecifies whether the Gaussian Splats are visible in reflections. Corresponds to the Affect Reflections checkbox.
<Editable_Point>.splatsAffectRefractions BooleanClass default: true -- booleanSpecifies whether the Gaussian Splats are visible in refractions. Corresponds to the Affect Refractions checkbox.
<Editable_Point>.splatsAffectMatteSurfaces BooleanClass default: true -- booleanSpecifies whether the Gaussian Splats affect matte surfaces. Corresponds to the Affect Matte Surfaces checkbox.
<Editable_Point>.splatsColor Color default: (color 255 255 255) -- animatable; RGB colorGets/sets the color multiplier applied to the Gaussian Splats. Corresponds to the Color swatch.
<Editable_Point>.splatsIntensity Float default: 100.0 -- animatable; floatGets/sets the Gaussian Splat intensity as a percentage. Range 0.0 to 9999999.9. Corresponds to the Intensity spinner.
<Editable_Point>.splatsRGBSpace Integer default: 1 -- integerGets/sets the color space the Gaussian Splat colors are interpreted in. Corresponds to the RGB drop-down list.
<Editable_Point>.instanceNodes ArrayParameter default: #() -- node arrayThe array of nodes instanced on the points. Each entry is paired with the entry at the same index in .instanceTypes. Use PointObject.AddInstanceNode (see below) to add a node.
<Editable_Point>.instanceTypes ArrayParameter default: #() -- integer arrayThe instancing type of each node in .instanceNodes, at the same index. Available in 3ds Max 2027.3 and higher. In 3ds Max 2027.2, all instances are dynamic.
The Load Point File rollout and all of its properties are available in 3ds Max 2027.3 and higher.
Setting .sourceFile loads the file into the object immediately (replacing the existing points, or merging with them if .mergeOnLoad is true). Changing .upAxis, .units or .preset reloads the same file with the new options, always replacing rather than merging. Supported formats are .PLY and .SPZ.
<Editable_Point>.sourceFile String default: "" -- filenameGets/sets the point file (.ply or .spz) loaded into the object. The path is tracked by the Asset Tracking system.
<Editable_Point>.preset Integer default: 1 -- integerGets/sets the producer preset used to interpret the file. Determines whether Gaussian Splat channels (scale, orientation, opacity, color) are read in addition to positions. Selecting a preset in the UI also sets .upAxis to that preset's default (-Y for WorldLabs, +Y otherwise); assigning .preset from MAXScript sets only the preset.
<Editable_Point>.upAxis Integer default: 0 -- integerGets/sets the up axis of the source data, which is converted to the 3ds Max Z-up convention on load.
<Editable_Point>.units Integer default: 4 -- integerGets/sets the units the source file's positions are expressed in. The value is a 3ds Max unit type; the UI offers:
<Editable_Point>.mergeOnLoad BooleanClass default: false -- booleanWhen true, the points of a newly picked .sourceFile are added to the existing points instead of replacing them. Corresponds to the Merge checkbox. Ignored in File Sequence mode.
<Editable_Point>.type Integer default: 0 -- integerGets/sets the playback type of the source file. Corresponds to the Type drop-down list.
scan_0001.ply ... scan_0240.ply) is discovered from the picked file, and the file for the current frame is loaded during playback.File Sequence playback is .ply only. If File Sequence is not available, either because .sourceFile is a .spz file or because the feature is turned off, assigning 1 is quietly changed back to 0 (Static).
File sequence support is controlled by a feature flag in a PointObject.ini file in the plugin's bin folder (for example C:\ProgramData\Autodesk\ApplicationPlugins\Advanced Modeling Tools for 3ds Max 2027\Contents\bin\PointObject.ini):
[Features]
EnableFileSequence=1The file is not installed with 3ds Max, and without it file sequence support is on. To turn file sequence support off, create the file with EnableFileSequence=0; the object then behaves as Static-only. The flag is read once per session, the first time it is needed, so restart 3ds Max after changing it. This also applies to Gaussian Splat objects.
<Editable_Point>.startFrame Integer default: 0 -- integerGets/sets the scene frame at which the first file of a File Sequence plays. The file for a frame is chosen as frame - startFrame, clamped to the length of the sequence, so frames before the start hold the first file and frames past the end hold the last. Negative values are allowed. Corresponds to the Start Frame spinner.
The PointObject mixin interface gives script access to the points and data channels of an Editable_Point object. Call it through the object, for example $.PointObject.GetPointCount(), or call its methods directly on the object, for example $.GetPointCount().
By-reference (&) parameters must be passed with the & prefix and a variable, for example $.PointObject.GetChannelId "MyChannel" &chanId.
Methods
<integer>GetPointCount()Returns the number of enabled (active) points. Disabled points are not counted.
<boolean>AddChannel <string>channelName <enum>dataType <value>defaultValue <&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 parameterAdds a user channel called channelName with the given data type and default value, and returns its ID in channelIdOut. Returns false if channelName does not have three words, such as Autodesk User Weight, if a channel with that name already exists, if the name is a standard channel name (use AddStandardChannel for those), or if the channel cannot be created. A named-selection channel must use #U8.
<boolean>AddStandardChannel <enum>channelName <&integer>channelIdOut
channelName 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 parameterAdds the specified standard channel and returns its ID in channelIdOut. Returns false if the channel already exists. If it exists, channelIdOut still receives its ID.
<boolean>GetChannelId <string>channelName <&integer>channelIdOut
channelIdOut is Out parameterGets the ID of the channel called channelName. Returns false if there is no such channel.
<boolean>GetStandardChannelId <enum>channelName <&integer>channelIdOut
channelName 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 parameterGets the ID of the specified standard channel. Returns false if the object does not have that channel.
<boolean>GetChannelProps <integer>channelId <&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 parameterGets the data type and default value of the channel with the given ID. Returns false if the ID is not a valid channel.
<boolean>DeleteChannel <integer>channelIdDeletes the channel with the given ID. Returns false if the ID is not valid or is the Positions channel, which cannot be deleted.
<void>AddPoints <point3 array>positions <&integer array>idsOut
idsOut is In and Out parameterAdds one point at each position in positions. The IDs of the new points are returned in idsOut, in the same order.
<boolean>GetPosition <integer>pointId <&point3>positionOut
positionOut is Out parameterGets the object-space position of the point with the given ID.
<boolean>GetPositions <integer array>pointIds <&point3 array>positionsOut
positionsOut is In and Out parameterGets the object-space positions of the given points, in the same order.
<boolean>SetPosition <integer>pointId <point3>positionSets the object-space position of the point with the given ID.
<boolean>SetPositions <integer array>pointIds <point3 array>positionsSets the object-space positions of the given points. Returns false if the two arrays are not the same length.
<boolean>GetChannelValue <integer>channelId <integer>pointId <&value>valueOut
valueOut is In and Out parameterGets the value of a channel for one point.
<boolean>GetChannelValues <integer>channelId <integer array>pointIds <&value array>valuesOut
valuesOut is In and Out parameterGets the values of a channel for the given points, in the same order.
<boolean>SetChannelValue <integer>channelId <integer>pointId <value>valueSets the value of a channel for one point. The value is converted to the channel's data type. Returns false if the channel ID is not valid. pointId is not validated. Passing an ID that does not exist can raise a system exception.
<boolean>SetChannelValues <integer>channelId <integer array>pointIds <value array>valuesSets the values of a channel for the given points, one value per point ID. Returns false if the channel ID is not valid. The two arrays must have the same number of elements. The lengths are not validated, and arrays of different lengths can raise a system exception.
<void>GetSelectedIds <&integer array>pointIds
pointIds is In and Out parameterGets the IDs of the selected points.
<boolean>SelectIds <integer array>pointIds <boolean>selectSelects the given points (select:true) or deselects them (select:false). Returns false, and prints a message to the Listener, if any ID is not valid.
<void>InvertSelection()Inverts the point selection.
<boolean>DeletePoints <integer array>pointIdsDeletes the given points. Returns false, and prints a message to the Listener, if any ID is not valid.
<boolean>DisablePoints <integer array>pointIdsDisables the given points. Disabled points are kept in the object but are not displayed, rendered or counted as active. Returns false, and prints a message to the Listener, if any ID is not valid.
<boolean>EnablePoints <integer array>pointIdsRe-enables the given (disabled) points. Returns false, and prints a message to the Listener, if any ID is not valid.
<void>GetAllIds <&integer array>pointIdsOut
pointIdsOut is Out parameterGets the IDs of all points, enabled and disabled.
<void>GetActiveIds <&integer array>pointIds
pointIds is In and Out parameterGets the IDs of the enabled (active) points.
<void>SelectAllPoints()Selects all points.
<void>DeselectAllPoints()Deselects all points.
<boolean>AddInstanceNode <node>node <&integer>indexOut
indexOut is Out parameterAdds node to the object's instance nodes (.instanceNodes) and returns its index in indexOut. The index is 0-based. If the node is already in the list, its existing index is returned. Returns false if node is undefined.
<void>GetStandardChannelEnums <&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 parameterGets the standard channels present on the object.
<void>GetAllChannelNames <&string array>namesOut
namesOut is Out parameterGets the full names of all channels on the object.
<boolean>SetChannelAttribute <integer>channelId <enum>attribute <boolean>state
attribute enums: {#TransformWithGeometry}Turns a special attribute of a channel on or off. #TransformWithGeometry controls whether the channel's values are transformed along with the point geometry. Returns false if the channel ID is not valid.
FOR EXAMPLE
-- Create an empty Editable Point object and add three points ep = Editable_Point name:"PointExample" ids = #() ep.AddPoints #([0,0,0], [10,0,0], [0,10,0]) &ids ids ep.GetPointCount() -- Add the standard Color channel and give each point a color colorId = 0 ep.AddStandardChannel #Color &colorId ep.SetChannelValues colorId ids #(red, green, blue) -- Read the color of the second point back c = undefined ep.GetChannelValue colorId ids[2] &c [c.r, c.g, c.b] -- Move the third point and read its position back ep.SetPosition ids[3] [0,20,0] p = [0,0,0] ep.GetPosition ids[3] &p p -- Select the first point ep.SelectIds #(ids[1]) true sel = #() ep.GetSelectedIds &sel selOUTPUT:
#(0, 1, 2) -- point IDs are 0-based 3 [0,255,0] [0,20,0] #(0)
NOTE
- The interface methods can be called directly on the object (as above) or through the interface, for example
$.PointObject.GetPointCount().- Initialize every by-reference (
&) variable before passing it, for exampleids = #()orcolorId = 0. Passing an undefined variable fails with "Unable to convert: undefined to type: ...".- Do not name a variable
ok. It is a read-only MAXScript constant.- Pass point ID lists as integer arrays (
#(0, 1, 2)orfor i = 0 to 24 collect i), not bitarrays. Bitarrays cannot hold the 0-based ID 0.- Color channels are stored as
BMMColorFloat, and values are set and returned as MAXScriptColorvalues.- In 3ds Max 2027.3, a color with an alpha of 255 (the default for color literals and constants such as
red) reads back fromGetChannelValuewith an alpha of 0. Alpha values 0 to 254 are returned unchanged, and the red, green and blue values are not affected.
The Segment Point Object action splits the selected point object into a grid of separate Editable_Point objects, one per non-empty grid cell on the world XY plane. Available in 3ds Max 2027.3 and higher. It has no MAXScript function of its own. Run it through the Action Manager:
actionMan.executeAction 1511947280 "1" -- Point Cloud Tools: Segment Point Object1511947280 is the action table ID 0x5A1E7C10 (Point Cloud Tools table and category) as a decimal integer."1" is the action's persistent ID (command ID 1, Segment Point Object).As documented for actionMan.executeAction, the call returns true if the action was executed and false otherwise.
Requirements
If a requirement is not met, a warning dialog is shown and nothing is changed.
Options dialog
The action is interactive. It always opens the Segment Point Object dialog, and the options cannot be set from MAXScript. The dialog remembers the last-used settings for the current session.
Result
<SourceName>_<X>_<Y>, where X and Y are the zero-based cell coordinates, zero-padded to at least two digits. Negative coordinates (possible with Object Pivot) get an n prefix, for example Scan_n01_03.