Autodesk / Autodesk/maya-usd

Add ability to specify purposes for color sets on export

Open
#1,210 0 comments 0 reactions 0 assignees View on GitHub
enhancement import-export
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 9h
Merged PRs (30d)
17

Description

**Is your feature request related to a problem? Please describe.**

When exporting to USD, several USD concepts / features are best representing in Maya as color sets; however, there is not necessarily an obvious way to connect WHICH color set to which USD feature. One example already used by the USD exporter is displayColor; other (not-yet-supported) features include velocity and acceleration vectors.

**Describe the solution you'd like**
Add an argument to USD export, that would allow us to provide a mapping from a maya color-set name to a USD "purpose", ie:

```
colorSetPurpose=[("velocity", "velocity"), ("foo", "displayColor")]
```

If exporting of color sets is on, then any color sets NOT used in `colorSetPurpose` would be exported "normally" as primvars. Additionally, we could mark colorSets we wish to skip to save space in the resulting USD - ie:

```
colorSetPurpose=[("mayaDeformerWeights", None)]
```

or

```
colorSetPurpose=[("mayaDeformerWeights", '')]
```

...could be used to signal that we wish to ignore those color sets (but still export other color sets).

**Describe alternatives you've considered**
We could provide per-use flags to specify this -- ie, `displayColorColorSet='foo'` and `velocityColorSet='velocity'` -- but this creates an expanding set of special purpose flags. It also doesn't provide a way to specify color sets to skip.

**Additional context**
This request comes from the discussion in this PR:
https://github.com/Autodesk/maya-usd/pull/1136

Thanks to @dgovil for the idea of generalizing in this fashion!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the USD export implementation and the discussion in PR 1136; the payload does not name specific files or tests. Define the export behavior for mapped color sets, unmapped color sets, and entries mapped to None or an empty purpose, then add coverage for those cases.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.