Set atomic for a certain color:
Set Geometry Signs, Flag & (~ RPGeometrytexTured) | RPGeometryModulateMareColor. Then set each METRIAL color as this color.
Pay attention to Geometry shared.
Give geometry to set color and recovery methods
Set color RpGeometrysetFlags (PGEOMEGRY, RPGEOMETRYGETFLAGS (PGEOMEGRY) & (~ RPGEMETRYTEXTED) | RPGEOMETRYMODULATEMATERIALCOLOR);
For (int i = rpGeometrygetNummaterials (PGEOMEGRY); i-> 0;)
{
PMATERIAL = RPGeometrygetMaterial (PGEOMEGRY, I);
/ / Save Material color
RPMaterialsetColor (PMATERIAL, PNEWCOLOR);
}
Recovery Colors RpGeometrysetFlags (PGEOMEGRY, RPGEOMETRYGETFLAGS (PGEOMEGRY) | RpGeometryTextured & (~ RpGeometryModulateMarectOLOR);
Then recover the original color stored during the color process.
However, because Geometry is shared, it is necessary to copy one copy, otherwise it will affect other roles.