Skip to content

Commit

Permalink
USDLight : Append the (Renderman) suffix to any USD Lux plugs with `r…
Browse files Browse the repository at this point in the history
…i:light:` prefix.
  • Loading branch information
boberfly committed Oct 9, 2024
1 parent e88fd8a commit 1fb3477
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -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
-----

Expand Down
13 changes: 11 additions & 2 deletions python/GafferUSDUI/USDShaderUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,20 @@ 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
return __sdrProperty( plug ).GetLabel() + suffix or None

def __description( plug ) :

Expand Down

0 comments on commit 1fb3477

Please sign in to comment.