Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
774 stars 201 forks source link

[MAYA-128008] Cannot set outliner text colour on prims #2649

Open gracekumagai opened 2 years ago

gracekumagai commented 2 years ago

Describe the bug In native maya, the user has the option to set the display colour for the outliner text per node (in the attribute editor -> Display -> Outliner Color and can toggle it using Use Outliner Color).

Our artists use the Outliner Color to customize and quickly identify key groups in their dressing (ex: green for veg, orange for architecture, etc).

Steps to reproduce Steps to reproduce the behavior:

  1. Click on a prim in the Outliner
  2. Navigate to the Attribute Editor

Notice that there isn't an "Object Display" or "Display" section to set the colour.

Expected behavior We would expect the same customization for usd and native maya nodes.

Specs (if applicable):

seando-adsk commented 1 year ago

@gracekumagai Every Maya object has two extra attributes: useOutlinerColor (boolean) and outlinerColor (color). When the boolean is enabled the Outliner will read and use the object color instead of the default color.

I think for USD we can use the USD custom data. For example:

// def Capsule "Capsule1" (
//     customData = {
//         double3 "Outliner Color" = (1, 0, 0)
//         bool "Use Outliner Color" = 1
//     }
// )

For the AE we can modify the template file (in the maya-usd repo) to show these two fields. When you enable the "Use Outliner Color" we can add the custom data to that prim. The UsdUIInfoHandler already has a Ufe method to set the treeview color which is used by the Outliner. So we modify this to ask if the prim has this custom data and if so return the color.

Would that work for you? If yes, I'll get this logged internally and have Natalia design how/where to place these fields in the AE for prims.

Sean

dj-mcg commented 12 months ago

@seando-adsk - sorry for the delay in our reply, but yes, that sounds like it would work!