Skip to content

Commit 73191c9

Browse files
committed
Remove PreWorldRenderable
Gaffer's new Renderer API doesn't have a world block, or a concept of pre/post world in the old RenderMan API sense. The whole point of modern rendering APIs is to allow anything to be edited at any time in any thread, and stateful APIs impede that. So it doesn't make sense to categorise certain renderables under a PreWorldRenderabel moniker.
1 parent 0a60e95 commit 73191c9

File tree

13 files changed

+29
-282
lines changed

13 files changed

+29
-282
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Breaking Changes
1717
- Font : Removed `meshGroup()` method.
1818
- Options, Group, Transform, MatrixTransform, MatrixMotionTransform, AttributeState, Light : Removed.
1919
- CurveExtrudeOp, IDXReader : Removed.
20+
- PreWorldRenderable : Removed. All derived classes now derive directly from Renderable.
2021
- Renderer, AttributeBlock, EditBlock, MotionBlock, TransformBlock, WorldBlock : Removed.
2122
- IECoreHoudini : Removed.
2223
- IECoreMaya : Removed.

include/IECoreScene/Camera.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
#define IECORESCENE_CAMERA_H
3737

3838
#include "IECoreScene/Export.h"
39-
#include "IECoreScene/PreWorldRenderable.h"
39+
#include "IECoreScene/Renderable.h"
4040

4141
namespace IECoreScene
4242
{
4343

44-
class IECORESCENE_API Camera : public PreWorldRenderable
44+
class IECORESCENE_API Camera : public Renderable
4545
{
4646
public:
4747
enum FilmFit
@@ -56,7 +56,7 @@ class IECORESCENE_API Camera : public PreWorldRenderable
5656
Camera( IECore::CompoundDataPtr parameters = new IECore::CompoundData );
5757
~Camera() override;
5858

59-
IE_CORE_DECLAREEXTENSIONOBJECT( Camera, CameraTypeId, PreWorldRenderable );
59+
IE_CORE_DECLAREEXTENSIONOBJECT( Camera, CameraTypeId, Renderable );
6060

6161
IECore::CompoundDataMap &parameters();
6262
const IECore::CompoundDataMap &parameters() const;

include/IECoreScene/ClippingPlane.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@
3636
#define IECORESCENE_CLIPPINGPLANE_H
3737

3838
#include "IECoreScene/Export.h"
39-
#include "IECoreScene/PreWorldRenderable.h"
39+
#include "IECoreScene/Renderable.h"
4040

4141
namespace IECoreScene
4242
{
4343

44-
class IECORESCENE_API ClippingPlane : public PreWorldRenderable
44+
class IECORESCENE_API ClippingPlane : public Renderable
4545
{
4646
public:
4747

4848
ClippingPlane();
4949
~ClippingPlane() override;
5050

51-
IE_CORE_DECLAREEXTENSIONOBJECT( ClippingPlane, ClippingPlaneTypeId, PreWorldRenderable );
51+
IE_CORE_DECLAREEXTENSIONOBJECT( ClippingPlane, ClippingPlaneTypeId, Renderable );
5252

5353
};
5454

include/IECoreScene/Output.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@
3636
#define IECORESCENE_OUTPUT_H
3737

3838
#include "IECoreScene/Export.h"
39-
#include "IECoreScene/PreWorldRenderable.h"
39+
#include "IECoreScene/Renderable.h"
4040

4141
namespace IECoreScene
4242
{
4343

4444
/// Describes an output image to be rendered.
4545
/// \ingroup renderingGroup
46-
class IECORESCENE_API Output : public PreWorldRenderable
46+
class IECORESCENE_API Output : public Renderable
4747
{
4848
public:
4949

5050
Output( const std::string &name="default", const std::string &type="exr", const std::string &data="rgba", IECore::CompoundDataPtr parameters = new IECore::CompoundData );
5151
~Output() override;
5252

53-
IE_CORE_DECLAREEXTENSIONOBJECT( Output, OutputTypeId, PreWorldRenderable );
53+
IE_CORE_DECLAREEXTENSIONOBJECT( Output, OutputTypeId, Renderable );
5454

5555
void setName( const std::string &name );
5656
const std::string &getName() const;

include/IECoreScene/PreWorldRenderable.h

Lines changed: 0 additions & 65 deletions
This file was deleted.

include/IECoreScene/TypeIds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ enum TypeId
7575
PrimitiveParameterTypeId = 108032,
7676
MeshPrimitiveParameterTypeId = 108033,
7777
PointsPrimitiveParameterTypeId = 108034,
78-
PreWorldRenderableTypeId = 108035,
78+
PreWorldRenderableTypeId = 108035, // Obsolete, available for reuse
7979
CameraTypeId = 108036,
8080
NURBSPrimitiveTypeId = 108037,
8181
PointBoundsOpTypeId = 108038, // Obsolete, available for reuse

src/IECoreScene/Camera.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ Camera::~Camera()
9494

9595
void Camera::copyFrom( const Object *other, CopyContext *context )
9696
{
97-
PreWorldRenderable::copyFrom( other, context );
97+
Renderable::copyFrom( other, context );
9898
const Camera *tOther = static_cast<const Camera *>( other );
9999
m_parameters = context->copy<CompoundData>( tOther->m_parameters.get() );
100100
}
101101

102102
void Camera::save( SaveContext *context ) const
103103
{
104-
PreWorldRenderable::save( context );
104+
Renderable::save( context );
105105
IndexedIOPtr container = context->container( staticTypeName(), m_ioVersion );
106106
context->save( m_parameters.get(), container.get(), g_parametersEntry );
107107
}
108108

109109
void Camera::load( LoadContextPtr context )
110110
{
111-
PreWorldRenderable::load( context );
111+
Renderable::load( context );
112112
unsigned int v = m_ioVersion;
113113
ConstIndexedIOPtr container = context->container( staticTypeName(), v );
114114

@@ -117,7 +117,7 @@ void Camera::load( LoadContextPtr context )
117117

118118
bool Camera::isEqualTo( const Object *other ) const
119119
{
120-
if( !PreWorldRenderable::isEqualTo( other ) )
120+
if( !Renderable::isEqualTo( other ) )
121121
{
122122
return false;
123123
}
@@ -135,13 +135,13 @@ bool Camera::isEqualTo( const Object *other ) const
135135

136136
void Camera::memoryUsage( Object::MemoryAccumulator &a ) const
137137
{
138-
PreWorldRenderable::memoryUsage( a );
138+
Renderable::memoryUsage( a );
139139
a.accumulate( m_parameters.get() );
140140
}
141141

142142
void Camera::hash( MurmurHash &h ) const
143143
{
144-
PreWorldRenderable::hash( h );
144+
Renderable::hash( h );
145145
m_parameters->hash( h );
146146
}
147147

src/IECoreScene/ClippingPlane.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,30 @@ ClippingPlane::~ClippingPlane()
4949

5050
void ClippingPlane::copyFrom( const Object *other, CopyContext *context )
5151
{
52-
PreWorldRenderable::copyFrom( other, context );
52+
Renderable::copyFrom( other, context );
5353
}
5454

5555
void ClippingPlane::save( SaveContext *context ) const
5656
{
57-
PreWorldRenderable::save( context );
57+
Renderable::save( context );
5858
}
5959

6060
void ClippingPlane::load( LoadContextPtr context )
6161
{
62-
PreWorldRenderable::load( context );
62+
Renderable::load( context );
6363
}
6464

6565
bool ClippingPlane::isEqualTo( const Object *other ) const
6666
{
67-
return PreWorldRenderable::isEqualTo( other );
67+
return Renderable::isEqualTo( other );
6868
}
6969

7070
void ClippingPlane::memoryUsage( Object::MemoryAccumulator &a ) const
7171
{
72-
PreWorldRenderable::memoryUsage( a );
72+
Renderable::memoryUsage( a );
7373
}
7474

7575
void ClippingPlane::hash( MurmurHash &h ) const
7676
{
77-
PreWorldRenderable::hash( h );
77+
Renderable::hash( h );
7878
}

src/IECoreScene/Output.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Output::~Output()
6060

6161
void Output::copyFrom( const Object *other, CopyContext *context )
6262
{
63-
PreWorldRenderable::copyFrom( other, context );
63+
Renderable::copyFrom( other, context );
6464
const Output *tOther = static_cast<const Output *>( other );
6565
m_name = tOther->m_name;
6666
m_type = tOther->m_type;
@@ -70,7 +70,7 @@ void Output::copyFrom( const Object *other, CopyContext *context )
7070

7171
void Output::save( SaveContext *context ) const
7272
{
73-
PreWorldRenderable::save( context );
73+
Renderable::save( context );
7474
IndexedIOPtr container = context->container( staticTypeName(), m_ioVersion );
7575
container->write( g_nameEntry, m_name );
7676
container->write( g_typeEntry, m_type );
@@ -80,7 +80,7 @@ void Output::save( SaveContext *context ) const
8080

8181
void Output::load( LoadContextPtr context )
8282
{
83-
PreWorldRenderable::load( context );
83+
Renderable::load( context );
8484
unsigned int v = m_ioVersion;
8585
ConstIndexedIOPtr container = context->container( staticTypeName(), v );
8686
container->read( g_nameEntry, m_name );
@@ -91,7 +91,7 @@ void Output::load( LoadContextPtr context )
9191

9292
bool Output::isEqualTo( const Object *other ) const
9393
{
94-
if( !PreWorldRenderable::isEqualTo( other ) )
94+
if( !Renderable::isEqualTo( other ) )
9595
{
9696
return false;
9797
}
@@ -127,7 +127,7 @@ bool Output::isEqualTo( const Object *other ) const
127127

128128
void Output::memoryUsage( Object::MemoryAccumulator &a ) const
129129
{
130-
PreWorldRenderable::memoryUsage( a );
130+
Renderable::memoryUsage( a );
131131
a.accumulate( m_name.capacity() );
132132
a.accumulate( m_type.capacity() );
133133
a.accumulate( m_data.capacity() );
@@ -136,7 +136,7 @@ void Output::memoryUsage( Object::MemoryAccumulator &a ) const
136136

137137
void Output::hash( MurmurHash &h ) const
138138
{
139-
PreWorldRenderable::hash( h );
139+
Renderable::hash( h );
140140
h.append( m_name );
141141
h.append( m_type );
142142
h.append( m_data );

src/IECoreScene/PreWorldRenderable.cpp

Lines changed: 0 additions & 84 deletions
This file was deleted.

0 commit comments

Comments
 (0)