diff --git a/Changes.md b/Changes.md index e8a5cc4a35..3bf619b618 100644 --- a/Changes.md +++ b/Changes.md @@ -5,6 +5,7 @@ Breaking Changes ---------------- - StandardNodule : Removed deprecated `setCompatibleLabelsVisible()`. +- ValuePlug : Disconnection no longer emits plugSet signal. 1.5.x.x (relative to 1.5.3.0) ======= diff --git a/include/Gaffer/ValuePlug.h b/include/Gaffer/ValuePlug.h index 5705a1f13f..f4c804a7d1 100644 --- a/include/Gaffer/ValuePlug.h +++ b/include/Gaffer/ValuePlug.h @@ -68,8 +68,6 @@ class GAFFER_API ValuePlug : public Plug /// derive from ValuePlug too, and they can deal with them /// in setFrom(). bool acceptsInput( const Plug *input ) const override; - /// Reimplemented so that values can be propagated from inputs. - void setInput( PlugPtr input ) override; PlugPtr createCounterpart( const std::string &name, Direction direction ) const override; diff --git a/python/GafferTest/DependencyNodeTest.py b/python/GafferTest/DependencyNodeTest.py index a2027281d5..ccea2aa157 100644 --- a/python/GafferTest/DependencyNodeTest.py +++ b/python/GafferTest/DependencyNodeTest.py @@ -55,18 +55,17 @@ def testDirtyOnDisconnect( self ) : n1["op2"].setValue( 3 ) dirtied = GafferTest.CapturingSlot( n2.plugDirtiedSignal() ) - set = GafferTest.CapturingSlot( n2.plugSetSignal() ) + plugSet = GafferTest.CapturingSlot( n2.plugSetSignal() ) n2["op1"].setInput( n1["sum"] ) - self.assertEqual( len( set ), 0 ) + self.assertEqual( len( plugSet ), 0 ) self.assertEqual( len( dirtied ), 2 ) self.assertTrue( dirtied[0][0].isSame( n2["op1"] ) ) self.assertTrue( dirtied[1][0].isSame( n2["sum"] ) ) n2["op1"].setInput( None ) - self.assertEqual( len( set ), 1 ) - self.assertTrue( set[0][0].isSame( n2["op1"] ) ) + self.assertEqual( len( plugSet ), 0 ) self.assertEqual( len( dirtied ), 4 ) self.assertTrue( dirtied[2][0].isSame( n2["op1"] ) ) self.assertTrue( dirtied[3][0].isSame( n2["sum"] ) ) diff --git a/python/GafferTest/NumericPlugTest.py b/python/GafferTest/NumericPlugTest.py index 3d09281073..bec0dae962 100644 --- a/python/GafferTest/NumericPlugTest.py +++ b/python/GafferTest/NumericPlugTest.py @@ -167,20 +167,6 @@ def testDisconnectRevertsToPreviousValue( self ) : self.assertEqual( n2["op1"].getInput(), None ) self.assertEqual( n2["op1"].getValue(), 1010 ) - def testDisconnectEmitsPlugSet( self ) : - - n1 = GafferTest.AddNode() - n2 = GafferTest.AddNode() - - n2["op1"].setInput( n1["sum"] ) - - set = GafferTest.CapturingSlot( n2.plugSetSignal() ) - - n2["op1"].setInput( None ) - - self.assertEqual( len( set ), 1 ) - self.assertTrue( set[0][0].isSame( n2["op1"] ) ) - def testDefaultValue( self ) : p = Gaffer.IntPlug( diff --git a/src/Gaffer/ValuePlug.cpp b/src/Gaffer/ValuePlug.cpp index fe036e133e..3de176e7bc 100644 --- a/src/Gaffer/ValuePlug.cpp +++ b/src/Gaffer/ValuePlug.cpp @@ -839,24 +839,6 @@ bool ValuePlug::acceptsInput( const Plug *input ) const return true; } -void ValuePlug::setInput( PlugPtr input ) -{ - // set value back to what it was before - // we received a connection. we do that - // before calling Plug::setInput, so that - // we've got our new state set correctly before - // the dirty signal is emitted. we don't emit - // in the setValueInternal call, because we don't - // want to double up on the signals that the Plug - // is emitting for us in Plug::setInput(). - if( getInput() && !input ) - { - setValueInternal( m_staticValue, false ); - } - - Plug::setInput( input ); -} - PlugPtr ValuePlug::createCounterpart( const std::string &name, Direction direction ) const { PlugPtr result = new ValuePlug( name, direction, getFlags() );