Skip to content

Commit

Permalink
ArnoldShaderUI : Use help parameter metadata
Browse files Browse the repository at this point in the history
This is now provided by the Arnold core in Arnold 7.3, rather than being duplicated in each of the official DCC plugins (and not existing at all in poor old Gaffer).
  • Loading branch information
johnhaddon committed Mar 28, 2024
1 parent 0643ca3 commit 0d51156
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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.0.0b5)
=======

Improvements
------------

- ArnoldShader : Added parameter tooltips based on `help` metadata provided by Arnold.

Fixes
-----

Expand Down
7 changes: 6 additions & 1 deletion python/GafferArnoldUI/ArnoldShaderUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ def __translateNodeMetadata( nodeEntry ) :

# Shader description. We support Arnold-style "desc" and
# OSL style "help".
## \todo It seems that Arnold's standard is now "help", so
# we may be able to remove "desc".

description = __aiMetadataGetStr( nodeEntry, None, "desc",
defaultValue = __aiMetadataGetStr( nodeEntry, None, "help" )
Expand Down Expand Up @@ -245,7 +247,10 @@ def __translateNodeMetadata( nodeEntry ) :

# Parameter description

description = __aiMetadataGetStr( nodeEntry, paramName, "desc" )
description = __aiMetadataGetStr(
nodeEntry, paramName, "desc",
defaultValue = __aiMetadataGetStr( nodeEntry, paramName, "help" )
)
if description is not None :
__metadata[paramPath]["description"] = description

Expand Down

0 comments on commit 0d51156

Please sign in to comment.