Autodesk / Autodesk/maya-usd

MayaUsdDuplicate command error

Open
#2,705 1 comment 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

**Describe the bug**
I am attempting to use the cmds.mayaUsdDuplicate() command on a prim and am getting a runtime error when running it under a non-root namespace.

**Steps to reproduce**
1. Create an empty MayaUsdProxy node in the scene root (Create->USD->Stage with New Layer)
2. Expand the proxy to its shape and add an xform (right-click on stageShape1->Add New Prim->Xform
3. Create and set a new namespace using the following code:
```
cmds.namespace(add="foo")
cmds.namespace(setNamespace="foo")
```
4. Run the following command to duplicate the Xform into maya data at the scene root:
```
cmds.mayaUsdDuplicate(
"|stage1|stageShape1,/Xform1",
"|world",
)
```

**Expected behavior**
The Xform should get translated into maya data at the scene root with no errors and is selected after the command executes.

**Specs (if applicable):**
- CentOS 7.9.2009
- Maya 2023.2
- Maya USD commit: 0.19
- Pixar USD commit: 22.05

**Additional context**
The command works fine when duplicating into the root namespace. It's only when working within another namespace that it errors out. Also, the duplication does appear to happen, but I'm not sure I can trust it's done its job fully since it errors out at the end, and the node is not selected. Perhaps I'm not using the command properly?

![image](https://user-images.githubusercontent.com/83896816/200474051-2ae5cf2f-c1da-4841-bf79-7aa9bfa15da0.png)

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.