Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bbf93bb
SceneShapeProxy: Add a proxy for `SceneShape`
yannci May 17, 2022
b3e0082
SceneShapeProxyUI: Add `SceneShapeProxyUI`
yannci May 17, 2022
b196075
IECoreMaya: Register `SceneShapeProxy` as `ieSceneShapeProxy`
yannci May 17, 2022
0075cec
Add ieSceneShapeProxy AttributeEditorTemplate
yannci Aug 24, 2022
9a140a9
SceneShape: Allow `findScene` to find `SceneShape` and `SceneShapeProxy`
yannci May 31, 2022
2066419
SConstruct : Fix slash error on Windows
ericmehl Oct 17, 2022
a59945a
Merge pull request #1305 from ericmehl/USD-slash-fix
johnhaddon Oct 19, 2022
2911ec6
Maya Python3 support: Backport changes from RB-10.4
yannci Nov 2, 2022
186a357
FnSceneShape: Change `staticmethod`s to `classmethods`s
yannci May 10, 2022
25f0c63
FnSceneShape: Add `_FnSceneShapeProxy` class
yannci May 30, 2022
08f4d30
FnSceneShape: Instantiate object based on passed node type
yannci May 30, 2022
03afa0f
FnSceneShape: Add `shapeType` argument to create methods
yannci Jun 2, 2022
248464a
SceneShapeTest: Create maya node in `setUp` method
yannci Sep 27, 2022
d0cd1f4
tests: Add SceneShapeProxyTest
yannci May 17, 2022
49720a5
Convert: Added conversion from DD::Image::Box3 to Imath::Box3f and Im…
lucienfostier Feb 16, 2018
b05cd3b
SceneCacheReader: Stop transforming the mesh into world space.
lucienfostier Oct 20, 2022
6369d9b
LiveScene: Implementation of LiveScene for Nuke.
lucienfostier Feb 16, 2018
26d6000
SceneCacheReader: Add path attribute in geometry converter so we can …
lucienfostier Oct 13, 2022
06dc99c
LiveSceneKnob: A knob to query the incoming 3d scene using the SceneI…
lucienfostier Oct 12, 2022
49eca0f
LiveSceneHolder: Node to hold a LiveSceneKnob to query the input scen…
lucienfostier Oct 5, 2022
ef7a09a
LiveSceneKnobTest: Added test for LiveSceneKnob and LiveSceneHolder node
lucienfostier Oct 12, 2022
121ccf1
SceneCacheWriter: Plugin for nuke WriteGeo to write SceneCache file
lucienfostier Oct 22, 2022
b56b9b8
SceneCacheWriterTest: Test for SceneCacheWriter plugin.
lucienfostier Oct 25, 2022
20c5800
Merge pull request #1310 from lucienfostier/nukeLiveScene
ivanimanishi Nov 3, 2022
b6182a1
Changes : Updated for PR #1310
ivanimanishi Nov 3, 2022
df242ef
Merge pull request #1311 from yannci/ieSceneShapeProxy
ivanimanishi Nov 3, 2022
a4af7e6
Changes : Updated for PR #1311
ivanimanishi Nov 3, 2022
a03c518
Changes : v10.3.8.0
ivanimanishi Nov 3, 2022
13082dc
SConstruct : Bumped to 10.3.8.0
ivanimanishi Nov 3, 2022
55a10fa
Merge branch 'RB-10.4' into tmp-10.3
ivanimanishi Nov 4, 2022
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
29 changes: 29 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
10.4.x.x (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`.

Build
-----

Expand Down Expand Up @@ -121,6 +134,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
11 changes: 8 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -2691,7 +2691,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 @@ -2751,7 +2751,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 @@ -3130,7 +3135,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
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
132 changes: 132 additions & 0 deletions include/IECoreNuke/LiveScene.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
//////////////////////////////////////////////////////////////////////////
//
// 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 IECORENUKE_LIVESCENE_H
#define IECORENUKE_LIVESCENE_H

#include "DDImage/GeoOp.h"
#include "DDImage/GeometryList.h"

#include "IECore/PathMatcher.h"

#include "IECoreScene/SceneInterface.h"

#include "IECoreNuke/Export.h"
#include "IECoreNuke/TypeIds.h"

namespace IECoreNuke
{

IE_CORE_FORWARDDECLARE( LiveScene );

/// A read-only class for representing a live Nuke scene as an IECore::SceneInterface
class IECORENUKE_API LiveScene : public IECoreScene::SceneInterface
{
public :

static const std::string& nameAttribute;

IE_CORE_DECLARERUNTIMETYPEDEXTENSION( LiveScene, LiveSceneTypeId, IECoreScene::SceneInterface );

LiveScene();
LiveScene( DD::Image::GeoOp *op, const std::string rootPath="/" );

~LiveScene() override;

std::string fileName() const override;

Name name() const override;
void path( Path &p ) const override;

Imath::Box3d readBound( double time ) const override;
void writeBound( const Imath::Box3d &bound, double time );

IECore::ConstDataPtr readTransform( double time ) const override;
Imath::M44d readTransformAsMatrix( double time ) const override;
IECore::ConstDataPtr readWorldTransform( double time ) const;
Imath::M44d readWorldTransformAsMatrix( double time ) const;
void writeTransform( const IECore::Data *transform, double time ) override;

bool hasAttribute( const Name &name ) const override;
void attributeNames( NameList &attrs ) const override;
IECore::ConstObjectPtr readAttribute( const Name &name, double time ) const override;
void writeAttribute( const Name &name, const IECore::Object *attribute, double time ) override;

bool hasTag( const Name &name, int filter = SceneInterface::LocalTag ) const override;
void readTags( NameList &tags, int filter = SceneInterface::LocalTag ) const override;
void writeTags( const NameList &tags ) override;

NameList setNames( bool includeDescendantSets = true ) const override;
IECore::PathMatcher readSet( const Name &name, bool includeDescendantSets = true, const IECore::Canceller *canceller = nullptr ) const override;
void writeSet( const Name &name, const IECore::PathMatcher &set ) override;
void hashSet( const Name& setName, IECore::MurmurHash &h ) const override;

bool hasObject() const override;
IECore::ConstObjectPtr readObject( double time, const IECore::Canceller *canceller = nullptr ) const override;
IECoreScene::PrimitiveVariableMap readObjectPrimitiveVariables( const std::vector<IECore::InternedString> &primVarNames, double time ) const override;
void writeObject( const IECore::Object *object, double time ) override;

void childNames( NameList &childNames ) const override;
bool hasChild( const Name &name ) const override;
IECoreScene::SceneInterfacePtr child( const Name &name, MissingBehaviour missingBehaviour = SceneInterface::ThrowIfMissing ) override;
IECoreScene::ConstSceneInterfacePtr child( const Name &name, MissingBehaviour missingBehaviour = SceneInterface::ThrowIfMissing ) const override;
IECoreScene::SceneInterfacePtr createChild( const Name &name ) override;

IECoreScene::SceneInterfacePtr scene( const Path &path, MissingBehaviour missingBehaviour = SceneInterface::ThrowIfMissing ) override;
IECoreScene::ConstSceneInterfacePtr scene( const Path &path, MissingBehaviour missingBehaviour = SceneInterface::ThrowIfMissing ) const override;

void hash( HashType hashType, double time, IECore::MurmurHash &h ) const override;

static double timeToFrame( const double& time );
static double frameToTime( const int& frame );

private:

DD::Image::GeoOp *op() const;
DD::Image::GeometryList geometryList( const double* time=nullptr ) const;

std::string geoInfoPath( const int& index ) const;

DD::Image::GeoOp *m_op;
std::string m_rootPath;
IECore::PathMatcher m_pathMatcher;
typedef std::map<unsigned, std::string> objectPathMap;
mutable objectPathMap m_objectPathMap;
};

IE_CORE_DECLAREPTR( LiveScene );

} // namespace IECoreNuke

#endif // IECORENUKE_LIVESCENE_H
Loading