Skip to content

Commit 4528f3a

Browse files
authored
Merge pull request #1313 from ImageEngine/RB-10.4
Merge branch 'RB-10.4' into main
2 parents 2daf829 + c6c8336 commit 4528f3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2497
-70
lines changed

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ jobs:
7070
os: windows-2019
7171
buildType: RELEASE
7272
options: .github/workflows/main/options.windows
73-
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.1.0/gafferDependencies-6.1.0-Python3-windows.zip
73+
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.2.0/gafferDependencies-6.2.0-Python3-windows.zip
7474
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
7575
publish: true
7676

7777
- name: windows-python3-debug
7878
os: windows-2019
7979
buildType: RELWITHDEBINFO
8080
options: .github/workflows/main/options.windows
81-
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.1.0/gafferDependencies-6.1.0-Python3-windows.zip
81+
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.2.0/gafferDependencies-6.2.0-Python3-windows.zip
8282
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
8383
publish: false
8484

Changes

+44
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
10.4.3.0 (relative to 10.4.2.1)
2+
========
3+
4+
Features
5+
--------
6+
7+
- IECoreNuke : Add LiveScene support for Nuke (#1310).
8+
- LiveSceneKnob : Knob to interface with LiveScene from Python.
9+
- LiveSceneHolder : Node to hold LiveSceneKnob to provide a Python interface with LiveScene.
10+
- IECoreMaya : Add non-drawable `ieSceneShapeProxy` subclassed from `ieSceneShape` (#1311).
11+
12+
Improvements
13+
------------
14+
15+
- Added string constructor and static `fromString` function to `IECore.MurmurHash`.
16+
17+
Fixes
18+
-----
19+
20+
- IECoreUSD : Fixed error in `pluginfo.json` preventing USD on Windows from loading `IECoreUSD.dll`.
21+
- IECoreScene : Fixed MeshPrimitiveEvaluator assert typo.
22+
23+
Build
24+
-----
25+
26+
- Updated Windows dependencies to 6.2.0.
27+
- Added WITH_OIIO_UTIL option.
28+
129
10.4.2.1 (relative to 10.4.2.0)
230
========
331

@@ -107,6 +135,22 @@ Build
107135

108136
- Updated IE options file to support Nuke 13.x custom dependencies (#1263).
109137

138+
10.3.8.0 (relative to 10.3.7.2)
139+
========
140+
141+
Features
142+
--------
143+
144+
- IECoreNuke : Add LiveScene support for Nuke (#1310).
145+
- LiveSceneKnob : Knob to interface with LiveScene from Python.
146+
- LiveSceneHolder : Node to hold LiveSceneKnob to provide a Python interface with LiveScene.
147+
- IECoreMaya : Add non-drawable `ieSceneShapeProxy` subclassed from `ieSceneShape` (#1311).
148+
149+
Fixes
150+
-----
151+
152+
- IECoreUSD : Fixed error in `pluginfo.json` preventing USD on Windows from loading `IECoreUSD.dll`.
153+
110154
10.3.7.2 (relative to 10.3.7.1)
111155
========
112156

SConstruct

+18-7
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ SConsignFile()
5656

5757
ieCoreMilestoneVersion = 10 # for announcing major milestones - may contain all of the below
5858
ieCoreMajorVersion = 4 # backwards-incompatible changes
59-
ieCoreMinorVersion = 2 # new backwards-compatible features
60-
ieCorePatchVersion = 1 # bug fixes
59+
ieCoreMinorVersion = 3 # new backwards-compatible features
60+
ieCorePatchVersion = 0 # bug fixes
6161
ieCoreVersionSuffix = "" # used for alpha/beta releases. Example: "a1", "b2", etc.
6262

6363
###########################################################################################
@@ -260,6 +260,10 @@ o.Add(
260260
"",
261261
)
262262

263+
o.Add(
264+
BoolVariable( "WITH_OIIO_UTIL", "Build with OpenImageIO_Util", True ),
265+
)
266+
263267
# Blosc options
264268

265269
o.Add(
@@ -1861,13 +1865,14 @@ imageEnvPrepends = {
18611865
],
18621866
"LIBS" : [
18631867
"OpenImageIO$OIIO_LIB_SUFFIX",
1864-
"OpenImageIO_Util$OIIO_LIB_SUFFIX",
18651868
],
18661869
"CXXFLAGS" : [
18671870
"-DIECoreImage_EXPORTS",
18681871
systemIncludeArgument, "$OIIO_INCLUDE_PATH"
18691872
]
18701873
}
1874+
if imageEnv.get( "WITH_OIIO_UTIL", True ):
1875+
imageEnvPrepends["LIBS"].append( "OpenImageIO_Util$OIIO_LIB_SUFFIX" )
18711876

18721877
imageEnv.Prepend( **imageEnvPrepends )
18731878
# Windows uses PATH for to find libraries, we must append to it to make sure we don't overwrite existing PATH entries.
@@ -2219,11 +2224,12 @@ if env["WITH_GL"] and doConfigure :
22192224
os.path.basename( imageEnv.subst( "$INSTALL_LIB_NAME" ) ),
22202225
os.path.basename( sceneEnv.subst( "$INSTALL_LIB_NAME" ) ),
22212226
"OpenImageIO$OIIO_LIB_SUFFIX",
2222-
"OpenImageIO_Util$OIIO_LIB_SUFFIX",
22232227
"GLEW$GLEW_LIB_SUFFIX",
22242228
"boost_wave$BOOST_LIB_SUFFIX",
22252229
]
22262230
)
2231+
if glEnv.get( "WITH_OIIO_UTIL", True ):
2232+
glEnv.Append( LIBS = [ "OpenImageIO_Util$OIIO_LIB_SUFFIX", ] )
22272233

22282234
if env["PLATFORM"]=="darwin" :
22292235
glEnv.Append(
@@ -2688,7 +2694,7 @@ if doConfigure :
26882694
nukePythonSources = sorted( glob.glob( "src/IECoreNuke/bindings/*.cpp" ) )
26892695
nukePythonScripts = glob.glob( "python/IECoreNuke/*.py" )
26902696
nukePluginSources = sorted( glob.glob( "src/IECoreNuke/plugin/*.cpp" ) )
2691-
nukeNodeNames = [ "ieObject", "ieOp", "ieDrawable", "ieDisplay" ]
2697+
nukeNodeNames = [ "ieObject", "ieOp", "ieDrawable", "ieDisplay", "ieLiveScene", "sccWriter" ]
26922698

26932699
# nuke library
26942700
nukeLibrary = nukeEnv.SharedLibrary( "lib/" + os.path.basename( nukeEnv.subst( "$INSTALL_NUKELIB_NAME" ) ), nukeSources )
@@ -2748,7 +2754,12 @@ if doConfigure :
27482754
for nodeName in nukeNodeNames :
27492755

27502756
nukeStubEnv = nukePluginEnv.Clone( IECORE_NAME=nodeName )
2751-
nukeStubName = "plugins/nuke/" + os.path.basename( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME" ) ) + ".tcl"
2757+
# In order to have our custom file format (scc) displayed in the file_type knob of the WriteGeo node, we need to install
2758+
# a dummy library with "[fileExtension]Writer"
2759+
if nodeName == "sccWriter":
2760+
nukeStubName = "plugins/nuke/" + os.path.basename( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME$SHLIBSUFFIX" ) )
2761+
else:
2762+
nukeStubName = "plugins/nuke/" + os.path.basename( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME" ) ) + ".tcl"
27522763
nukeStub = nukePluginEnv.Command( nukeStubName, nukePlugin, "echo 'load ieCore' > $TARGET" )
27532764
nukeStubInstall = nukeStubEnv.Install( os.path.dirname( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME" ) ), nukeStub )
27542765
nukeStubEnv.Alias( "install", nukeStubInstall )
@@ -3127,7 +3138,7 @@ if doConfigure :
31273138
"!IECOREUSD_RELATIVE_LIB_FOLDER!" : os.path.relpath(
31283139
usdLibraryInstall[0].get_path(),
31293140
os.path.dirname( usdEnv.subst( "$INSTALL_USD_RESOURCE_DIR/IECoreUSD/plugInfo.json" ) )
3130-
).format( "\\", "\\\\" ),
3141+
).replace( "\\", "\\\\" ),
31313142
}
31323143
)
31333144
usdEnv.AddPostAction( "$INSTALL_USD_RESOURCE_DIR/IECoreUSD", lambda target, source, env : makeSymLinks( usdEnv, usdEnv["INSTALL_USD_RESOURCE_DIR"] ) )

config/ie/options

+4
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ oiioRoot = os.path.join( "/software", "apps", "OpenImageIO", oiioVersion, platfo
196196
OIIO_INCLUDE_PATH = os.path.join( oiioRoot, "include" )
197197
OIIO_LIB_PATH = os.path.join( oiioRoot, "lib64" )
198198
OIIO_LIB_SUFFIX = IEEnv.BuildUtil.libSuffix( "OpenImageIO", oiioLibSuffix )
199+
WITH_OIIO_UTIL = "true"
199200

200201
FREETYPE_LIB_PATH = os.path.join( "/software", "tools", "lib", platform, compiler, compilerVersion )
201202
FREETYPE_INCLUDE_PATH = "/usr/include/freetype2"
@@ -436,6 +437,9 @@ if targetApp=="rv" :
436437
# the default `OIIO_INCLUDE_PATH` value.
437438
OIIO_LIB_PATH = rvLibs
438439
OIIO_LIB_SUFFIX = rvReg.get( "OpenImageIOLibSuffix", OIIO_LIB_SUFFIX )
440+
# current version of OIIO used by RV doesn't include the Util library
441+
# this variable will tell the build process to not require it
442+
WITH_OIIO_UTIL = rvReg.get( "WithOpenImageIOUtil", WITH_OIIO_UTIL )
439443

440444
# find doxygen
441445
DOXYGEN = os.path.join( "/software/apps/doxygen", os.environ["DOXYGEN_VERSION"], platform, "bin", "doxygen" )

contrib/IECoreUSD/src/IECoreUSD/USDScene.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,15 @@ IECore::PathMatcher readSetInternal( const pxr::UsdPrim &prim, const pxr::TfToke
269269
const size_t prefixSize = prim.GetPath().GetPathElementCount();
270270
if( auto collection = pxr::UsdCollectionAPI( prim, name ) )
271271
{
272+
Canceller::check( canceller );
272273
pxr::UsdCollectionAPI::MembershipQuery membershipQuery = collection.ComputeMembershipQuery();
274+
275+
Canceller::check( canceller );
273276
pxr::SdfPathSet includedPaths = collection.ComputeIncludedPaths( membershipQuery, prim.GetStage() );
274277

275278
for( const auto &path : includedPaths )
276279
{
280+
Canceller::check( canceller );
277281
if( path.HasPrefix( prim.GetPath() ) )
278282
{
279283
result.addPath( fromUSDWithoutPrefix( path, prefixSize ) );

include/IECore/DataAlgo.inl

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#define IECORE_DATAALGO_INL
3737

3838
#include "IECore/DateTimeData.h"
39+
#include "IECore/PathMatcherData.h"
3940
#include "IECore/SimpleTypedData.h"
4041
#include "IECore/SplineData.h"
4142
#include "IECore/TransformationMatrixData.h"
@@ -193,6 +194,8 @@ typename std::invoke_result_t<F, Data *, Args&&...> dispatch( Data *data, F &&fu
193194
return functor( static_cast<Color3fVectorData *>( data ), std::forward<Args>( args )... );
194195
case Color4fVectorDataTypeId :
195196
return functor( static_cast<Color4fVectorData *>( data ), std::forward<Args>( args )... );
197+
case PathMatcherDataTypeId :
198+
return functor( static_cast<PathMatcherData *>( data ), std::forward<Args>( args )... );
196199
default :
197200
throw InvalidArgumentException( boost::str ( boost::format( "Data has unknown type '%1%' / '%2%' " ) % typeId % data->typeName() ) );
198201
}
@@ -345,6 +348,8 @@ typename std::invoke_result_t<F, const Data *, Args&&...> dispatch( const Data *
345348
return functor( static_cast<const Color3fVectorData *>( data ), std::forward<Args>( args )... );
346349
case Color4fVectorDataTypeId :
347350
return functor( static_cast<const Color4fVectorData *>( data ), std::forward<Args>( args )... );
351+
case PathMatcherDataTypeId :
352+
return functor( static_cast<const PathMatcherData *>( data ), std::forward<Args>( args )... );
348353
default :
349354
throw InvalidArgumentException( boost::str ( boost::format( "Data has unknown type '%1%' / '%2%' " ) % typeId % data->typeName() ) );
350355
}

include/IECore/MurmurHash.h

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ class IECORE_API MurmurHash
6161
inline MurmurHash();
6262
inline MurmurHash( const MurmurHash &other );
6363

64+
// Construct directly from string representation
65+
explicit MurmurHash( const std::string &repr );
66+
6467
// Construct directly from known internal values
6568
inline MurmurHash( uint64_t h1, uint64_t h2 );
6669

@@ -84,6 +87,7 @@ class IECORE_API MurmurHash
8487
inline bool operator < ( const MurmurHash &other ) const;
8588

8689
std::string toString() const;
90+
static MurmurHash fromString( const std::string &repr );
8791

8892
// Access internal storage for special cases
8993
inline uint64_t h1() const;

include/IECoreMaya/MayaTypeIds.h

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ enum MayaTypeId
6767
GeometryCombinerId = 0x00110DD2,
6868
SceneShapeId = 0x00110DD3,
6969
SceneShapeInterfaceId = 0x00110DD4,
70+
SceneShapeProxyId = 0x00110DD5,
7071
/// Don't forget to update MayaTypeIdsBinding.cpp
7172

7273
LastId = 0x00110E3F,

include/IECoreMaya/SceneShapeProxy.h

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
//////////////////////////////////////////////////////////////////////////
2+
//
3+
// Copyright (c) 2022, Image Engine Design Inc. All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are
7+
// met:
8+
//
9+
// * Redistributions of source code must retain the above copyright
10+
// notice, this list of conditions and the following disclaimer.
11+
//
12+
// * Redistributions in binary form must reproduce the above copyright
13+
// notice, this list of conditions and the following disclaimer in the
14+
// documentation and/or other materials provided with the distribution.
15+
//
16+
// * Neither the name of Image Engine Design nor the names of any
17+
// other contributors to this software may be used to endorse or
18+
// promote products derived from this software without specific prior
19+
// written permission.
20+
//
21+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22+
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23+
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24+
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25+
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26+
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27+
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28+
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29+
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30+
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31+
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32+
//
33+
//////////////////////////////////////////////////////////////////////////
34+
35+
#ifndef IE_COREMAYA_SCENESHAPEPROXY_H
36+
#define IE_COREMAYA_SCENESHAPEPROXY_H
37+
38+
#include "IECoreMaya/SceneShape.h"
39+
40+
namespace IECoreMaya
41+
{
42+
43+
/// A proxy derived from the SceneShape which exposes the same functionality as the base clase
44+
/// with the exception, that we never register it as a maya SubSceneOverride. The reasoning
45+
/// behind this is that the SubSceneOverride does not take into account the visibility state of the shape.
46+
/// During an update loop of the SubSceneOverride, all SceneShapes will be queried for their update state,
47+
/// regardless their visibility in the scene. This query is slow and we get a huge drop in performance
48+
/// when having a huge amount of SceneShapes in the scene.
49+
/// This is considered to be a bug in the ViewPort 2 API. Our attempts to rewrite the code to use
50+
/// "MPxGeometryOverride" or "MPxDrawOverride" prove themselves as unstable or not suitable for our
51+
/// use case, why we decided to use this "hackery" and not register a proxy of the SceneShape for
52+
/// drawing at all
53+
class IECOREMAYA_API SceneShapeProxy : public SceneShape
54+
{
55+
public :
56+
57+
SceneShapeProxy();
58+
virtual ~SceneShapeProxy();
59+
60+
static void *creator();
61+
static MStatus initialize();
62+
static MTypeId id;
63+
};
64+
65+
}
66+
67+
#endif // IE_COREMAYA_SCENESHAPEPROXY_H
+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//////////////////////////////////////////////////////////////////////////
2+
//
3+
// Copyright (c) 2022, Image Engine Design Inc. All rights reserved.
4+
//
5+
// Redistribution and use in source and binary forms, with or without
6+
// modification, are permitted provided that the following conditions are
7+
// met:
8+
//
9+
// * Redistributions of source code must retain the above copyright
10+
// notice, this list of conditions and the following disclaimer.
11+
//
12+
// * Redistributions in binary form must reproduce the above copyright
13+
// notice, this list of conditions and the following disclaimer in the
14+
// documentation and/or other materials provided with the distribution.
15+
//
16+
// * Neither the name of Image Engine Design nor the names of any
17+
// other contributors to this software may be used to endorse or
18+
// promote products derived from this software without specific prior
19+
// written permission.
20+
//
21+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
22+
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23+
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24+
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25+
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26+
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27+
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28+
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29+
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30+
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31+
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32+
//
33+
//////////////////////////////////////////////////////////////////////////
34+
35+
#ifndef IECOREMAYA_SCENESHAPEPROXYUI_H
36+
#define IECOREMAYA_SCENESHAPEPROXYUI_H
37+
38+
#include "maya/MPxSurfaceShapeUI.h"
39+
#include "maya/MTypes.h"
40+
#include "IECoreMaya/Export.h"
41+
42+
namespace IECoreMaya
43+
{
44+
45+
/// The SceneShapeProxyUI is required for the registration of the SceneShapeProxy and we just make it a NoOp
46+
/// TODO: It might be worth to see if the SceneShapeUI has any dependencies on the drawing capabilities of the
47+
/// shape and if that's not the case, register SceneShapeProxy with the original implementation of SceneShapeUI
48+
class IECOREMAYA_API SceneShapeProxyUI : public MPxSurfaceShapeUI
49+
{
50+
51+
public :
52+
53+
SceneShapeProxyUI();
54+
static void *creator();
55+
};
56+
57+
} // namespace IECoreMaya
58+
59+
#endif // IECOREMAYA_SCENESHAPEPROXYUI_H

include/IECoreNuke/Convert.h

+9
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,21 @@ IECORENUKE_API Imath::M44f convert( const DD::Image::Matrix4 &from );
114114
template<>
115115
IECORENUKE_API Imath::M44d convert( const DD::Image::Matrix4 &from );
116116

117+
template<>
118+
IECORENUKE_API DD::Image::Matrix4 convert( const Imath::M44d &from );
119+
117120
template<>
118121
IECORENUKE_API Imath::Box2i convert( const DD::Image::Box &from );
119122

120123
template<>
121124
IECORENUKE_API DD::Image::Box3 convert( const Imath::Box3f &from );
122125

126+
template<>
127+
IECORENUKE_API Imath::Box3f convert( const DD::Image::Box3 &from );
128+
129+
template<>
130+
IECORENUKE_API Imath::Box3d convert( const DD::Image::Box3 &from );
131+
123132
} // namespace IECore
124133

125134
#endif // IECORENUKE_CONVERT_H

0 commit comments

Comments
 (0)