From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:USD" |
|---|
| claim | "A text USD file starts with the cookie "#usda", normally "#usda 1.0" (the version after it can be rewritten in place, e.g. "#usda 1.1"). OpenUSD's SdfUsdaFileFormat::CanRead only checks that the first bytes equal the file cookie "#usda" (the file format id with a '#' prefix), so any version string passes that test. The legacy header "#sdf 1.4.32" is accepted only when reading a layer from a string (ReadFromString rewrites it to "#usda 1.0" and warns by default), not by the file reader." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "usda files" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "23 75 73 64 61" |
|---|
| offset | "0x0" |
|---|
| meaning | "usda text header cookie '#usda' (usually followed by ' 1.0' and a newline; the version part is rewritable in place)" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "_CanReadImpl reads cookie-length bytes and returns TfStringStartsWith(buf, cookie) with cookie = GetFileCookie(); tokens modernCookie '#usda 1.0' and legacyCookie '#sdf 1.4.32' (legacy handled in ReadFromString only); header comment about overwriting the version" |
|---|
| repo | "https://github.com/PixarAnimationStudios/OpenUSD" |
|---|
| commit | "bc32a655a41770f8ded78ef43789b044be1ba5ea" |
|---|
| path | "pxr/usd/sdf/usdaFileFormat.cpp" |
|---|
| lines | "40-45, 62-63, 78-90, 226-260, 582-602" |
|---|
|
| type | "source" |
|---|
| detail | "SdfFileFormat constructor sets _cookie("#" + formatId.GetString())" |
|---|
| repo | "https://github.com/PixarAnimationStudios/OpenUSD" |
|---|
| commit | "bc32a655a41770f8ded78ef43789b044be1ba5ea" |
|---|
| path | "pxr/usd/sdf/fileFormat.cpp" |
|---|
| lines | "78, 180-182" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "usda cookie" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T07:38:17.292Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T08:26:46.434Z" |
|---|
| summary | "usdaFileFormat.cpp line 62-63 defines two cookies: legacyCookie "#sdf 1.4.32" and modernCookie "#usda 1.0"; the header comment (81-120) says the version part can be overwritten after writing (e.g…" |
|---|
| changed | |
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:42:12.625Z" |
|---|
| summary | "File detection is a prefix test on '#usda' only (cookie = '#' + format id in fileFormat.cpp:78, CanRead via _CanReadImpl StartsWith); '#sdf 1.4.32' is accepted only by ReadFromString for in-memory…" |
|---|
| changed | | "claim" |
| "data" |
| "evidence replaced" |
|
|---|
|
|
|---|