Closed mlfecho closed 2 months ago
By default we are hiding the array attributes from the Attribute Editor (AE). You can enable them by checking "Show | Show Array Attributes" in the AE. This setting is saved in user prefs.
Also note in the AE we don't display the values of the array, instead we display the type and size. There is a context menu for these array types with menu items to copy the values or print them to script editor.
Sean
Ah! My bad. This is perfect, thank you.
Great thanks for the update.
@santosg87 Can you test "you must change tabs in the Attribute Editor to refresh and reflect newly created attributes" and log internally if needed.
Logged the AE refresh issue internally MAYA-122129.
The fix for the AE refresh has been in for some time now without any new reports.
Marking this as closed, as all the relevant issues have been addressed.
Describe the bug The Attribute Editor does not display array-type attributes on usd scopes. These array attributes are, however, present, and queryable via the Usd API. Additionally, you must change tabs in the Attribute Editor to refresh and reflect newly created attributes.
Steps to reproduce Steps to reproduce the behavior:
node = cmds.ls(sl=True, ufe=True)[0] prim = mayaUsd.ufe.ufePathToPrim(node)
this shows up under Extra Attributes (need to change tabs to refresh)
stringAttr = prim.CreateAttribute('stringAttr', Sdf.ValueTypeNames.String) stringAttr.Set('hello world') print(stringAttr.Get())
this does not show up under in Attribute Editor
stringArrayAttr = prim.CreateAttribute('stringArrayAttr', Sdf.ValueTypeNames.StringArray) stringArrayAttr.Set(['hello', 'world']) print(stringArrayAttr.Get())
this shows up under Extra Attributes (need to change tabs to refresh)
intAttr = prim.CreateAttribute('intAttr', Sdf.ValueTypeNames.Int) intAttr.Set(42) print(intAttr.Get())
this does not show up under in Attribute Editor
intArrayAttr = prim.CreateAttribute('intArrayAttr', Sdf.ValueTypeNames.IntArray) intArrayAttr.Set([42, 24]) print(intArrayAttr.Get())