Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValuePlug : Remove deprecated getObjectValue() method #5523

Merged
merged 1 commit into from
Nov 2, 2023
Merged
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
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Breaking Changes
----------------

- ValuePlug : Removed deprecated `getObjectValue()` overload.
- Dispatcher : Removed `createMatching()` method.
- Process : Removed non-const variant of the `handleException()` method.
- StringPlug : Removed deprecated `precomputedHash` argument from `getValue()` method.
Expand Down
5 changes: 0 additions & 5 deletions include/Gaffer/ValuePlug.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ class GAFFER_API ValuePlug : public Plug
/// so this feature is not suitable for use in classes that override that method.
template<typename T = IECore::Object>
const T *getObjectValue( IECore::ConstObjectPtr &owner, const IECore::MurmurHash *precomputedHash = nullptr ) const;
/// \deprecated
template<typename T = IECore::Object>
boost::intrusive_ptr<const T> getObjectValue( const IECore::MurmurHash *precomputedHash = nullptr ) const;
/// Should be called by derived classes when they wish to set the plug
/// value - the value is referenced directly (not copied) and so must
/// not be changed following the call.
Expand All @@ -271,8 +268,6 @@ class GAFFER_API ValuePlug : public Plug
class SetValueAction;

const IECore::Object *getValueInternal( IECore::ConstObjectPtr &owner, const IECore::MurmurHash *precomputedHash = nullptr ) const;
/// \deprecated
IECore::ConstObjectPtr getValueInternal( const IECore::MurmurHash *precomputedHash = nullptr ) const;
void setValueInternal( IECore::ConstObjectPtr value, bool propagateDirtiness );
void childAddedOrRemoved();
// Emits the appropriate Node::plugSetSignal() for this plug and all its
Expand Down
17 changes: 0 additions & 17 deletions include/Gaffer/ValuePlug.inl
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,4 @@ const T *ValuePlug::getObjectValue( IECore::ConstObjectPtr &owner, const IECore:
) );
}

template<typename T>
boost::intrusive_ptr<const T> ValuePlug::getObjectValue( const IECore::MurmurHash *precomputedHash ) const
{
IECore::ConstObjectPtr owner;
const T *value = getObjectValue<T>( owner, precomputedHash );
if( owner )
{
// Avoid unnecessary reference count manipulations.
return boost::static_pointer_cast<const T>( std::move( owner ) );
}
else
{
return value;
}

}

} // namespace Gaffer
10 changes: 2 additions & 8 deletions src/Gaffer/ValuePlug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,8 @@ void ValuePlug::resetDefault()
{
if( m_defaultValue != nullptr )
{
IECore::ConstObjectPtr newDefault = getObjectValue();
IECore::ConstObjectPtr newDefaultOwner;
IECore::ConstObjectPtr newDefault = getObjectValue( newDefaultOwner );
IECore::ConstObjectPtr oldDefault = m_defaultValue;
Action::enact(
this,
Expand Down Expand Up @@ -1040,13 +1041,6 @@ const IECore::Object *ValuePlug::getValueInternal( IECore::ConstObjectPtr &owner
return ComputeProcess::value( this, owner, precomputedHash );
}

IECore::ConstObjectPtr ValuePlug::getValueInternal( const IECore::MurmurHash *precomputedHash ) const
{
IECore::ConstObjectPtr owner;
const IECore::Object *result = getValueInternal( owner, precomputedHash );
return owner ? owner : result;
}

void ValuePlug::setObjectValue( IECore::ConstObjectPtr value )
{
bool haveInput = getInput();
Expand Down
Loading