Object which allows for the runtime creation and manipulation of meshes.
- Memory category
- Instances
- Own members
- 99
- Inherited members
- 6
- Subclasses
- 0
- Siblings
- 30
Properties6
Defined byEditableMesh4
Property categoryData
EditableMesh.EditableMeshDataHolder: NetAssetRef EditableMesh.FixedSize: boolean Returnstrueif a mesh is fixed-size.EditableMesh.IsReplicatedCopy: boolean EditableMesh.MeshData: SharedString
No properties match the filters.
Methods98
Object:GetPropertyChangedSignal( property: string): RBXScriptSignal Get an event that fires when a given property of the object changes.Parameters Parameter Description property: stringThe property to connect to.Returns Type Description RBXScriptSignalA signal that fires whenever the property changes.- Returns true if an object's class matches or inherits from a given class.
Parameters Parameter Description className: stringThe class against which the Object's class will be checked. Case-sensitive.Returns Type Description booleanDescribes whether the Object's class matched or is a subclass of the given class. - Deprecated: This deprecated function is a variant of
Object:IsA()which should be used instead.Parameters Parameter className: stringReturns Type booleanUse IsA instead.
Defined byEditableMesh95
EditableMesh:AddBone( boneProperties: { [string]: any }): number Adds a new bone and returns a bone ID.Parameters Parameter Description boneProperties: { [string]: any }Options table containing bone parameters:Name— A string that specifies the bone name. Note that all bone names in a mesh must be unique, and the maximum length is 100 characters.ParentId— Optional bone ID of the new bone's parent.CFrame— InitialCFrameof the bone in the bind pose of the mesh, in the mesh's local space.Virtual— Boolean that specifies whether this bone is virtual. Virtual bones can only be bound to aFaceControlsinstance.
Returns Type Description numberBone ID of the new bone.- Adds a new color to the geometry and returns a color ID.
Parameters Parameter Description color: Color3The new color.alpha: numberThe color alpha (transparency).0is fully transparent, and1is fully opaque.Returns Type Description numberColor ID of the new color. - Adds a new triangle or quad face to the mesh and returns a face ID.
Parameters Parameter Description vertexIds: { any }Array of the new face's vertex IDs, in order around the face. Provide 3 IDs to create a triangle or 4 IDs to create a quad.Returns Type Description numberFace ID of the new face. - Adds a new normal to the geometry and returns a normal ID.
Parameters Parameter Description normal: Vector3?The normal vector. If the normal value isn't specified, the normal will be automatically calculated.Returns Type Description numberNormal ID of the new normal. - Adds a new triangle to the mesh and returns a face ID.
Parameters Parameter Description vertexId0: numberID of the first vertex of the triangle.vertexId1: numberID of the second vertex of the triangle.vertexId2: numberID of the third vertex of the triangle.Returns Type Description numberStable face ID of the new face. - Adds a new UV to the geometry and returns a UV ID.
Parameters Parameter Description uv: Vector2The new UV coordinate.Returns Type Description numberUV ID of the new UV. - Adds a new vertex to the geometry and returns a vertex ID.
Parameters Parameter Description p: Vector3Position in the mesh's local object space.Returns Type Description numberVertex ID of the new vertex. EditableMesh:BatchAdd( attr: Enum.MeshAttribute, data: { any }): { any } Creates new mesh elements of the given attribute type and returns their IDs.Parameters Parameter Description attr: Enum.MeshAttributeTheMeshAttributetype of element to create.data: { any }Returns Type Description { any }Ordered array of new element IDs matching the input order.EditableMesh:BatchGetFaceAttributes(attr: Enum.MeshAttribute,faceIds: { any },): { any } Returns the per-corner attribute IDs for each face in a batch.Parameters Parameter Description attr: Enum.MeshAttributeThe attribute to retrieve for each face's corners. Must beMeshAttribute.Vertex,MeshAttribute.Normal,MeshAttribute.Color, orMeshAttribute.UV;MeshAttribute.Faceis not supported and throws an error.faceIds: { any }Faces to query.Returns Type Description { any }2D array whereresult[i]is the array of attribute IDs at the corners offaceIds[i].- Returns attribute values for each ID in a batch.
Parameters Parameter Description ids: { any }IDs of the elements to read. All must be the same attribute type — vertex, normal, color, or UV. The attribute is determined by the ID type, so noMeshAttributeargument is needed. Mixing types, or passing face or bone IDs, throws an error. EditableMesh:BatchGetVertexAttributes(attr: Enum.MeshAttribute,vertexIds: { any },): { any } Returns the attribute IDs associated with each vertex in a batch.Parameters Parameter Description attr: Enum.MeshAttributeThe attribute type to look up. Must beMeshAttribute.Face(faces that reference each vertex),MeshAttribute.Normal,MeshAttribute.Color, orMeshAttribute.UV;MeshAttribute.Vertexis not supported and throws an error (to read vertex positions, useBatchGetValues()).vertexIds: { any }Vertices to query.Returns Type Description { any }2D array whereresult[i]is the array of attribute IDs associated withvertexIds[i].EditableMesh:BatchGetVertexFaceAttributes(attr: Enum.MeshAttribute,vertexIds: { any },faceIds: { any },): { any } Returns the attribute ID at each specified corner for a batch of vertex–face pairs.Parameters Parameter Description attr: Enum.MeshAttributeThe attribute to retrieve. Must beMeshAttribute.Normal,MeshAttribute.Color, orMeshAttribute.UV;MeshAttribute.VertexandMeshAttribute.Faceare not supported and throw an error.vertexIds: { any }Vertices that identify each corner.faceIds: { any }Faces that identify each corner. Must be the same length asvertexIds.Returns Type Description { any }Array of attribute IDs at each corner, in the same order as the inputs.EditableMesh:BatchRemove( ids: { any }) Removes a batch of faces.Parameters Parameter ids: { any }- Sets the per-corner attribute IDs for each face in a batch.
Parameters Parameter Description faceIds: { any }Face IDs to update. Must be the same length asattrIdArrays.attrIdArrays: { any }2D array.attrIdArrays[i]is the list of attribute IDs for the corners offaceIds[i], in order. Each inner array must have one entry per corner of the face. All IDs must be of the same attribute type — vertex, normal, color, or UV; mixing types (or passing another ID type) throws an error. - Writes attribute values to a batch of mesh element IDs.
Parameters Parameter Description ids: { any }IDs of the elements to write. All must be the same attribute type — vertex, normal, color, or UV. The attribute is determined by the ID type, so noMeshAttributeargument is needed. Mixing types, or passing face or bone IDs, throws an error.values: { any }Values to assign. Type depends on the ID type:Vector3for vertex or normal IDs,Vector2for UV IDs,Color3or a number for color IDs. Passnilfor normal IDs to reset each normal to auto-computed values, equivalent to callingResetNormal()on each. - Sets the attribute at a specific corner for each vertex–face pair in a batch.
Parameters Parameter Description vertexIds: { any }Vertex IDs that identify each corner.faceIds: { any }Face IDs that identify each corner. Must be the same length asvertexIds.attrIds: { any }Attribute IDs to assign, one per pair; must be the same length asvertexIds. All must be the same attribute type — normal, color, or UV; passing a vertex or face ID throws an error. - Clears all of an EditableMesh's geometry.
- Destroys the mesh.
- Finds the closest point on the mesh's surface.
Parameters Parameter Description point: Vector3Point position in the mesh's local object space.Returns Type Description ...anyTuple of the face ID, point on the mesh in local object space, the barycentric coordinate of the position within the face, and the 3 vertex IDs that the barycentric coordinate weights. - Finds the closest vertex to a specific point in space.
Parameters Parameter Description toThisPoint: Vector3Point position in the mesh's local object space.Returns Type Description numberClosest vertex ID to the specified point in space. - Finds all vertices within a specific sphere.
Parameters Parameter Description center: Vector3Center of the sphere in the mesh's local object space.radius: numberRadius of the sphere.Returns Type Description { any }List of vertex IDs within the requested sphere. - Returns a list of faces adjacent to a given face.
Parameters Parameter Description faceId: numberFace ID for which to get adjacent faces.Returns Type Description { any }List of face IDs adjacent to the given face. - Returns a list of vertices adjacent to a given vertex.
Parameters Parameter Description vertexId: numberVertex ID around which to get adjacent vertices.Returns Type Description { any }List of IDs of adjacent vertices around the given vertex ID. - Finds the bone ID of the bone with the given name.
Parameters Parameter Description boneName: stringBone name to search for.Returns Type Description numberBone ID of the bone with the given name. - Returns the initial
CFrameof the bone in the bind pose of the mesh. - Returns
trueif the bone is virtual.Parameters Parameter Description boneId: numberBone ID for which to get whether the bone is virtual.Returns Type Description booleanWhether the bone with the given bone ID is virtual. Virtual bones can only be bound to aFaceControlsinstance. - Returns the bone name.
Parameters Parameter Description boneId: numberBone ID for which to get the name.Returns Type Description stringName of the bone with the given bone ID. - Returns the parent bone ID, if any.
Parameters Parameter Description boneId: numberBone ID for which to get the parent.Returns Type Description numberBone ID for the parent of the bone with the given bone ID. If there is no parent, returns0. EditableMesh:GetBones( ): { any } Returns all bones of the mesh.Returns Type Description { any }List of bone IDs.EditableMesh:GetCenter( ): Vector3 Returns the center of the mesh's axis-aligned bounding box.Returns Type Description Vector3Center of the bounding box of theEditableMesh.- Returns the color for the given color ID.
Parameters Parameter Description colorId: numberColor ID for which to get the color.Returns Type Description Color3?Color for the requested color ID. - Returns the color alpha (transparency) at the given color ID.
Parameters Parameter Description colorId: numberColor ID for which to get the alpha.Returns Type Description number?Color alpha at the request color ID. EditableMesh:GetColors( ): { any } Returns all colors of the mesh.Returns Type Description { any }List of color IDs.- Returns the face's color IDs for the vertices on the face.
Parameters Parameter Description faceId: numberFace ID for which to get the color IDs.Returns Type Description { any }List of color IDs used for the vertices on the given face. - Returns the face's normal IDs for the vertices on the face.
Parameters Parameter Description faceId: numberFace ID for which to get the normal IDs.Returns Type Description { any }List of normal IDs used for the vertices on the given face. EditableMesh:GetFaces( ): { any } Returns all faces of the mesh.Returns Type Description { any }List of face IDs.- Returns an array of face IDs that use the given color ID.
Parameters Parameter Description colorId: numberColor ID to find faces for.Returns Type Description { any }List of face IDs that use the provided color ID. - Returns an array of face IDs that use the given normal ID.
Parameters Parameter Description normalId: numberNormal ID to find faces for.Returns Type Description { any }List of face IDs that use the provided normal ID. - Returns an array of face IDs that use the given UV ID.
Parameters Parameter Description uvId: numberUV ID to find faces for.Returns Type Description { any }List of face IDs that use the provided UV ID. - Returns the face's UV IDs for the vertices on the face.
Parameters Parameter Description faceId: numberFace ID for which to get the UV IDs.Returns Type Description { any }List of UV IDs used for the vertices on the given face. - Returns the face's vertex IDs.
Parameters Parameter Description faceId: numberFace ID for which to get the vertex IDs.Returns Type Description { any }List of vertex IDs around the given face. - Returns bone IDs and bone
CFramesfor all bones in a specific FACS corrective pose.Parameters Parameter Description actions: { any }Array or 2 or 3FacsActionUnitvalues that specify a corrective pose.Returns Type Description ...anyArray of bone IDs and corresponding array of boneCFrames. EditableMesh:GetFacsCorrectivePoses( ): { any } Returns all FACS corrective poses that are in use.Returns Type Description { any }Array of corrective poses. Each corrective pose is specified by a small array of 2 or 3FacsActionUnitvalues.EditableMesh:GetFacsPose( action: Enum.FacsActionUnit): ...any Returns bone IDs and boneCFramesfor all bones in a specific FACS action unit.Parameters Parameter Description action: Enum.FacsActionUnitFACS action unit for which to get the pose.EditableMesh:GetFacsPoses( ): { any } Returns all FACS action units that have poses defined.Returns Type Description { any }Array ofFacsActionUnit, one for each FACS action unit that has a pose defined.- Returns the normal vector for the given normal ID.
Parameters Parameter Description normalId: numberNormal ID for which to get the normal vector.Returns Type Description Vector3?Normal vector at the requested normal ID. EditableMesh:GetNormals( ): { any } Returns all normals of the mesh.Returns Type Description { any }List of normal IDs.- Gets the position of a vertex.
Parameters Parameter Description vertexId: numberVertex ID for which to get the position.Returns Type Description Vector3Position of a vertex in the mesh's local object space. EditableMesh:GetSize( ): Vector3 Returns the size of the mesh's axis-aligned bounding box.Returns Type Description Vector3Size of theEditableMesh.- Returns UV coordinates at the given UV ID.
Parameters Parameter Description uvId: numberUV ID for which to get the UV coordinate.Returns Type Description Vector2?UV coordinates at the requested UV ID. EditableMesh:GetUVs( ): { any } Returns all UVs of the mesh.Returns Type Description { any }List of UV IDs.- Returns all bone IDs that are associated with the vertex for skinning.
Parameters Parameter Description vertexId: numberVertex ID for which to get the associated bones.Returns Type Description { any }Bone IDs associated with the vertex for skinning. - Returns skinning blend weights for each bone that is associated with the vertex.
Parameters Parameter Description vertexId: numberVertex ID for which to get the associated bone weights.Returns Type Description { any }Skinning blend weights for each bone that is associated with the vertex. - Returns the color IDs of the faces attached to the given vertex.
Parameters Parameter Description vertexId: numberVertex ID to find color IDs.Returns Type Description { any }Array of color IDs of faces attached to the given vertex. - Returns the color ID of a vertex/face pair.
Returns Type Description numberColor ID of the vertex/face pair. - Returns the normal ID of a vertex/face pair.
Returns Type Description numberNormal ID of the vertex/face pair. - Returns the face IDs of the faces attached to the given vertex.
Parameters Parameter Description vertexId: numberVertex ID to find faces for.Returns Type Description { any }Array of face IDs attached to the given vertex. - Returns the UV ID of a vertex/face pair.
Returns Type Description numberUV ID of the vertex/face pair. - Returns the normal IDs of the faces attached to the given vertex.
Parameters Parameter Description vertexId: numberVertex ID to find normal IDs.Returns Type Description { any }Array of normal IDs of faces attached to the given vertex. - Returns the UV IDs of the faces attached to the given vertex.
Parameters Parameter Description vertexId: numberVertex ID to find UV IDs.Returns Type Description { any }Array of UV IDs of faces attached to the given vertex. EditableMesh:GetVertices( ): { any } Returns all vertices as a list of vertex IDs.Returns Type Description { any }List of vertex IDs.- Returns an array of vertex IDs that use the given color ID.
Parameters Parameter Description colorId: numberColor ID to find faces for.Returns Type Description { any }List of face IDs that use the provided color ID. - Returns an array of vertex IDs that use the given normal ID.
Parameters Parameter Description normalId: numberNormal ID to find vertices for.Returns Type Description { any }List of vertex IDs that use the provided normal ID. - Returns an array of vertex IDs that use the given UV ID.
Parameters Parameter Description uvId: numberUV ID to find vertices for.Returns Type Description { any }List of vertex IDs that use the provided UV ID. - Returns a string describing an ID, useful for debugging purposes.
Parameters Parameter Description id: numberID for which to return a debugging information string.Returns Type Description stringString that describes the ID in human-readable format. EditableMesh:MergeVertices( mergeTolerance: number): { [any]: any } Merges vertices that touch together.Parameters Parameter Description mergeTolerance: numberThe distance at which the vertices are considered to touch each other.Returns Type Description { [any]: any }A mapping of old vertex ID to new vertex ID for vertices that have been merged.- Casts a ray and returns the intersection point, face ID, and barycentric coordinates.
Parameters Parameter Description origin: Vector3Origin of the ray in the mesh's local object space.direction: Vector3Direction of the ray.Returns Type Description ...anyTuple of the face ID, point of intersection, barycentric coordinates, and the 3 vertex IDs that the barycentric coordinates weight. EditableMesh:RemoveBone( boneId: number) Removes a bone using its bone ID.Parameters Parameter Description boneId: numberBone ID of the bone to remove.EditableMesh:RemoveFace( faceId: number) Removes a face using its face ID.Parameters Parameter Description faceId: numberFace ID of the face to remove.EditableMesh:RemoveUnused( ): { any } Removes all unused vertices, normals, UVs, and colors, and returns the removed IDs.Returns Type Description { any }All of the removed IDs.EditableMesh:ResetNormal( normalId: number) Reset this normal ID to be automatically calculated.Parameters Parameter Description normalId: numberNormal ID to reset.- Set the initial
CFramefor a bone in the mesh's bind pose. - Set whether a bone is virtual.
- Sets the name for a bone.
- Set a parent for a bone.
- Sets the color for a color ID.
- Sets the color alpha (transparency) for a color ID.
- Sets the face's vertex colors to new color IDs.
- Sets the face's vertex normals to new normal IDs.
- Sets the face's vertex UVs to new UV IDs.
- Sets the face's vertices to new vertex IDs.
EditableMesh:SetFacsBonePose(action: Enum.FacsActionUnit,boneId: number,cframe: CFrame,) SetCFramefor an individual bone in a specific FACS action unit.Parameters Parameter Description action: Enum.FacsActionUnitFACS action unit for which to set the pose.boneId: numberBone to set aCFramefor this pose.cframe: CFrame- Set pose for all bones in a specific FACS corrective pose.
EditableMesh:SetFacsPose(action: Enum.FacsActionUnit,boneIds: { any },cframes: { any },) Set pose for all bones in a specific FACS action unit.Parameters Parameter Description action: Enum.FacsActionUnitFACS action unit to set the pose for.boneIds: { any }Bones for which to set aCFramefor this pose.cframes: { any }- Set the normal for a normal ID.
- Sets a vertex position in the mesh's local object space.
- Sets UV coordinates for a UV ID.
- Assign a list of bones with the vertex for skinning.
- Sets skinning blend weights for each bone associated with the vertex.
- Sets the color ID of a vertex/face pair.
- Sets the normal ID of a vertex/face pair.
- Sets the UV ID of a vertex/face pair.
- Splits all faces on the mesh to be triangles.
- Deprecated: This method is deprecated. Do not use it for new work.
Returns a list of faces that use a given attribute ID.Parameters Parameter Description id: numberAttribute ID for which to find faces that use it.Returns Type Description { any }List of face IDs which use the given attribute ID. - Deprecated: This method is deprecated. Do not use it for new work.
Returns a list of vertices that use a given attribute ID.Parameters Parameter Description id: numberAttribute ID for which to find vertices that use it.Returns Type Description { any }List of vertex IDs which use the given attribute ID.
No methods match the filters.
Events1
Object.Changed: RBXScriptSignal<( property: string)> Fires immediately after a property of the object changes, with some limitations.Parameters Parameter property: string
No events match the filters.