editor.meshpaint

Eight methods covering UE's mesh-paint vertex color pipeline -- capability inspection, instance-to-source propagation, per-LOD color cleanup, texture-to-vertex import and the reverse, and paint-color swap. AI agents reach through this namespace because no BlueprintCallable API exists for mesh painting; every method is a direct call into UMeshPaintModeSubsystem.

← API Reference

Requires: the MeshPainting plugin (enabled by default, module MeshPaintEditorMode). If not enabled, all methods return -32001 with the message "MeshPainting plugin not enabled. Enable in Edit > Plugins."

Method summary

Method Mutating Tier Purpose
getInfonoFreeComponent counts + per-actor capability flags.
propagateVertexColorsyesFreePush instance vertex colors back to the source mesh asset.
removePerLODColorsyesFreeClear per-LOD vertex color overrides.
fixTextureColorsyesFreeResolve color-space issues on component textures.
importVertexColorsFromTextureyesFreeSample a texture into vertex colors.
importMeshPaintTextureFromVertexColorsyesFreeConvert vertex colors into a mesh paint texture.
importVertexColorsFromMeshPaintTextureyesFreeConvert a mesh paint texture back into vertex colors.
swapColorsyesFreeSwap the foreground and background paint colors.

editor.meshpaint.getInfo

Query vertex-color capabilities for an actor's mesh components. The capability flags answer which operations will succeed before invoking them.

Parameters:

NameTypeRequiredDescription
namestringYesActor name or label.

Returns:

FieldTypeDescription
actorstringResolved actor name.
staticMeshComponentsnumberCount of StaticMeshComponents on the actor.
meshComponentsnumberCount of other mesh-painting-eligible components.
canCopyVertexColorsboolWhether the subsystem can sample vertex colors from this actor.
canPropagateVertexColorsboolWhether instance-to-source propagation is valid.
canFixTextureColorsboolWhether any component needs texture color-space correction.

Example Request:

{
  "jsonrpc": "2.0", "id": 1,
  "method": "editor.meshpaint.getInfo",
  "params": { "name": "MyStaticMeshActor" }
}

Example Response:

{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "actor":                     "MyStaticMeshActor",
    "staticMeshComponents":      1,
    "meshComponents":            1,
    "canCopyVertexColors":       false,
    "canPropagateVertexColors":  true,
    "canFixTextureColors":       false
  }
}

editor.meshpaint.propagateVertexColors

Propagate instance vertex colors from the actor's mesh components back to the source static mesh asset. The source asset's on-disk vertex color buffer is replaced; every other instance of the same source mesh inherits the new colors on reload.

Parameters:

NameTypeRequiredDescription
namestringYesActor name or label.

Returns:

FieldTypeDescription
statusstringok on success.

Example Request:

{
  "jsonrpc": "2.0", "id": 2,
  "method": "editor.meshpaint.propagateVertexColors",
  "params": { "name": "MyStaticMeshActor" }
}

Example Response:

{ "jsonrpc": "2.0", "id": 2, "result": { "status": "ok" } }

editor.meshpaint.removePerLODColors

Remove per-LOD vertex color overrides from the actor's mesh components. Restores the single shared color stream across all LODs.

Parameters:

NameTypeRequiredDescription
namestringYesActor name or label.

Returns: { status: "ok" }.

Example Request:

{ "jsonrpc": "2.0", "id": 3, "method": "editor.meshpaint.removePerLODColors", "params": { "name": "MyStaticMeshActor" } }

Example Response:

{ "jsonrpc": "2.0", "id": 3, "result": { "status": "ok" } }

editor.meshpaint.fixTextureColors

Resolve color-space issues on the actor's mesh paint textures. Runs the subsystem's fix-up pass on every component that reports canFixTextureColors: true.

Parameters:

NameTypeRequiredDescription
namestringYesActor name or label.

Returns: { status: "ok" }.

Example Request:

{ "jsonrpc": "2.0", "id": 4, "method": "editor.meshpaint.fixTextureColors", "params": { "name": "MyStaticMeshActor" } }

Example Response:

{ "jsonrpc": "2.0", "id": 4, "result": { "status": "ok" } }

editor.meshpaint.importVertexColorsFromTexture

Sample the actor's mesh-paint texture and write it into the components' vertex color buffer. Useful for baking texture-painted results back into geometry for shader paths that read vertex colors directly.

Parameters:

NameTypeRequiredDescription
namestringYesActor name or label.

Returns:

FieldTypeDescription
componentsImportednumberCount of components the subsystem updated.
statusstringok on success.

Example Request:

{ "jsonrpc": "2.0", "id": 5, "method": "editor.meshpaint.importVertexColorsFromTexture", "params": { "name": "MyStaticMeshActor" } }

Example Response:

{ "jsonrpc": "2.0", "id": 5, "result": { "componentsImported": 1, "status": "ok" } }

editor.meshpaint.importMeshPaintTextureFromVertexColors

Convert the components' vertex color data into a mesh paint texture. Inverse of importVertexColorsFromTexture. Useful when a shader path prefers the texture form.

Parameters:

NameTypeRequiredDescription
namestringYesActor name or label.

Returns:

FieldTypeDescription
componentsConvertednumberCount of components converted.
statusstringok on success.

Example Request:

{ "jsonrpc": "2.0", "id": 6, "method": "editor.meshpaint.importMeshPaintTextureFromVertexColors", "params": { "name": "MyStaticMeshActor" } }

Example Response:

{ "jsonrpc": "2.0", "id": 6, "result": { "componentsConverted": 1, "status": "ok" } }

editor.meshpaint.importVertexColorsFromMeshPaintTexture

Convert a mesh paint texture back into vertex colors. Round-trip complement to importMeshPaintTextureFromVertexColors.

Parameters:

NameTypeRequiredDescription
namestringYesActor name or label.

Returns:

FieldTypeDescription
componentsConvertednumberCount of components converted.
statusstringok on success.

Example Request:

{ "jsonrpc": "2.0", "id": 7, "method": "editor.meshpaint.importVertexColorsFromMeshPaintTexture", "params": { "name": "MyStaticMeshActor" } }

Example Response:

{ "jsonrpc": "2.0", "id": 7, "result": { "componentsConverted": 1, "status": "ok" } }

editor.meshpaint.swapColors

Swap the subsystem's foreground and background paint colors. Equivalent to the X shortcut in the Mesh Paint mode toolbar.

No parameters.

Returns: { status: "ok" }.

Example Request:

{ "jsonrpc": "2.0", "id": 8, "method": "editor.meshpaint.swapColors" }

Example Response:

{ "jsonrpc": "2.0", "id": 8, "result": { "status": "ok" } }

Related