rojo/.cursor/rules/roblox/reference/engine/classes/EditableMesh.yaml
2026-02-02 12:08:47 -06:00

2364 lines
68 KiB
YAML

# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: EditableMesh
type: class
memory_category: Instances
summary: |
Instance which allows for the runtime creation and manipulation of meshes.
description: |
`EditableMesh` changes the applied visual mesh when linked to a
`Class.MeshPart`, allowing for querying and modification of the mesh both in
Studio and in experience.
#### Enabling for Published Experiences
For security purposes, using `EditableMesh` fails by default for published
experiences. To enable usage of `EditableMesh`, you must be 13+ age verified
and ID verified. After you are verified, open Studio's
[Experience Settings](../../../studio/experience-settings.md), select
**Security**, and enable the **Allow Mesh & Image APIs**
toggle. Remember to review the
[Terms of Use](https://en.help.roblox.com/hc/en-us/articles/115004647846-Roblox-Terms-of-Use#creators-restrictions-on-use)
before enabling the toggle.
#### Permissions
To prevent misuse, `Class.AssetService:CreateEditableMeshAsync()` will only
allow you to load and edit mesh assets:
- That are owned by the creator of the experience (if the experience is owned
by an individual).
- That are owned by a group (if the experience is owned by the group).
- That are owned by the logged in Studio user (if the place file has not yet
been saved or published to Roblox).
#### Memory Limits
Editable assets are currently expensive for memory usage. To minimize its
impact on client performance, `EditableMesh` has strict client-side memory
budgets, although the server, Studio, and plugins operate with unlimited
memory. Using `Class.EditableMesh.FixedSize|FixedSize` may help you stay
within the memory budget and, in some scenarios, linking one `EditableMesh` to
multiple `Class.MeshPart|MeshParts` (multi-referencing) can help with memory
optimization.
#### Creation and Display
An `EditableMesh` can be created from an existing `Datatype.Content` of a
`Class.MeshPart` or a mesh ID using
`Class.AssetService:CreateEditableMeshAsync()`, or a blank `EditableMesh` can
be created with `Class.AssetService:CreateEditableMesh()`. It can then be
displayed, modified, and its collision model updated. Not all of the steps are
necessary; for example, you might want to create an `EditableMesh` just to
raycast without ever displaying it.
```lua
local AssetService = game:GetService("AssetService")
-- Create empty EditableMesh
local editableMesh = AssetService:CreateEditableMesh()
-- Create EditableMesh from asset ID
local editableMeshFromAsset = nil
local success, errorMessage = pcall(function()
editableMeshFromAsset = AssetService:CreateEditableMeshAsync(Content.fromAssetId(ASSET_ID))
end)
-- Create EditableMesh from another EditableMesh
local editableMeshFromAnother = nil
local success, errorMessage = pcall(function()
editableMeshFromAnother = AssetService:CreateEditableMeshAsync(Content.fromObject(OTHER_EDITABLE_MESH))
end)
-- Create EditableMesh from MeshPart
local editableMeshFromMeshPart = nil
local success, errorMessage = pcall(function()
editableMeshFromMeshPart = AssetService:CreateEditableMeshAsync(MESH_PART.MeshContent)
end)
```
An `EditableMesh` is displayed when it's linked to a new `Class.MeshPart`,
through `Class.AssetService:CreateMeshPartAsync()`. You can create more
`Class.MeshPart` instances that reference the same `EditableMesh`
`Datatype.Content`, or link to an existing `Class.MeshPart` through
`Class.MeshPart:ApplyMesh()`.
```lua
local AssetService = game:GetService("AssetService")
local Workspace = game:GetService("Workspace")
-- Create EditableMesh from asset ID
local editableMeshFromAsset = nil
local success, errorMessage = pcall(function()
editableMeshFromAsset = AssetService:CreateEditableMeshAsync(Content.fromAssetId(ASSET_ID))
end)
-- Create new MeshPart linked to the EditableMesh
local newMeshPart = nil
local success, errorMessage = pcall(function()
newMeshPart = AssetService:CreateMeshPartAsync(Content.fromObject(editableMeshFromAsset))
end)
-- Alternatively, link the new MeshPart created above to an existing MeshPart
local existingMeshPart = Workspace:FindFirstChild("EXISTING_MESH_PART")
existingMeshPart:ApplyMesh(newMeshPart)
```
To recalculate collision and fluid geometry after editing, you can again call
`Class.AssetService:CreateMeshPartAsync()` and `Class.MeshPart:ApplyMesh()` to
update an existing `Class.MeshPart`. It's generally recommended to do this at
the end of a conceptual edit, not after individual calls to methods that
manipulate geometry. Visual changes to the mesh will always be immediately
reflected by the engine, without the need to call
`Class.AssetService:CreateMeshPartAsync()`.
#### Fixed-Size Meshes
When creating an `EditableMesh` from an existing mesh asset (via
`Class.AssetService:CreateEditableMeshAsync()`), the resulting editable mesh
is fixed-size by default. Fixed-size meshes are more efficient in terms of
memory but you cannot change the number of vertices, faces, or attributes.
Only the values of vertex attributes and positions can be edited.
```lua
local AssetService = game:GetService("AssetService")
-- Create EditableMesh without fixed-size default
local editableMeshFromAsset = nil
local success, errorMessage = pcall(function()
editableMeshFromAsset = AssetService:CreateEditableMeshAsync(Content.fromAssetId(ASSET_ID), {FixedSize = false})
end)
```
#### Stable Vertex/Face IDs
Many `EditableMesh` methods take **vertex**, **normal**, **UV**, **color** and
**face** IDs. These are represented as integers in Luau but they require some
special handling. The main difference is that IDs are stable and they remain
the same even if other parts of the mesh change. For example, if an
`EditableMesh` has five vertices `{1, 2, 3, 4, 5}` and you remove vertex `4`,
the new vertices will be `{1, 2, 3, 5}`.
Note that the IDs are not guaranteed to be in order and there may be holes in
the numbering, so when iterating through vertices or faces, you should iterate
through the table returned by `Class.EditableMesh:GetVertices()|GetVertices()`
or `Class.EditableMesh:GetFaces()|GetFaces()`.
#### Split Vertex Attributes
A **vertex** is a corner of a face, and topologically connects faces together.
Vertices can have several attributes: position, normal, UV coordinate, color,
and transparency.
Sometimes it's useful for all faces that touch a vertex to use the same
attribute values, but sometimes you'll want different faces to use different
attribute values on the same vertex. For example, on a smooth sphere, each
vertex will only have a single normal. In contrast, at the corner of a cube,
the vertex will have 3 different normals (one for each adjacent face). You can
also have seams in the UV coordinates or sharp changes in the vertex colors.
When creating faces, every vertex will by default have one of each attribute:
one normal, one UV coordinate, and one color/transparency. If you want to
create a seam, you should create new attributes and set them on the face. For
example, this code will create a sharp cube:
```lua
local AssetService = game:GetService("AssetService")
-- Given 4 vertex IDs, adds a new normal and 2 triangles, making a sharp quad
local function addSharpQuad(editableMesh, vid0, vid1, vid2, vid3)
local nid = editableMesh:AddNormal() -- This creates a normal ID which is automatically computed
local fid1 = editableMesh:AddTriangle(vid0, vid1, vid2)
editableMesh:SetFaceNormals(fid1, {nid, nid, nid})
local fid2 = editableMesh:AddTriangle(vid0, vid2, vid3)
editableMesh:SetFaceNormals(fid2, {nid, nid, nid})
end
-- Makes a cube with creased edges between the 6 sides
local function makeSharpCube()
local editableMesh = AssetService:CreateEditableMesh()
local v1 = editableMesh:AddVertex(Vector3.new(0, 0, 0))
local v2 = editableMesh:AddVertex(Vector3.new(1, 0, 0))
local v3 = editableMesh:AddVertex(Vector3.new(0, 1, 0))
local v4 = editableMesh:AddVertex(Vector3.new(1, 1, 0))
local v5 = editableMesh:AddVertex(Vector3.new(0, 0, 1))
local v6 = editableMesh:AddVertex(Vector3.new(1, 0, 1))
local v7 = editableMesh:AddVertex(Vector3.new(0, 1, 1))
local v8 = editableMesh:AddVertex(Vector3.new(1, 1, 1))
addSharpQuad(editableMesh, v5, v6, v8, v7) -- Front
addSharpQuad(editableMesh, v1, v3, v4, v2) -- Back
addSharpQuad(editableMesh, v1, v5, v7, v3) -- Left
addSharpQuad(editableMesh, v2, v4, v8, v6) -- Right
addSharpQuad(editableMesh, v1, v2, v6, v5) -- Bottom
addSharpQuad(editableMesh, v3, v7, v8, v4) -- Top
editableMesh:RemoveUnused()
return editableMesh
end
```
#### Winding
Mesh faces have a front side and a back side. When drawing meshes, only the
front of the faces are drawn by default, although you can change this by
setting the mesh' `Class.MeshPart.DoubleSided|DoubleSided` property to `true`.
The order of the vertices around the face determines whether you are looking
at the front or the back. The front of the face is visible when the vertices
go counterclockwise around it.
<img src="../../../assets/engine-api/classes/EditableMesh/Winding.png" alt="Order of the vertices around the face" width="550" />
#### FACS Poses
Animatable heads use the Facial Action Coding System (FACS). See the
[FACS poses reference](../../../art/characters/facial-animation/facs-poses-reference.md)
for helpful information when using
`Class.EditableMesh:GetFacsPoses()|GetFacsPoses()` and similar methods.
Each FACS pose is specified by an `Enum.FacsActionUnit` value. For the FACS
pose, virtual bones can each have a `Datatype.CFrame` that transforms the
bones' initial `Datatype.CFrame` in the bind pose of the mesh into the
`Datatype.CFrame` for that FACS action unit's pose. All bone
`Datatype.CFrame|CFrames` are in the mesh's local space.
These FACS poses are blended together during animation. Sometimes, the
blending of the base poses produces poor results. In those cases, you can
override the blending of specific combinations of base poses with a
[corrective pose](../../../art/characters/facial-animation/create-basic-heads.md#combination-poses)
that is more pleasing. A corrective pose is specified by 2 or 3
`Enum.FacsActionUnit` values. Like a base FACS pose, for a corrective pose,
virtual bones can each have a `Datatype.CFrame` that transforms the bones'
initial `Datatype.CFrame` in the bind pose of the mesh into the
`Datatype.CFrame` for that FACS corrective.
Please note that corrective poses that operate on both left and right action
units are not currently expressible. For example, using `LeftCheekPuff` and
`RightEyeClosed` together in a corrective pose is not currently possible.
#### Limitations
`EditableMesh` currently has a limit of 60,000 vertices and 20,000 triangles.
Attempting to add too many vertices or triangles will cause an error.
code_samples: []
inherits:
- Object
descendants: []
tags:
- NotCreatable
deprecation_message: ''
properties:
- name: EditableMesh.FixedSize
summary: |
Returns `true` if a mesh is fixed-size.
description: |
Fixed-sized meshes allow changing the values of vertex attributes but do
not allow vertices and triangles to be added or deleted.
code_samples: []
type: boolean
tags:
- ReadOnly
- NotReplicated
deprecation_message: ''
security:
read: None
write: RobloxEngineSecurity
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: true
capabilities:
- DynamicGeneration
- name: EditableMesh.SkinningEnabled
summary: ''
description: ''
code_samples: []
type: boolean
tags:
- Deprecated
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: true
can_save: true
capabilities:
- DynamicGeneration
methods:
- name: EditableMesh:AddBone
summary: |
Adds a new bone and returns a stable bone ID.
description: |
Adds a new bone and returns a stable bone ID.
code_samples: []
parameters:
- name: boneProperties
type: Dictionary
default:
summary: |
Options table containing bone parameters:
- `Name` — A string that specifies the bone name. Note that all bone
names in a mesh must be unique.
- `ParentId` — Optional bone ID of the new bone's parent.
- `CFrame` — Initial `Datatype.CFrame` of 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 a `Class.FaceControls` instance.
returns:
- type: int64
summary: |
Stable bone ID of the new bone.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:AddColor
summary: |
Adds a new color to the geometry and returns a stable color ID.
description: |
Adds a new color to the geometry and returns a stable color ID.
code_samples: []
parameters:
- name: color
type: Color3
default:
summary: |
The new color.
- name: alpha
type: float
default:
summary: |
The color alpha (transparency).
returns:
- type: int64
summary: |
Stable color ID of the new color.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:AddNormal
summary: |
Adds a new normal to the geometry and returns a stable normal ID.
description: |
Adds a new normal to the geometry and returns a stable normal ID. If the
normal value isn't specified, the normal will be automatically calculated.
code_samples: []
parameters:
- name: normal
type: Vector3?
default:
summary: |
The normal vector. If the normal value isn't specified, the normal
will be automatically calculated.
returns:
- type: int64
summary: |
Stable normal ID of the new normal.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:AddTriangle
summary: |
Adds a new triangle to the mesh and returns a stable face ID.
description: |
Adds a new triangle to the mesh and returns a stable face ID.
code_samples: []
parameters:
- name: vertexId0
type: int64
default:
summary: |
ID of the first vertex of the triangle.
- name: vertexId1
type: int64
default:
summary: |
ID of the second vertex of the triangle.
- name: vertexId2
type: int64
default:
summary: |
ID of the third vertex of the triangle.
returns:
- type: int64
summary: |
Stable face ID of the new face.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:AddUV
summary: |
Adds a new UV to the geometry and returns a stable UV ID.
description: |
Adds a new UV to the geometry and returns a stable UV ID.
code_samples: []
parameters:
- name: uv
type: Vector2
default:
summary: |
The new UV coordinate.
returns:
- type: int64
summary: |
Stable UV ID of the new UV.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:AddVertex
summary: |
Adds a new vertex to the geometry and returns a stable vertex ID.
description: |
Adds a new vertex to the geometry and returns a stable vertex ID.
code_samples: []
parameters:
- name: p
type: Vector3
default:
summary: |
Position in the mesh's local object space.
returns:
- type: int64
summary: |
Stable vertex ID of the new vertex.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:Destroy
summary: |
Destroys the mesh.
description: |
Destroys the contents of the mesh, immediately reclaiming used memory.
code_samples: []
parameters: []
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:FindClosestPointOnSurface
summary: |
Finds the closest point on the mesh's surface.
description: |
Finds the closest point on the mesh's surface. Returns the face ID, point
on the mesh in local object space, and the barycentric coordinate of the
position within the face. See
`Class.EditableMesh:RaycastLocal()|RaycastLocal()` for more information on
barycentric coordinates.
code_samples: []
parameters:
- name: point
type: Vector3
default:
summary: |
Point position in the mesh's local object space.
returns:
- type: Tuple
summary: |
Tuple of the face ID, point on the mesh in local object space, and the
barycentric coordinate of the position within the face.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:FindClosestVertex
summary: |
Finds the closest vertex to a specific point in space.
description: |
Finds the closest vertex to a specific point in space and returns a stable
vertex ID.
code_samples: []
parameters:
- name: toThisPoint
type: Vector3
default:
summary: |
Point position in the mesh's local object space.
returns:
- type: int64
summary: |
Closest stable vertex ID to the specified point in space.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:FindVerticesWithinSphere
summary: |
Finds all vertices within a specific sphere.
description: |
Finds all vertices within a specific sphere and returns a list of stable
vertex IDs.
code_samples: []
parameters:
- name: center
type: Vector3
default:
summary: |
Center of the sphere in the mesh's local object space.
- name: radius
type: float
default:
summary: |
Radius of the sphere.
returns:
- type: Array
summary: |
List of stable vertex IDs within the requested sphere.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetAdjacentFaces
summary: |
Returns a list of faces adjacent to a given face.
description: |
Given a stable face ID, returns a list of adjacent faces.
<img src="../../../assets/engine-api/classes/EditableMesh/GetAdjacentTriangles.png" alt="Adjacent faces indicated around requested face" width="120" />
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: ''
returns:
- type: Array
summary: |
List of face IDs adjacent to the given face.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetAdjacentVertices
summary: |
Returns a list of vertices adjacent to a given vertex.
description: |
Given a stable vertex ID, returns a list of adjacent vertices.
<img src="../../../assets/engine-api/classes/EditableMesh/GetAdjacentVertices.png" alt="Adjacent vertices indicated around requested vertex" width="120" />
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Vertex ID around which to get adjacent vertices.
returns:
- type: Array
summary: |
List of IDs of adjacent vertices around the given vertex ID.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetBoneByName
summary: |
Finds the bone ID of the bone with the given name.
description: |
Finds the bone ID of the bone with the given name. Errors if no bone with
that name exists.
code_samples: []
parameters:
- name: boneName
type: string
default:
summary: |
Bone name to search for.
returns:
- type: int64
summary: |
Bone ID of the bone with the given name.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetBoneCFrame
summary: |
Returns the initial `Datatype.CFrame` of the bone in the bind pose of the
mesh.
description: |
Returns the initial `Datatype.CFrame` of the bone in the bind pose of the
mesh, in the mesh's local space.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to get the `Datatype.CFrame`.
returns:
- type: CFrame
summary: |
Initial `Datatype.CFrame` of the bone in the bind pose of the mesh, in
the mesh's local space.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetBoneIsVirtual
summary: |
Returns `true` if the bone is virtual.
description: |
Returns `true` if the bone is virtual. Virtual bones can only be bound to
a `Class.FaceControls` instance.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to get whether the bone is virtual.
returns:
- type: boolean
summary: |
Whether the bone with the given bone ID is virtual. Virtual bones can
only be bound to a `Class.FaceControls` instance.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetBoneName
summary: |
Returns the bone name.
description: |
Returns the bone name.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to get the name.
returns:
- type: string
summary: |
Name of the bone with the given bone ID.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetBoneParent
summary: |
Returns the parent bone ID, if any.
description: |
Returns the parent bone ID, if any.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to get the parent.
returns:
- type: int64
summary: |
Bone ID for the parent of the bone with the given bone ID. If there is
no parent, returns `0`.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetBones
summary: |
Returns all bones of the mesh.
description: |
Returns all bones of the mesh as a list of stable bone IDs.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
List of stable bone IDs.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetCenter
summary: ''
description: ''
code_samples: []
parameters: []
returns:
- type: Vector3
summary: |
Center of the bounding box of the `EditableMesh`.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetColor
summary: |
Returns the color for the given color ID.
description: |
Returns the color for the given color ID.
code_samples: []
parameters:
- name: colorId
type: int64
default:
summary: |
Color ID for which to get the color.
returns:
- type: Color3?
summary: |
Color for the requested stable color ID.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetColorAlpha
summary: |
Returns the color alpha (transparency) at the given color ID.
description: |
Returns the color alpha (transparency) at the given stable color ID.
code_samples: []
parameters:
- name: colorId
type: int64
default:
summary: |
Color ID for which to get the alpha.
returns:
- type: float?
summary: |
Color alpha at the request stable color ID.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetColors
summary: |
Returns all colors of the mesh.
description: |
Returns all colors of the mesh as a list of stable color IDs.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
List of stable color IDs.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFaceColors
summary: |
Returns the face's color IDs for the vertices on the face.
description: |
Returns the face's color IDs for the vertices on the face.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: |
Face ID for which to get the color IDs.
returns:
- type: Array
summary: |
List of color IDs used for the vertices on the given face.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFaceNormals
summary: |
Returns the face's normal IDs for the vertices on the face.
description: |
Returns the face's normal IDs for the vertices on the face.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: |
Face ID for which to get the normal IDs.
returns:
- type: Array
summary: |
List of normal IDs used for the vertices on the given face.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFaces
summary: |
Returns all faces of the mesh.
description: |
Returns all faces of the mesh as a list of stable face IDs.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
List of stable face IDs.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacesWithAttribute
summary: |
Returns a list of faces that use a given attribute ID.
description: |
Returns a list of faces that use a given vertex ID, normal ID, UV ID, or
color ID.
code_samples: []
parameters:
- name: id
type: int64
default:
summary: |
Attribute ID for which to find faces that use it.
returns:
- type: Array
summary: |
List of face IDs which use the given attribute ID.
tags:
- Deprecated
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacesWithColor
summary: |
Returns an array of face IDs that use the given color ID.
description: |
Returns an array of face IDs that use the given color ID. Use together
with `Class.EditableMesh:GetVerticesWithColor()|GetVerticesWithColor()` to
obtain all face/vertex pairs.
code_samples: []
parameters:
- name: colorId
type: int64
default:
summary: |
Color ID to find faces for.
returns:
- type: Array
summary: |
List of face IDs that use the provided color ID.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacesWithNormal
summary: |
Returns an array of face IDs that use the given normal ID.
description: |
Returns an array of face IDs that use the given normal ID. Use together
with `Class.EditableMesh:GetVerticesWithNormal()|GetVerticesWithNormal()`
to obtain all face/vertex pairs.
code_samples: []
parameters:
- name: normalId
type: int64
default:
summary: |
Normal ID to find faces for.
returns:
- type: Array
summary: |
List of face IDs that use the provided normal ID.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacesWithUV
summary: |
Returns an array of face IDs that use the given UV ID.
description: |
Returns an array of face IDs that use the given UV ID. Use together with
`Class.EditableMesh:GetVerticesWithUV()|GetVerticesWithUV()` to obtain all
face/vertex pairs.
code_samples: []
parameters:
- name: uvId
type: int64
default:
summary: |
UV ID to find faces for.
returns:
- type: Array
summary: |
List of face IDs that use the provided UV ID.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFaceUVs
summary: |
Returns the face's UV IDs for the vertices on the face.
description: |
Returns the face's UV IDs for the vertices on the face.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: |
Face ID for which to get the UV IDs.
returns:
- type: Array
summary: |
List of UV IDs used for the vertices on the given face.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFaceVertices
summary: |
Returns the face's vertex IDs.
description: |
Returns the face's vertex IDs.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: ''
returns:
- type: Array
summary: |
List of vertex IDs around the given face.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacsCorrectivePose
summary: |
Returns bone IDs and bone `Datatype.CFrame|CFrames` for all bones in a
specific FACS corrective pose.
description: |
Returns bone IDs and bone `Datatype.CFrame|CFrames` for all bones in a
specific FACS corrective pose. Each bone `Datatype.CFrame` transforms the
bone from the initial bone `Datatype.CFrame` in the bind pose of the mesh
to the combined bone `Datatype.CFrame` for this pose. All
`Datatype.CFrame|CFrames` are in the mesh's local space.
code_samples: []
parameters:
- name: actions
type: Array
default:
summary: |
Array or 2 or 3 `Enum.FacsActionUnit` values that specify a corrective
pose.
returns:
- type: Tuple
summary: |
Array of bone IDs and corresponding array of bone
`Datatype.CFrame|CFrames`.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacsCorrectivePoses
summary: |
Returns all FACS corrective poses that are in use.
description: |
Returns all FACS corrective poses that are in use. Each corrective pose is
specified by 2 or 3 `Enum.FacsActionUnit` values.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
Array of corrective poses. Each corrective pose is specified by a
small array of 2 or 3 `Enum.FacsActionUnit` values.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacsPose
summary: |
Returns bone IDs and bone `Datatype.CFrame|CFrames` for all bones in a
specific FACS action unit.
description: |
Returns bone IDs and bone `Datatype.CFrame|CFrames` for all bones in a
specific FACS action unit. Each bone `Datatype.CFrame` transforms the bone
from the initial bone `Datatype.CFrame` in the bind pose of the mesh to
the combined bone `Datatype.CFrame` for this pose. All
`Datatype.CFrame|CFrames` are in the mesh's local space.
code_samples: []
parameters:
- name: action
type: FacsActionUnit
default:
summary: |
FACS action unit for which to get the pose.
returns:
- type: Tuple
summary: |
Array of bone IDs and corresponding array of bone `Datatype.CFrame`.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetFacsPoses
summary: |
Returns all FACS action units that have poses defined.
description: |
Returns all FACS action units that have poses defined.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
Array of `Enum.FacsActionUnit`, one for each FACS action unit that has
a pose defined.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetNormal
summary: |
Returns the normal vector for the given normal ID.
description: |
Returns the normal vector for the given normal ID.
code_samples: []
parameters:
- name: normalId
type: int64
default:
summary: |
Normal ID for which to get the normal vector.
returns:
- type: Vector3?
summary: |
Normal vector at the requested normal ID.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetNormals
summary: |
Returns all normals of the mesh.
description: |
Returns all normals of the mesh as a list of stable normal IDs.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
List of stable normal IDs.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetPosition
summary: |
Gets the position of a vertex.
description: |
Gets the position of a vertex in the mesh's local object space.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID for which to get the position.
returns:
- type: Vector3
summary: |
Position of a vertex in the mesh's local object space.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetSize
summary: ''
description: ''
code_samples: []
parameters: []
returns:
- type: Vector3
summary: |
Size of the `EditableMesh`.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetUV
summary: |
Returns UV coordinates at the given UV ID.
description: |
Returns UV coordinates at the given UV ID.
code_samples: []
parameters:
- name: uvId
type: int64
default:
summary: |
UV ID for which to get the UV coordinate.
returns:
- type: Vector2?
summary: |
UV coordinates at the requested UV ID.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetUVs
summary: |
Returns all UVs of the mesh.
description: |
Returns all UVs of the mesh as a list of stable UV IDs.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
List of stable UV IDs.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexBones
summary: |
Returns all bone IDs that are associated with the vertex for skinning.
description: |
Returns all bone IDs that are associated with the vertex for skinning.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Vertex ID for which to get the associated bones.
returns:
- type: Array
summary: |
Bone IDs associated with the vertex for skinning.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexBoneWeights
summary: |
Returns skinning blend weights for each bone that is associated with the
vertex.
description: |
Returns skinning blend weights for each bone that is associated with the
vertex.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Vertex ID for which to get the associated bone weights.
returns:
- type: Array
summary: |
Skinning blend weights for each bone that is associated with the
vertex.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexColors
summary: |
Returns the color IDs of the faces attached to the given vertex.
description: |
Returns the color IDs of the faces attached to the given vertex.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID to find color IDs.
returns:
- type: Array
summary: |
Array of color IDs of faces attached to the given vertex.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexFaceColor
summary: |
Returns the color ID of a vertex/face pair.
description: |
Returns the color ID of a vertex/face pair.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID.
- name: faceId
type: int64
default:
summary: |
Stable face ID.
returns:
- type: int64
summary: |
Stable color ID of the vertex/face pair.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexFaceNormal
summary: |
Returns the normal ID of a vertex/face pair.
description: |
Returns the normal ID of a vertex/face pair.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID.
- name: faceId
type: int64
default:
summary: |
Stable face ID.
returns:
- type: int64
summary: |
Stable normal ID of the vertex/face pair.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexFaces
summary: |
Returns the face IDs of the faces attached to the given vertex.
description: |
Returns the face IDs of the faces attached to the given vertex.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID to find faces for.
returns:
- type: Array
summary: |
Array of face IDs attached to the given vertex.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexFaceUV
summary: |
Returns the UV ID of a vertex/face pair.
description: |
Returns the UV ID of a vertex/face pair.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID.
- name: faceId
type: int64
default:
summary: |
Stable face ID.
returns:
- type: int64
summary: |
Stable UV ID of the vertex/face pair.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexNormals
summary: |
Returns the normal IDs of the faces attached to the given vertex.
description: |
Returns the normal IDs of the faces attached to the given vertex.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID to find normal IDs.
returns:
- type: Array
summary: |
Array of normal IDs of faces attached to the given vertex.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertexUVs
summary: |
Returns the UV IDs of the faces attached to the given vertex.
description: |
Returns the UV IDs of the faces attached to the given vertex.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID to find UV IDs.
returns:
- type: Array
summary: |
Array of UV IDs of faces attached to the given vertex.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVertices
summary: |
Returns all vertices as a list of stable vertex IDs.
description: |
Returns all vertices as a list of stable vertex IDs.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
List of stable vertex IDs.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVerticesWithAttribute
summary: |
Returns a list of vertices that use a given attribute ID.
description: |
Returns a list of vertices that use a given face ID, normal ID, UV ID, or
color ID.
code_samples: []
parameters:
- name: id
type: int64
default:
summary: |
Attribute ID for which to find vertices that use it.
returns:
- type: Array
summary: |
List of vertex IDs which use the given attribute ID.
tags:
- Deprecated
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVerticesWithColor
summary: |
Returns an array of vertex IDs that use the given color ID.
description: |
Returns an array of vertex IDs that use the given color ID. Use together
with `Class.EditableMesh:GetFacesWithColor()|GetFacesWithColor()` to
obtain all face/vertex pairs.
code_samples: []
parameters:
- name: colorId
type: int64
default:
summary: |
Color ID to find faces for.
returns:
- type: Array
summary: |
List of face IDs that use the provided color ID.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVerticesWithNormal
summary: |
Returns an array of vertex IDs that use the given normal ID.
description: |
Returns an array of vertex IDs that use the given normal ID. Use together
with `Class.EditableMesh:GetFacesWithNormal()|GetFacesWithNormal()` to
obtain all face/vertex pairs.
code_samples: []
parameters:
- name: normalId
type: int64
default:
summary: |
Normal ID to find vertices for.
returns:
- type: Array
summary: |
List of vertex IDs that use the provided normal ID.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:GetVerticesWithUV
summary: |
Returns an array of vertex IDs that use the given UV ID.
description: |
Returns an array of vertex IDs that use the given UV ID. Use together with
`Class.EditableMesh:GetFacesWithUV()|GetFacesWithUV()` to obtain all
face/vertex pairs.
code_samples: []
parameters:
- name: uvId
type: int64
default:
summary: |
UV ID to find vertices for.
returns:
- type: Array
summary: |
List of vertex IDs that use the provided UV ID.
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:IdDebugString
summary: |
Returns a string describing a stable ID, useful for debugging purposes.
description: |
Returns a string describing a stable ID, useful for debugging purposes,
like `f17` or `v12`, containing the type, ID number, and version.
code_samples: []
parameters:
- name: id
type: int64
default:
summary: |
ID for which to return a debugging information string.
returns:
- type: string
summary: |
String that describes the ID in human-readable format.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:MergeVertices
summary: |
Merges vertices that touch together.
description: |
Merges vertices that touch together, to use a single vertex ID but keep
the other original attribute IDs.
code_samples: []
parameters:
- name: mergeTolerance
type: float
default:
summary: |
The distance at which the vertices are considered to touch each other.
returns:
- type: Map
summary: |
A mapping of old vertex ID to new vertex ID for vertices that have
been merged.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:RaycastLocal
summary: ''
description: |
Casts a ray and returns a point of intersection, face ID, and barycentric
coordinates. The inputs and outputs of this method are in the mesh's local
object space.
A **barycentric coordinate** is a way of specifying a point within a face
as a weighted combination of the 3 vertices of the face. This is useful as
a general way of blending vertex attributes. See this method's code sample
as an illustration.
code_samples:
- EditableMesh-RaycastLocal
parameters:
- name: origin
type: Vector3
default:
summary: |
Origin of the ray in the mesh's local object space.
- name: direction
type: Vector3
default:
summary: |
Direction of the ray.
returns:
- type: Tuple
summary: |
Tuple of the point of intersection, face ID, and barycentric
coordinates.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:RemoveBone
summary: |
Removes a bone using its stable bone ID.
description: |
Removes a bone using its stable bone ID.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: ''
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:RemoveFace
summary: |
Removes a face using its stable face ID.
description: |
Removes a face using its stable face ID.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: ''
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:RemoveUnused
summary: |
Removes all unused vertices, normals, UVs, and colors, and returns the
removed IDs.
description: |
Removes all vertices, normals, UVs, and colors which are not used in any
face, and returns the removed IDs.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
All of the removed stable IDs.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:ResetNormal
summary: |
Reset this normal ID to be automatically calculated.
description: |
Reset this normal ID to be automatically calculated based on the shape of
the mesh, instead of manually set.
code_samples: []
parameters:
- name: normalId
type: int64
default:
summary: |
Stable normal ID to reset.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetBoneCFrame
summary: |
Set the initial `Datatype.CFrame` for a bone in the mesh's bind pose.
description: |
Set the initial `Datatype.CFrame` for a bone in the mesh's bind pose, in
the mesh's local space.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to set the initial `Datatype.CFrame`.
- name: cframe
type: CFrame
default:
summary: |
Initial `Datatype.CFrame` for the bone in the mesh's bind pose, in the
mesh's local space.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetBoneIsVirtual
summary: |
Set whether a bone is virtual.
description: |
Set whether a bone is virtual. Virtual bones can only be bound to a
`Class.FaceControls` instance.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to set whether the bone is virtual.
- name: virtual
type: boolean
default:
summary: |
Whether the bone should be virtual.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetBoneName
summary: |
Sets the name for a bone.
description: |
Sets the name for a bone. Bone names can be 100 characters long and must
be unique in the mesh.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to set the name.
- name: name
type: string
default:
summary: |
Bone name to set.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetBoneParent
summary: |
Set a parent for a bone.
description: |
Set a parent for a bone.
code_samples: []
parameters:
- name: boneId
type: int64
default:
summary: |
Bone ID for which to set the parent.
- name: parentBoneId
type: int64
default:
summary: |
Parent bone ID.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetColor
summary: |
Sets the color for a color ID.
description: |
Sets the color for a color ID.
code_samples: []
parameters:
- name: colorId
type: int64
default:
summary: |
Stable color ID for which to set the color.
- name: color
type: Color3
default:
summary: |
Color to set.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetColorAlpha
summary: |
Sets the color alpha (transparency) for a color ID.
description: |
Sets the color alpha (transparency) for a color ID.
code_samples: []
parameters:
- name: colorId
type: int64
default:
summary: |
Stable color ID for which to set the color alpha.
- name: alpha
type: float
default:
summary: |
Alpha to set.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetFaceColors
summary: |
Sets the face's vertex colors to new color IDs.
description: |
Sets the face's vertex colors to new color IDs.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: |
Face ID for which to update the vertex colors.
- name: ids
type: Array
default:
summary: |
List of new stable color IDs to use for the given face's vertices.
returns:
- type: ()
summary: ''
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetFaceNormals
summary: |
Sets the face's vertex normals to new normal IDs.
description: |
Sets the face's vertex normals to new normal IDs.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: |
Face ID for which to update the vertex normals.
- name: ids
type: Array
default:
summary: |
List of new stable normal IDs to use for the given face's vertices.
returns:
- type: ()
summary: ''
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetFaceUVs
summary: |
Sets the face's vertex UVs to new UV IDs.
description: |
Sets the face's vertex UVs to new UV IDs.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: |
Face ID for which to update the vertex UVs.
- name: ids
type: Array
default:
summary: |
List of new stable UV IDs to use for the given face's vertices.
returns:
- type: ()
summary: ''
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetFaceVertices
summary: |
Sets the face's vertices to new vertex IDs.
description: |
Sets the face's vertices to new vertex IDs.
code_samples: []
parameters:
- name: faceId
type: int64
default:
summary: |
Face ID for which to update the vertices.
- name: ids
type: Array
default:
summary: |
List of new stable vertex IDs to use for the given face.
returns:
- type: ()
summary: ''
tags:
- CustomLuaState
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetFacsBonePose
summary: |
Set `Datatype.CFrame` for an individual bone in a specific FACS action
unit.
description: |
Set `Datatype.CFrame` for an individual bone in a specific FACS action
unit.
code_samples: []
parameters:
- name: action
type: FacsActionUnit
default:
summary: |
FACS action unit for which to set the pose.
- name: boneId
type: int64
default:
summary: |
Bone to set a `Datatype.CFrame` for this pose.
- name: cframe
type: CFrame
default:
summary: |
`Datatype.CFrame` which transforms the bone from the initial bone
`Datatype.CFrame` in the bind pose of the mesh to the combined bone
`Datatype.CFrame` for this pose. All `Datatype.CFrame|CFrames` are in
the mesh's local space.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetFacsCorrectivePose
summary: |
Set pose for all bones in a specific FACS corrective pose.
description: |
Set pose for all bones in a specific FACS corrective pose.
code_samples: []
parameters:
- name: actions
type: Array
default:
summary: |
Array or 2 or 3 `Enum.FacsActionUnit` values to apply as a corrective
pose.
- name: boneIds
type: Array
default:
summary: |
Bones to set a `Datatype.CFrame` for this pose.
- name: cframes
type: Array
default:
summary: |
`Datatype.CFrame` transforms for the bones in this corrective pose.
Each bone `Datatype.CFrame` transforms the bone from the initial bone
`Datatype.CFrame` in the bind pose of the mesh to the combined bone
`Datatype.CFrame` for this pose. All `Datatype.CFrame|CFrames` are in
the mesh's local space.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetFacsPose
summary: |
Set pose for all bones in a specific FACS action unit.
description: |
Set pose for all bones in a specific FACS action unit.
code_samples: []
parameters:
- name: action
type: FacsActionUnit
default:
summary: |
FACS action unit to set the pose for.
- name: boneIds
type: Array
default:
summary: |
Bones for which to set a `Datatype.CFrame` for this pose.
- name: cframes
type: Array
default:
summary: |
`Datatype.CFrame` transforms for the bones in this pose.
Each bone `Datatype.CFrame` transforms the bone from the initial bone
`Datatype.CFrame` in the bind pose of the mesh to the combined bone
`Datatype.CFrame` for this pose. All `Datatype.CFrame|CFrames` are in
the mesh's local space.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetNormal
summary: |
Set the normal for a normal ID.
description: |
Set the normal for a normal ID. This will change the normal value for
every face vertex which is using the normal ID.
code_samples: []
parameters:
- name: normalId
type: int64
default:
summary: |
Stable normal ID for which to set the normal vector.
- name: normal
type: Vector3
default:
summary: |
Normal vector to set.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetPosition
summary: |
Sets a vertex position in the mesh's local object space.
description: |
Sets a vertex position in the mesh's local object space.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID of the vertex to position.
- name: p
type: Vector3
default:
summary: |
Position in the mesh's local object space.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetUV
summary: |
Sets UV coordinates for a UV ID.
description: |
Sets UV coordinates for a UV ID.
code_samples: []
parameters:
- name: uvId
type: int64
default:
summary: |
UV ID for which to set the UV coordinates.
- name: uv
type: Vector2
default:
summary: |
UV coordinates.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetVertexBones
summary: |
Assign a list of bones with the vertex for skinning.
description: |
Assign a list of bones with the vertex for skinning.
Corresponds with the skinning blend weights used in
`Class.EditableMesh:SetVertexBoneWeights()|SetVertexBoneWeights()`. In
other words,
`Class.EditableMesh:GetVertexBoneWeights()|GetVertexBoneWeights(vertexId)[i]`
is the weight on this vertex for
`Class.EditableMesh:GetVertexBones()|GetVertexBones(vertexId)[i]`.
This method should be called before calling
`Class.EditableMesh:SetVertexBoneWeights()|SetVertexBoneWeights()`.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Vertex ID to set vertex skinning bones.
- name: boneIDs
type: Array
default:
summary: |
Bone IDs to use with this vertex for skinning.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetVertexBoneWeights
summary: |
Sets skinning blend weights for each bone associated with the vertex.
description: |
Sets skinning blend weights for each bone associated with the vertex.
Corresponds with the bone IDs used in
`Class.EditableMesh:SetVertexBones()|SetVertexBones()`. In other words,
`Class.EditableMesh:GetVertexBoneWeights()|GetVertexBoneWeights(vertexId)[i]`
is the weight on this vertex for
`Class.EditableMesh:GetVertexBones()|GetVertexBones(vertexId)[i]`.
This method should be called after calling
`Class.EditableMesh:SetVertexBones()|SetVertexBones()`.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Vertex ID on which to set skinning blend weights.
- name: boneWeights
type: Array
default:
summary: |
Skinning blend weights to set on the vertex.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetVertexFaceColor
summary: |
Sets the color ID of a vertex/face pair.
description: |
Sets the color ID of a vertex/face pair.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID.
- name: faceId
type: int64
default:
summary: |
Stable face ID.
- name: colorId
type: int64
default:
summary: |
Stable color ID to set for the vertex/face pair.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetVertexFaceNormal
summary: |
Sets the normal ID of a vertex/face pair.
description: |
Sets the normal ID of a vertex/face pair.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID.
- name: faceId
type: int64
default:
summary: |
Stable face ID.
- name: normalId
type: int64
default:
summary: |
Stable normal ID to set for the vertex/face pair.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:SetVertexFaceUV
summary: |
Sets the UV ID of a vertex/face pair.
description: |
Sets the UV ID of a vertex/face pair.
code_samples: []
parameters:
- name: vertexId
type: int64
default:
summary: |
Stable vertex ID.
- name: faceId
type: int64
default:
summary: |
Stable face ID.
- name: uvId
type: int64
default:
summary: |
Stable UV ID to set for the vertex/face pair.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
- name: EditableMesh:Triangulate
summary: |
Splits all faces on the mesh to be triangles.
description: |
Splits all faces on the mesh to be triangles. Currently this does nothing
since only triangles can be created, but if your code relies on triangles,
it's recommended that you call this method after calling
`Class.AssetService:CreateEditableMeshAsync()`.
code_samples: []
parameters: []
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- DynamicGeneration
events: []
callbacks: []