diff --git a/Changes.md b/Changes.md index 2e48483334c..f73eb6012aa 100644 --- a/Changes.md +++ b/Changes.md @@ -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 ----- diff --git a/python/GafferArnoldUI/ArnoldShaderUI.py b/python/GafferArnoldUI/ArnoldShaderUI.py index 57ef2328f37..2852f2c97e2 100644 --- a/python/GafferArnoldUI/ArnoldShaderUI.py +++ b/python/GafferArnoldUI/ArnoldShaderUI.py @@ -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" ) @@ -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