blender/tests/files/usd/usd_mesh_topology_change.usda
Jesse Yurkovich 37f8616bd5 Fix #140225: Always ensure mesh topology is up to date during USD import
It is possible for a mesh to change topology across frames but still be
detected as not needing a topology update.

Until we can make a finer-grained check against the before and after
topology, unconditionally ensure it's updated for now.

Adds a new test that checks a few frames of changing topology that is
similar, but not the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/140253
2025-06-12 19:32:43 +02:00

64 lines
3.1 KiB
Text

#usda 1.0
(
defaultPrim = "root"
doc = "Blender v4.5.0 Beta"
endTimeCode = 4
metersPerUnit = 1
startTimeCode = 1
timeCodesPerSecond = 24
upAxis = "Z"
)
def Xform "root" (
customData = {
dictionary Blender = {
bool generated = 1
}
}
)
{
def Xform "TopoTest"
{
def Mesh "TopoTest" (
active = true
)
{
float3[] extent = [(-0.5, -0.5, 0), (3.5, 0.5, 0)]
int[] faceVertexCounts = [4, 4, 4]
int[] faceVertexCounts.timeSamples = {
1: [4, 4, 4],
2: [3, 4, 5],
3: [3, 3, 6],
4: [4, 4, 4],
}
int[] faceVertexIndices = [0, 1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10]
int[] faceVertexIndices.timeSamples = {
1: [0, 1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10],
2: [0, 1, 2, 3, 4, 11, 5, 7, 8, 10, 6, 9],
3: [0, 1, 2, 4, 5, 6, 8, 3, 9, 11, 7, 10],
4: [0, 1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10],
}
normal3f[] normals = [(0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1), (0, 0, 1)] (
interpolation = "faceVarying"
)
point3f[] points = [(-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (0.5, 0.5, 0), (1, -0.5, 0), (2, -0.5, 0), (1, 0.5, 0), (2, 0.5, 0), (2.5, -0.5, 0), (3.5, -0.5, 0), (2.5, 0.5, 0), (3.5, 0.5, 0)]
point3f[] points.timeSamples = {
1: [(-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (0.5, 0.5, 0), (1, -0.5, 0), (2, -0.5, 0), (1, 0.5, 0), (2, 0.5, 0), (2.5, -0.5, 0), (3.5, -0.5, 0), (2.5, 0.5, 0), (3.5, 0.5, 0)],
2: [(-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (1, -0.5, 0), (2, -0.5, 0), (1, 0.5, 0), (3, 0.5, 0), (2.5, -0.5, 0), (3.5, -0.5, 0), (2.5, 0.5, 0), (3.5, 0.5, 0), (2, 0.5, 0)],
3: [(-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (3, -0.5, 0), (1, -0.5, 0), (2, -0.5, 0), (1, 0.5, 0), (3, 0.5, 0), (2.5, -0.5, 0), (3.5, -0.5, 0), (2.5, 0.5, 0), (3.5, 0.5, 0)],
4: [(-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (0.5, 0.5, 0), (1, -0.5, 0), (2, -0.5, 0), (1, 0.5, 0), (2, 0.5, 0), (2.5, -0.5, 0), (3.5, -0.5, 0), (2.5, 0.5, 0), (3.5, 0.5, 0)],
}
texCoord2f[] primvars:st = [(0, 0), (1, 0), (1, 1), (0, 1), (0, 0), (1, 0), (1, 1), (0, 1), (0, 0), (1, 0), (1, 1), (0, 1)] (
interpolation = "faceVarying"
)
texCoord2f[] primvars:st.timeSamples = {
1: [(0, 0), (1, 0), (1, 1), (0, 1), (0, 0), (1, 0), (1, 1), (0, 1), (0, 0), (1, 0), (1, 1), (0, 1)],
2: [(0, 0), (1, 0), (0, 1), (0, 0), (1, 0), (0.5, 0.5), (0, 1), (0, 0), (1, 0), (1, 1), (0.5, 1), (0, 1)],
3: [(0, 0), (1, 0), (0, 1), (0, 0), (1, 0), (0, 1), (0, 0), (0.5, 0), (1, 0), (1, 1), (0.5, 1), (0, 1)],
4: [(0, 0), (1, 0), (1, 1), (0, 1), (0, 0), (1, 0), (1, 1), (0, 1), (0, 0), (1, 0), (1, 1), (0, 1)],
}
uniform token subdivisionScheme = "none"
}
}
}