Skip to content

Commit

Permalink
Added filter to viewer camera chooser.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Apr 22, 2015
1 parent 6ee37e4 commit 3b80648
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/GafferSceneUI/SceneViewToolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,14 @@ def __init__( self, plug, **kw ) :

with row :
self.__enabledWidget = GafferUI.BoolPlugValueWidget( plug["enabled"], displayMode=GafferUI.BoolWidget.DisplayMode.Switch )
self.__cameraWidget = GafferUI.PathPlugValueWidget(
self.__cameraWidget = GafferSceneUI.ScenePathPlugValueWidget(
plug["camera"],
path = GafferScene.ScenePath( plug.node()["in"], plug.node().getContext(), "/" ),
path = GafferScene.ScenePath(
plug.node()["in"],
plug.node().getContext(),
"/",
filter = GafferScene.ScenePath.createStandardFilter( [ "__cameras" ], "Show only cameras" )
),
)
self.__cameraWidget.pathWidget().setFixedCharacterWidth( 13 )
if hasattr( self.__cameraWidget.pathWidget()._qtWidget(), "setPlaceholderText" ) :
Expand Down

0 comments on commit 3b80648

Please sign in to comment.