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
17 changes: 1 addition & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
name: [
linux-gcc11,
linux-debug-gcc11,
linux-gcc11-platform23,
windows,
]

Expand Down Expand Up @@ -65,20 +64,6 @@ jobs:
sconsCacheMegabytes: 2500
jobs: 4

- name: linux-gcc11-platform23
os: ubuntu-24.04
buildType: RELEASE
publish: false
containerImage: ghcr.io/gafferhq/build/build:3.4.0
# GitHub container builds run as root. This causes failures for tests that
# assert that filesystem permissions are respected, because root doesn't
# respect permissions. So we run the final test suite as a dedicated
# test user rather than as root.
testRunner: sudo -E -u testUser
sconsCacheMegabytes: 400
jobs: 4
dependenciesURL: https://github.com/ImageEngine/cortex/releases/download/10.5.15.3/cortex-10.5.15.3-linux-gcc11.tar.gz

- name: windows
os: windows-2022
buildType: RELEASE
Expand Down Expand Up @@ -305,7 +290,7 @@ jobs:
run: |
podman run -e CI -e RMANTREE -e GITHUB_WORKSPACE -e GAFFER_BUILD_DIR -v /opt/pixar:/opt/pixar -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --mac-address a4:bb:6d:cf:40:7a --shm-size 4g --entrypoint=sh -w $GITHUB_WORKSPACE rockylinux:9.3-minimal -c .github/workflows/main/testGafferRenderMan.sh
df -H
if: ${{ env.RMANTREE != '' && runner.os != 'Windows' && matrix.name != 'linux-gcc11-platform23' }}
if: ${{ env.RMANTREE != '' && runner.os != 'Windows' }}

- name: Build Docs and Package
# Docs builds should be relatively quick. If there is a problem, this
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main/installDependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

# Determine default archive URL.

defaultURL = "https://github.com/ImageEngine/cortex/releases/download/10.6.2.1/cortex-10.6.2.1-{platform}{buildEnvironment}.{extension}"
defaultURL = "https://github.com/ImageEngine/cortex/releases/download/10.7.0.0a1/cortex-10.7.0.0a1-{platform}{buildEnvironment}.{extension}"

# Parse command line arguments.

Expand Down
5 changes: 5 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ 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.
- Gaffer::SplinePlug :
- Removed support for loading splines saved with Gaffer version 0.40.0.0 and earlier
- Renamed to Gaffer::RampPlug. Removed SplineDefinition ( use IECore::Ramp instead ).
- OSL Shaders : Pattern/FloatSpline and Pattern/ColorSpline have been replaced by Pattern/FloatRamp and Pattern/ColorRamp. Old Gaffer scripts will automatically be updated on load, files exported from Gaffer will contain the new shaders. ( The .osl files for the old shaders are still included, so that old USD files can render ).
- GafferUI : Renamed SplineWidget to RampWidget. Renamed SplinePlugValueWidget to RampPlugValueWidget. The old RampPlugValueWidget is no longer exposed, since it was only used internally.

1.6.x.x (relative to 1.6.7.0)
=======
Expand Down
127 changes: 127 additions & 0 deletions include/Gaffer/RampPlug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2011-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
// met:
//
// * Redistributions of source code must retain the above
// copyright notice, this list of conditions and the following
// disclaimer.
//
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided with
// the distribution.
//
// * Neither the name of John Haddon nor the names of
// any other contributors to this software may be used to endorse or
// promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////

#pragma once

#include "Gaffer/NumericPlug.h"
#include "Gaffer/PlugType.h"
#include "Gaffer/TypedPlug.h"

#include "IECore/Ramp.h"

namespace Gaffer
{

/// The RampPlug allows the user to manipulate an IECore::Ramp, which is
/// a simple curve representation with a list of control points and an
/// interpolation.
//
/// Rather than storing the value atomically, the
/// points and interpolation are represented as individual plugs,
/// allowing the positions of individual points to have input
/// connections from other nodes.

template<typename T>
class GAFFER_API RampPlug : public ValuePlug
{

public :

using ValueType = T;
using XPlugType = typename PlugType<typename T::XType>::Type;
using YPlugType = typename PlugType<typename T::YType>::Type;

GAFFER_PLUG_DECLARE_TEMPLATE_TYPE( RampPlug<T>, ValuePlug );

explicit RampPlug(
const std::string &name = defaultName<RampPlug>(),
Direction direction=In,
const T &defaultValue = T(),
unsigned flags = Default
);
~RampPlug() override;

/// Implemented to only accept children which are suitable for use as points
/// in the ramp.
bool acceptsChild( const GraphComponent *potentialChild ) const override;
PlugPtr createCounterpart( const std::string &name, Direction direction ) const override;

const T &defaultValue() const;
void setToDefault() override;
bool isSetToDefault() const override;
void resetDefault() override;
IECore::MurmurHash defaultHash() const override;

/// Sets the value of the points and interpolation child plugs
/// \undoable
void setValue( const T &value );
/// Matching to setValue
T getValue() const;

IntPlug *interpolationPlug();
const IntPlug *interpolationPlug() const;

/// Returns the number of point plugs
unsigned numPoints() const;
/// \undoable
unsigned addPoint();
/// \undoable
void removePoint( unsigned pointIndex );
/// \undoable
void clearPoints();

ValuePlug *pointPlug( unsigned pointIndex );
const ValuePlug *pointPlug( unsigned pointIndex ) const;
XPlugType *pointXPlug( unsigned pointIndex );
const XPlugType *pointXPlug( unsigned pointIndex ) const;
YPlugType *pointYPlug( unsigned pointIndex );
const YPlugType *pointYPlug( unsigned pointIndex ) const;

private :

T m_defaultValue;
};

using RampffPlug = RampPlug<IECore::Rampff>;
using RampfColor3fPlug = RampPlug<IECore::RampfColor3f>;
using RampfColor4fPlug = RampPlug<IECore::RampfColor4f>;

IE_CORE_DECLAREPTR( RampffPlug );
IE_CORE_DECLAREPTR( RampfColor3fPlug );
IE_CORE_DECLAREPTR( RampfColor4fPlug );

} // namespace Gaffer
210 changes: 0 additions & 210 deletions include/Gaffer/SplinePlug.h

This file was deleted.

Loading
Loading