Skip to content

Commit

Permalink
Merge pull request #1313 from ImageEngine/RB-10.4
Browse files Browse the repository at this point in the history
Merge branch 'RB-10.4' into main
  • Loading branch information
ivanimanishi authored Nov 4, 2022
2 parents 2daf829 + c6c8336 commit 4528f3a
Show file tree
Hide file tree
Showing 54 changed files with 2,497 additions and 70 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ jobs:
os: windows-2019
buildType: RELEASE
options: .github/workflows/main/options.windows
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.1.0/gafferDependencies-6.1.0-Python3-windows.zip
dependenciesURL: https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.2.0/gafferDependencies-6.2.0-Python3-windows.zip
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB
publish: true

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

Expand Down
44 changes: 44 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
10.4.3.0 (relative to 10.4.2.1)
========

Features
--------

- IECoreNuke : Add LiveScene support for Nuke (#1310).
- LiveSceneKnob : Knob to interface with LiveScene from Python.
- LiveSceneHolder : Node to hold LiveSceneKnob to provide a Python interface with LiveScene.
- IECoreMaya : Add non-drawable `ieSceneShapeProxy` subclassed from `ieSceneShape` (#1311).

Improvements
------------

- Added string constructor and static `fromString` function to `IECore.MurmurHash`.

Fixes
-----

- IECoreUSD : Fixed error in `pluginfo.json` preventing USD on Windows from loading `IECoreUSD.dll`.
- IECoreScene : Fixed MeshPrimitiveEvaluator assert typo.

Build
-----

- Updated Windows dependencies to 6.2.0.
- Added WITH_OIIO_UTIL option.

10.4.2.1 (relative to 10.4.2.0)
========

Expand Down Expand Up @@ -107,6 +135,22 @@ Build

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

10.3.8.0 (relative to 10.3.7.2)
========

Features
--------

- IECoreNuke : Add LiveScene support for Nuke (#1310).
- LiveSceneKnob : Knob to interface with LiveScene from Python.
- LiveSceneHolder : Node to hold LiveSceneKnob to provide a Python interface with LiveScene.
- IECoreMaya : Add non-drawable `ieSceneShapeProxy` subclassed from `ieSceneShape` (#1311).

Fixes
-----

- IECoreUSD : Fixed error in `pluginfo.json` preventing USD on Windows from loading `IECoreUSD.dll`.

10.3.7.2 (relative to 10.3.7.1)
========

Expand Down
25 changes: 18 additions & 7 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ SConsignFile()

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

###########################################################################################
Expand Down Expand Up @@ -260,6 +260,10 @@ o.Add(
"",
)

o.Add(
BoolVariable( "WITH_OIIO_UTIL", "Build with OpenImageIO_Util", True ),
)

# Blosc options

o.Add(
Expand Down Expand Up @@ -1861,13 +1865,14 @@ imageEnvPrepends = {
],
"LIBS" : [
"OpenImageIO$OIIO_LIB_SUFFIX",
"OpenImageIO_Util$OIIO_LIB_SUFFIX",
],
"CXXFLAGS" : [
"-DIECoreImage_EXPORTS",
systemIncludeArgument, "$OIIO_INCLUDE_PATH"
]
}
if imageEnv.get( "WITH_OIIO_UTIL", True ):
imageEnvPrepends["LIBS"].append( "OpenImageIO_Util$OIIO_LIB_SUFFIX" )

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

if env["PLATFORM"]=="darwin" :
glEnv.Append(
Expand Down Expand Up @@ -2688,7 +2694,7 @@ if doConfigure :
nukePythonSources = sorted( glob.glob( "src/IECoreNuke/bindings/*.cpp" ) )
nukePythonScripts = glob.glob( "python/IECoreNuke/*.py" )
nukePluginSources = sorted( glob.glob( "src/IECoreNuke/plugin/*.cpp" ) )
nukeNodeNames = [ "ieObject", "ieOp", "ieDrawable", "ieDisplay" ]
nukeNodeNames = [ "ieObject", "ieOp", "ieDrawable", "ieDisplay", "ieLiveScene", "sccWriter" ]

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

nukeStubEnv = nukePluginEnv.Clone( IECORE_NAME=nodeName )
nukeStubName = "plugins/nuke/" + os.path.basename( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME" ) ) + ".tcl"
# In order to have our custom file format (scc) displayed in the file_type knob of the WriteGeo node, we need to install
# a dummy library with "[fileExtension]Writer"
if nodeName == "sccWriter":
nukeStubName = "plugins/nuke/" + os.path.basename( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME$SHLIBSUFFIX" ) )
else:
nukeStubName = "plugins/nuke/" + os.path.basename( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME" ) ) + ".tcl"
nukeStub = nukePluginEnv.Command( nukeStubName, nukePlugin, "echo 'load ieCore' > $TARGET" )
nukeStubInstall = nukeStubEnv.Install( os.path.dirname( nukeStubEnv.subst( "$INSTALL_NUKEPLUGIN_NAME" ) ), nukeStub )
nukeStubEnv.Alias( "install", nukeStubInstall )
Expand Down Expand Up @@ -3127,7 +3138,7 @@ if doConfigure :
"!IECOREUSD_RELATIVE_LIB_FOLDER!" : os.path.relpath(
usdLibraryInstall[0].get_path(),
os.path.dirname( usdEnv.subst( "$INSTALL_USD_RESOURCE_DIR/IECoreUSD/plugInfo.json" ) )
).format( "\\", "\\\\" ),
).replace( "\\", "\\\\" ),
}
)
usdEnv.AddPostAction( "$INSTALL_USD_RESOURCE_DIR/IECoreUSD", lambda target, source, env : makeSymLinks( usdEnv, usdEnv["INSTALL_USD_RESOURCE_DIR"] ) )
Expand Down
4 changes: 4 additions & 0 deletions config/ie/options
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ oiioRoot = os.path.join( "/software", "apps", "OpenImageIO", oiioVersion, platfo
OIIO_INCLUDE_PATH = os.path.join( oiioRoot, "include" )
OIIO_LIB_PATH = os.path.join( oiioRoot, "lib64" )
OIIO_LIB_SUFFIX = IEEnv.BuildUtil.libSuffix( "OpenImageIO", oiioLibSuffix )
WITH_OIIO_UTIL = "true"

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

# find doxygen
DOXYGEN = os.path.join( "/software/apps/doxygen", os.environ["DOXYGEN_VERSION"], platform, "bin", "doxygen" )
Expand Down
4 changes: 4 additions & 0 deletions contrib/IECoreUSD/src/IECoreUSD/USDScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,15 @@ IECore::PathMatcher readSetInternal( const pxr::UsdPrim &prim, const pxr::TfToke
const size_t prefixSize = prim.GetPath().GetPathElementCount();
if( auto collection = pxr::UsdCollectionAPI( prim, name ) )
{
Canceller::check( canceller );
pxr::UsdCollectionAPI::MembershipQuery membershipQuery = collection.ComputeMembershipQuery();

Canceller::check( canceller );
pxr::SdfPathSet includedPaths = collection.ComputeIncludedPaths( membershipQuery, prim.GetStage() );

for( const auto &path : includedPaths )
{
Canceller::check( canceller );
if( path.HasPrefix( prim.GetPath() ) )
{
result.addPath( fromUSDWithoutPrefix( path, prefixSize ) );
Expand Down
5 changes: 5 additions & 0 deletions include/IECore/DataAlgo.inl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#define IECORE_DATAALGO_INL

#include "IECore/DateTimeData.h"
#include "IECore/PathMatcherData.h"
#include "IECore/SimpleTypedData.h"
#include "IECore/SplineData.h"
#include "IECore/TransformationMatrixData.h"
Expand Down Expand Up @@ -193,6 +194,8 @@ typename std::invoke_result_t<F, Data *, Args&&...> dispatch( Data *data, F &&fu
return functor( static_cast<Color3fVectorData *>( data ), std::forward<Args>( args )... );
case Color4fVectorDataTypeId :
return functor( static_cast<Color4fVectorData *>( data ), std::forward<Args>( args )... );
case PathMatcherDataTypeId :
return functor( static_cast<PathMatcherData *>( data ), std::forward<Args>( args )... );
default :
throw InvalidArgumentException( boost::str ( boost::format( "Data has unknown type '%1%' / '%2%' " ) % typeId % data->typeName() ) );
}
Expand Down Expand Up @@ -345,6 +348,8 @@ typename std::invoke_result_t<F, const Data *, Args&&...> dispatch( const Data *
return functor( static_cast<const Color3fVectorData *>( data ), std::forward<Args>( args )... );
case Color4fVectorDataTypeId :
return functor( static_cast<const Color4fVectorData *>( data ), std::forward<Args>( args )... );
case PathMatcherDataTypeId :
return functor( static_cast<const PathMatcherData *>( data ), std::forward<Args>( args )... );
default :
throw InvalidArgumentException( boost::str ( boost::format( "Data has unknown type '%1%' / '%2%' " ) % typeId % data->typeName() ) );
}
Expand Down
4 changes: 4 additions & 0 deletions include/IECore/MurmurHash.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class IECORE_API MurmurHash
inline MurmurHash();
inline MurmurHash( const MurmurHash &other );

// Construct directly from string representation
explicit MurmurHash( const std::string &repr );

// Construct directly from known internal values
inline MurmurHash( uint64_t h1, uint64_t h2 );

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

std::string toString() const;
static MurmurHash fromString( const std::string &repr );

// Access internal storage for special cases
inline uint64_t h1() const;
Expand Down
1 change: 1 addition & 0 deletions include/IECoreMaya/MayaTypeIds.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ enum MayaTypeId
GeometryCombinerId = 0x00110DD2,
SceneShapeId = 0x00110DD3,
SceneShapeInterfaceId = 0x00110DD4,
SceneShapeProxyId = 0x00110DD5,
/// Don't forget to update MayaTypeIdsBinding.cpp

LastId = 0x00110E3F,
Expand Down
67 changes: 67 additions & 0 deletions include/IECoreMaya/SceneShapeProxy.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2022, 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 Image Engine Design 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.
//
//////////////////////////////////////////////////////////////////////////

#ifndef IE_COREMAYA_SCENESHAPEPROXY_H
#define IE_COREMAYA_SCENESHAPEPROXY_H

#include "IECoreMaya/SceneShape.h"

namespace IECoreMaya
{

/// A proxy derived from the SceneShape which exposes the same functionality as the base clase
/// with the exception, that we never register it as a maya SubSceneOverride. The reasoning
/// behind this is that the SubSceneOverride does not take into account the visibility state of the shape.
/// During an update loop of the SubSceneOverride, all SceneShapes will be queried for their update state,
/// regardless their visibility in the scene. This query is slow and we get a huge drop in performance
/// when having a huge amount of SceneShapes in the scene.
/// This is considered to be a bug in the ViewPort 2 API. Our attempts to rewrite the code to use
/// "MPxGeometryOverride" or "MPxDrawOverride" prove themselves as unstable or not suitable for our
/// use case, why we decided to use this "hackery" and not register a proxy of the SceneShape for
/// drawing at all
class IECOREMAYA_API SceneShapeProxy : public SceneShape
{
public :

SceneShapeProxy();
virtual ~SceneShapeProxy();

static void *creator();
static MStatus initialize();
static MTypeId id;
};

}

#endif // IE_COREMAYA_SCENESHAPEPROXY_H
59 changes: 59 additions & 0 deletions include/IECoreMaya/SceneShapeProxyUI.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2022, 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 Image Engine Design 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.
//
//////////////////////////////////////////////////////////////////////////

#ifndef IECOREMAYA_SCENESHAPEPROXYUI_H
#define IECOREMAYA_SCENESHAPEPROXYUI_H

#include "maya/MPxSurfaceShapeUI.h"
#include "maya/MTypes.h"
#include "IECoreMaya/Export.h"

namespace IECoreMaya
{

/// The SceneShapeProxyUI is required for the registration of the SceneShapeProxy and we just make it a NoOp
/// TODO: It might be worth to see if the SceneShapeUI has any dependencies on the drawing capabilities of the
/// shape and if that's not the case, register SceneShapeProxy with the original implementation of SceneShapeUI
class IECOREMAYA_API SceneShapeProxyUI : public MPxSurfaceShapeUI
{

public :

SceneShapeProxyUI();
static void *creator();
};

} // namespace IECoreMaya

#endif // IECOREMAYA_SCENESHAPEPROXYUI_H
9 changes: 9 additions & 0 deletions include/IECoreNuke/Convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,21 @@ IECORENUKE_API Imath::M44f convert( const DD::Image::Matrix4 &from );
template<>
IECORENUKE_API Imath::M44d convert( const DD::Image::Matrix4 &from );

template<>
IECORENUKE_API DD::Image::Matrix4 convert( const Imath::M44d &from );

template<>
IECORENUKE_API Imath::Box2i convert( const DD::Image::Box &from );

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

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

template<>
IECORENUKE_API Imath::Box3d convert( const DD::Image::Box3 &from );

} // namespace IECore

#endif // IECORENUKE_CONVERT_H
Loading

0 comments on commit 4528f3a

Please sign in to comment.