diff --git a/Changes.md b/Changes.md index f0f43aee171..6b03d1e0e4f 100644 --- a/Changes.md +++ b/Changes.md @@ -1,6 +1,11 @@ 1.4.x.x (relative to 1.4.14.0) ======= +Improvements +------------ + +- USDLight : Append the (Renderman) suffix to any USD Lux plugs with `ri:light:` prefix. + Fixes ----- diff --git a/python/GafferUSDUI/USDShaderUI.py b/python/GafferUSDUI/USDShaderUI.py index d05734650c5..b06d2cd984c 100644 --- a/python/GafferUSDUI/USDShaderUI.py +++ b/python/GafferUSDUI/USDShaderUI.py @@ -112,11 +112,23 @@ def __layoutSection( plug ) : def __label( plug ) : + # When the Prman USD plugin is included with OpenUSD, the API + # schema for Lux lights gets applied but to match how other + # renderers label their custom plugs, we need to add the + # (Renderman) suffix to the label here. + + suffix = "" + if plug.getName().startswith( "ri:light:" ) : + suffix = " (Renderman)" + property = __primProperty( plug ) if property : - return property.GetMetadata( "displayName" ) + return property.GetMetadata( "displayName" ) + suffix - return __sdrProperty( plug ).GetLabel() or None + label = __sdrProperty( plug ).GetLabel() or None + if label : + label += suffix + return label def __description( plug ) :