Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Breaking Changes
- RenderUI : Removed deprecated `rendererPresetNames()` function.
- Menu : Removed support for `enter` and `leave` properties on menu items.
- SceneEditor : Removed `numInputs` argument to `Settings` constructor.
- UserPlugs : Removed - use `PlugCreationWidget` instead.
- CompoundDataPlugValueWidget : Removed. LayoutPlugValueWidget and PlugCreationWidget replace all previous functionality.

1.6.x.x (relative to 1.6.7.0)
=======
Expand Down
2 changes: 1 addition & 1 deletion python/GafferSceneUI/AttributesUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def __attributePresets( plug ) :
interface, or using the CompoundDataPlug API via python.
""",

"compoundDataPlugValueWidget:editable" : False,
"layout:customWidget:addButton:visibilityActivator" : False,

},

Expand Down
4 changes: 2 additions & 2 deletions python/GafferSceneUI/CameraUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@
corresponding global render options.
""",
"layout:section" : "Render Overrides",
"compoundDataPlugValueWidget:editable" : False,
"layout:customWidget:addButton:visibilityActivator" : False,

},

Expand Down Expand Up @@ -383,7 +383,7 @@
""",

"layout:section" : "Visualisation",
"compoundDataPlugValueWidget:editable" : False,
"layout:customWidget:addButton:visibilityActivator" : False,

},

Expand Down
2 changes: 1 addition & 1 deletion python/GafferSceneUI/CustomAttributesUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"attributes" : {

"plugCreationWidget:excludedTypes" : "Gaffer.ObjectPlug",
"compoundDataPlugValueWidget:editable" : True,
"layout:customWidget:addButton:visibilityActivator" : True,
"ui:scene:acceptsAttributes" : True,

},
Expand Down
2 changes: 1 addition & 1 deletion python/GafferSceneUI/CustomOptionsUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
""",

"plugCreationWidget:excludedTypes" : "Gaffer.ObjectPlug",
"compoundDataPlugValueWidget:editable" : True,
"layout:customWidget:addButton:visibilityActivator" : True,
"ui:scene:acceptsOptions" : True,

},
Expand Down
2 changes: 1 addition & 1 deletion python/GafferSceneUI/LightUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def __parameterMetadata( plug, key ) :
""",

"layout:section" : "Visualisation",
"compoundDataPlugValueWidget:editable" : False,
"layout:customWidget:addButton:visibilityActivator" : False,

"layout:activator:lookThroughApertureVisibility" : lambda parentPlug : __lightTypeMatches( parentPlug.node(), ["distant"] ),
"layout:activator:lookThroughClippingPlanesVisibility" : lambda parentPlug : __lightTypeMatches( parentPlug.node(), ["distant", "spot"] ),
Expand Down
2 changes: 1 addition & 1 deletion python/GafferSceneUI/OptionsUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __optionPresets( plug ) :
python.
""",

"compoundDataPlugValueWidget:editable" : False,
"layout:customWidget:addButton:visibilityActivator" : False,

},

Expand Down
2 changes: 1 addition & 1 deletion python/GafferSceneUI/OutputsUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def __collapseButtonClicked( self, button ) :
GafferUI.PlugWidget( self.getPlug()["fileName"] )
GafferUI.PlugWidget( self.getPlug()["type"] )
GafferUI.PlugWidget( self.getPlug()["data"] )
GafferUI.CompoundDataPlugValueWidget( self.getPlug()["parameters"] )
GafferUI.PlugValueWidget.create( self.getPlug()["parameters"] )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth also registering the below to prevent ObjectPlugs from appearing in the menu?

"outputs.*.parameters" : {

	"plugCreationWidget:excludedTypes" : "Gaffer.ObjectPlug",

},

GafferUI.Divider( GafferUI.Divider.Orientation.Horizontal )

self.__detailsColumn.setVisible( visible )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
##########################################################################
#
# Copyright (c) 2015, Image Engine Design Inc. All rights reserved.
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -34,32 +35,12 @@
#
##########################################################################

import unittest

import Gaffer
import GafferUI
import GafferUITest

class CompoundDataPlugValueWidgetTest( GafferUITest.TestCase ) :

def testSetPlug( self ) :

n = Gaffer.Node()
n["user"]["p1"] = Gaffer.CompoundDataPlug()
n["user"]["p2"] = Gaffer.CompoundDataPlug()

m1 = Gaffer.NameValuePlug( "test", 10 )
n["user"]["p1"].addChild( m1 )
m2 = Gaffer.NameValuePlug( "test", 10 )
n["user"]["p2"].addChild( m2 )

w = GafferUI.CompoundDataPlugValueWidget( n["user"]["p1"] )
w1 = w.childPlugValueWidget( m1 )
self.assertTrue( w1.getPlug().isSame( m1 ) )

w.setPlug( n["user"]["p2"] )
w2 = w.childPlugValueWidget( m2 )
self.assertTrue( w2.getPlug().isSame( m2 ) )

if __name__ == "__main__":
unittest.main()
Gaffer.Metadata.registerValue( Gaffer.CompoundDataPlug, "*", "deletable", lambda plug : plug.getFlags( Gaffer.Plug.Flags.Dynamic ) )
Gaffer.Metadata.registerValue( Gaffer.CompoundDataPlug, "plugValueWidget:type", "GafferUI.LayoutPlugValueWidget" )
# Of all CompoundDataPlug clients to date, the majority want a PlugCreationWidget. So we register one by
# default and turn it off again in clients that don't want it.
Gaffer.Metadata.registerValue( Gaffer.CompoundDataPlug, "layout:customWidget:addButton:widgetType", "GafferUI.PlugCreationWidget" )
Gaffer.Metadata.registerValue( Gaffer.CompoundDataPlug, "layout:customWidget:addButton:index", -1 ), # Last
Gaffer.Metadata.registerValue( Gaffer.CompoundDataPlug, "plugCreationWidget:useGeometricInterpretation", True )
98 changes: 0 additions & 98 deletions python/GafferUI/CompoundDataPlugValueWidget.py

This file was deleted.

155 changes: 0 additions & 155 deletions python/GafferUI/UserPlugs.py

This file was deleted.

Loading