You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fix fill paint tool to keep in sync the staticmesh component painted vertices cache buffer.
#jira UE-72315 #rb bob.tellez #ROBOMERGE-OWNER: lina.halper #ROBOMERGE-AUTHOR: alexis.matte #ROBOMERGE-SOURCE: CL 5798957 via CL 5798962 via CL 5798963 via CL 5799892 via CL 5799967 #ROBOMERGE-BOT: ANIM (Main -> Dev-Anim) [CL 5802765 by alexis matte in Dev-Anim branch]
This commit is contained in:
@@ -795,6 +795,11 @@ void MeshPaintHelpers::SetInstanceColorDataForLOD(UStaticMeshComponent* MeshComp
|
||||
// Initialize vertex buffer from given colors
|
||||
ComponentLodInfo.OverrideVertexColors = new FColorVertexBuffer;
|
||||
ComponentLodInfo.OverrideVertexColors->InitFromColorArray(Colors);
|
||||
|
||||
//Update the cache painted vertices
|
||||
ComponentLodInfo.PaintedVertices.Empty();
|
||||
MeshComponent->CachePaintedDataIfNecessary();
|
||||
|
||||
BeginInitResource(ComponentLodInfo.OverrideVertexColors);
|
||||
}
|
||||
}
|
||||
@@ -851,6 +856,10 @@ void MeshPaintHelpers::SetInstanceColorDataForLOD(UStaticMeshComponent* MeshComp
|
||||
}
|
||||
}
|
||||
|
||||
//Update the cache painted vertices
|
||||
ComponentLodInfo.PaintedVertices.Empty();
|
||||
MeshComponent->CachePaintedDataIfNecessary();
|
||||
|
||||
BeginInitResource(ComponentLodInfo.OverrideVertexColors);
|
||||
}
|
||||
}
|
||||
@@ -1508,6 +1517,10 @@ void MeshPaintHelpers::ImportVertexColorsToStaticMeshComponent(UStaticMeshCompon
|
||||
InstanceMeshLODInfo.OverrideVertexColors->VertexColor(VertexIndex) = PickVertexColorFromTextureData(MipData, UV, Texture, ColorMask);
|
||||
}
|
||||
|
||||
//Update the cache painted vertices
|
||||
InstanceMeshLODInfo.PaintedVertices.Empty();
|
||||
StaticMeshComponent->CachePaintedDataIfNecessary();
|
||||
|
||||
BeginInitResource(InstanceMeshLODInfo.OverrideVertexColors);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user