setPaintColor
R2026bDescription
setPaintColor(
changes the color of the specified 3D mesh node,color)node to the specified
color color. If the specified mesh node has children, this function
also sets the child nodes to the same color. To change the color of 3D meshes in
RoadRunner Viewer, the 3D mesh you specify must have a material with a name that
includes the string "paint". For meshes that reference a separate
material file, such as an .rrmtl file, the file name must be
paint. For information on how to assign 3D mesh materials, see
Assign Materials (RoadRunner Scenario).
If the mesh does not have a compatible material, setPaintColor
does nothing.
Examples
Input Arguments
Limitations
The
setPaintColorfunction does not support specifying color for 3D meshes that do not have a material with a name that contains the string"paint". For meshes that reference a separate material file, such as an.rrmtlfile, the file name must bepaint.
Version History
Introduced in R2026b
See Also
| NoderoadrunnerViewer | | addMeshNode | addPrimitivedrawnow
Topics
- Get Started with RoadRunner Viewer (RoadRunner Scenario)
- Import Custom Vehicle Meshes (RoadRunner Scenario)