Autodesk / Autodesk/maya-usd

Import fails silently when not specifying type on crate version 0.8.0

Open
#3,468 2 comments 0 reactions 1 assignee Claimed by @santosg87 View on GitHub
bug
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 9h
Merged PRs (30d)
17

Description

When importing a crate file with a version specifier greater than 0.7.0, the contents of the file are not imported and no error reported or exception raised. (Tested in maya 2024.1 / maya-usd 25.0 and 2022.5 / maya-usd 25.0)

**Steps to reproduce**
1. Unzip the included example somewhere on the test host
2. Launch Maya, ensure maya-usd plugin is loaded
3. Execute the python `cmds.file("/path/to/example/crate_0_8_0.usdc", i=True)` (replacing the path with the location of the unzipped example files)
4. Note that the contents of the scene are unchanged.

**Expected behavior**
1. Execute the python `cmds.file("/path/to/example/crate_0_7_0.usdc", i=True)` (replacing the path with the location of the unzipped example files)
2. Note that the `/World/Cube` prim is imported, and you can see the cube if you frame it in the viewport.
3. Note that the two crate files tested with above differ only at byte 10 (the minor version byte in the header), and are otherwise identical:

```
>fc.exe /b crate_0_7_0.usdc crate_0_8_0.usdc
Comparing files crate_0_7_0.usdc and crate_0_8_0.usdc
00000009: 07 08
```

crate_0_8_0.usdc opens as expected in usdview:
![image](https://github.com/Autodesk/maya-usd/assets/5922577/908eb61e-3084-42a8-8b28-a43657215e5d)

Note that crate 0.8.0 was [introduced in USD 19.03](https://github.com/PixarAnimationStudios/OpenUSD/blob/v19.03/pxr/usd/lib/usd/crateFile.cpp#L292-L294).

**Attachments**
[crate_examples.zip](https://github.com/Autodesk/maya-usd/files/13370645/crate_examples.zip)

**Specs:**
All repros on Windows 10 19045.3570
Repro'd in:
- Maya 2022 / maya-usd 25.0 (4b49448)
- Maya 2024 / maya-usd 25.0 (4b49448)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.