Autodesk / Autodesk/maya-usd

Maya manipulators ignore rotate/scale center options on usd objects

Open
#3,412 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**

Maya rotate and scale manipulators on usdUfe objects ignore rotate/scale center options. Transformation is always applied about each object pivot.

**Steps to reproduce**

1. Create a mayaUsd proxyShape with xformable prims.
```python
import maya.cmds
import mayaUsd.ufe
import mayaUsd_createStageWithNewLayer

maya.cmds.loadPlugin("mayaUsdPlugin", quiet=True)

proxyShape = mayaUsd_createStageWithNewLayer.createStageWithNewLayer()
shapeStage = mayaUsd.ufe.getStage(proxyShape)

shapeStage.GetRootLayer().ImportFromString('''#sdf 1
def Sphere "Sphere"
{
}
def Cube "Cube"
{
double3 xformOp:translate = (5, 0, 0)
uniform token[] xformOpOrder = ["xformOp:translate"]
}
''')
```

2. Select `Sphere` then `Cube` prims and activate rotate manip.
```python
maya.cmds.select(f"{proxyShape},/Sphere", f"{proxyShape},/Cube")
maya.cmds.setToolTo("RotateSuperContext")
```

3. Set `Rotate Center` to `Manip` in tool settings or with `manipRotateContext` command.

```python
maya.cmds.manipRotateContext("Rotate", e=True, useManipPivot=True, useObjectPivot=False, useCenterPivot=False)
```

4. Manipulate and notice Sphere is not rotated about Cube's pivot as expected.

5. Set it now to `Selection`

```python
maya.cmds.manipRotateContext("Rotate", e=True, useCenterPivot=True, useObjectPivot=False, useManipPivot=False)
```

6. Notice prims are not rotated about selection's center as expected.

**Specs (if applicable):**

- CentOS 7.8
- Maya 2023.3
- maya-usd 0.25
- USD 22.11

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.