Skip to content

Commit

Permalink
LightEditor : Add columnName argument to registerParameter()
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Apr 30, 2024
1 parent 9e6d796 commit 0604de4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ API
- BoxPlug : Added Python bindings for `ValueType`, `PointType` and `ChildType` type aliases.
- RenderPassEditor : Added `deregisterColumn()` method.
- DocumentationAlgo : Added table and strikethrough support to `markdownToHTML()`.
- LightEditor : Added `columnName` parameter to `registerParameter()` method, matching the behaviour of `RenderPassEditor.registerOption()`.
- USDShader : Added support for loading from the UsdSchemaRegistry as well as from the SdrRegistry. This is now used when loading UsdLuxLights.

Build
Expand Down
5 changes: 3 additions & 2 deletions python/GafferSceneUI/LightEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def scene( self ) :
# that will be matched against `self.__settingsNode["attribute"]` to determine if
# the column should be shown.
@classmethod
def registerParameter( cls, rendererKey, parameter, section = None ) :
def registerParameter( cls, rendererKey, parameter, section = None, columnName = None ) :

# We use `tuple` to store `ShaderNetwork.Parameter`, because
# the latter isn't hashable and we need to use it as a dict key.
Expand All @@ -155,7 +155,8 @@ def registerParameter( cls, rendererKey, parameter, section = None ) :
rendererKey,
parameter,
lambda scene, editScope : _GafferSceneUI._LightEditorInspectorColumn(
GafferSceneUI.Private.ParameterInspector( scene, editScope, rendererKey, parameter )
GafferSceneUI.Private.ParameterInspector( scene, editScope, rendererKey, parameter ),
columnName if columnName is not None else ""
),
section
)
Expand Down

0 comments on commit 0604de4

Please sign in to comment.