Skip to content

Commit

Permalink
Dispatch App : Fix setting of dispatch plug from command line
Browse files Browse the repository at this point in the history
The same dispatcher can be added to the `dispatchers` list multiple
times, once from the `dispatcher` parameter, and again from the
`alternateDispatchers` parameter.

That in turn resulted in the wrong dispatcher object being the one
updated by the settings from the command line.

The fix here is to prevent the duplicate addition of the same
dispatcher.
  • Loading branch information
ivanimanishi committed Aug 25, 2023
1 parent 6bdb6db commit 54b3355
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Fixes
- Viewer :
- Fixed visualisation of Cycles point light size.
- Fixed visualisation of Arnold light gobo textures with scaled UV coordinates.
- Dispatch App : Fixed bug that prevented setting specific dispatcher plug values from the command line (#5434).

1.2.10.1 (relative to 1.2.10.0)
========
Expand Down
5 changes: 4 additions & 1 deletion apps/dispatch/dispatch-1.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ def _run( self, args ) :
return 1

if args["gui"].value and len(args["alternateDispatchers"]) :
dispatchers.extend( GafferDispatch.Dispatcher.createMatching( " ".join( args["alternateDispatchers"] ) ) )
pattern = " ".join( args[ "alternateDispatchers" ] )
for name in GafferDispatch.Dispatcher.registeredDispatchers() :
if name != dispatcherType and IECore.StringAlgo.matchMultiple( name, pattern ) :
dispatchers.append( GafferDispatch.Dispatcher.create( name ) )

dispatcherNames = {}
for dispatcher in dispatchers :
Expand Down

0 comments on commit 54b3355

Please sign in to comment.