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 Apr 3, 2024
1 parent ffb5093 commit 497fc9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Improvements

- EditScope : Added a summary of edits in the NodeEditor, with the ability to select the affected objects and quickly navigate to the processor nodes.
- Arnold : OSL shaders with connections from multiple outputs are no longer duplicated on export to Arnold.
- 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 497fc9a

Please sign in to comment.