diff --git a/Changes b/Changes index 5401d3d432..e012c1703d 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,4 @@ -10.5.0.0 (relative to 10.4.10.1) +10.5.0.0 (relative to 10.4.10.2) ======== Features @@ -40,6 +40,17 @@ Breaking Changes - Changed function signature. - Bug fixes mean subtle changes to the resulting points. +10.4.10.2 (relative to 10.4.10.1) +========= + +Fixes +----- + +- LinkedScene : Fixed bug where `linkLocations` attribute was baked incorrectly if the link target location wasn't the ROOT + - This in turn caused LinkedScene::setNames() and LinkedScene::readSet() to error +- IECoreNuke::FromNukePointsConverter : Use `Color3f` instead of `Color4f` to be compatible with `Gaffer` +- IECoreNuke::SceneCacheReader : Fixed crash with `SceneCacheReader` when widget updates while Caribou updates + 10.4.10.1 (relative to 10.4.10.0) ======== diff --git a/src/IECoreNuke/FromNukePointsConverter.cpp b/src/IECoreNuke/FromNukePointsConverter.cpp index 925531429d..38b1b792b2 100644 --- a/src/IECoreNuke/FromNukePointsConverter.cpp +++ b/src/IECoreNuke/FromNukePointsConverter.cpp @@ -71,9 +71,9 @@ IECore::ObjectPtr FromNukePointsConverter::doConversion( IECore::ConstCompoundOb const DD::Image::Attribute *colorAttr = m_geo->get_typed_attribute( "Cf", DD::Image::VECTOR4_ATTRIB ); if( colorAttr && colorAttr->size() == result->getNumPoints() ) { - Color4fVectorDataPtr colorData = new Color4fVectorData(); + Color3fVectorDataPtr colorData = new Color3fVectorData(); colorData->writable().resize( result->getNumPoints() ); - std::transform( colorAttr->vector4_list->begin(), colorAttr->vector4_list->end(), colorData->writable().begin(), IECore::convert ); + std::transform( colorAttr->vector4_list->begin(), colorAttr->vector4_list->end(), colorData->writable().begin(), IECore::convert ); result->variables["Cs"] = PrimitiveVariable( PrimitiveVariable::Vertex, colorData ); // Adding a separate alpha primvar as according to my test diff --git a/src/IECoreNuke/SceneCacheReader.cpp b/src/IECoreNuke/SceneCacheReader.cpp index c9cdbbc5a2..f368b52190 100644 --- a/src/IECoreNuke/SceneCacheReader.cpp +++ b/src/IECoreNuke/SceneCacheReader.cpp @@ -818,7 +818,12 @@ void SceneCacheReader::filterScene( const std::string &filterText, const std::st m_data->m_itemToFiltered.clear(); // Set the filtered items. - sceneView->setImportedItems( filteredIndices ); + std::vector currentIndices; + sceneView->getImportedItems( currentIndices ); + if( currentIndices != filteredIndices ) + { + sceneView->setImportedItems( filteredIndices ); + } // Create a mapping of item indices to filtered indices. for( std::vector::const_iterator it( filteredIndices.begin() ); it != filteredIndices.end(); ++it ) diff --git a/src/IECoreScene/LinkedScene.cpp b/src/IECoreScene/LinkedScene.cpp index 13148a0368..bfd17eac4e 100644 --- a/src/IECoreScene/LinkedScene.cpp +++ b/src/IECoreScene/LinkedScene.cpp @@ -700,6 +700,7 @@ void LinkedScene::writeAttribute( const Name &name, const Object *attribute, dou { throw Exception( "Trying to store a broken link!" ); } + m_rootLinkDepth = linkDepth; // check for child name clashes: NameList mainSceneChildren; diff --git a/test/IECoreScene/LinkedSceneTest.py b/test/IECoreScene/LinkedSceneTest.py index 37529d147c..3d82ff40b6 100644 --- a/test/IECoreScene/LinkedSceneTest.py +++ b/test/IECoreScene/LinkedSceneTest.py @@ -1094,26 +1094,41 @@ def testCanReadSetNamesAndMembersOfLinkedScene( self ) : r = IECoreScene.SceneCache( sceneFile, IECore.IndexedIO.OpenMode.Read ) A = r.child( "A" ) + B = A.child( "B" ) # Master scene which contains link to above scene # C # D -> [target.scc, /] + # E + # A -> [target.scc, /A] + # F + # A + # B -> [target.scc, /A/B] sceneFile = os.path.join( self.tempDir, "scene.lscc" ) w = IECoreScene.LinkedScene( sceneFile, IECore.IndexedIO.OpenMode.Write ) C = w.createChild( "C" ) D = C.createChild( "D" ) + E = w.createChild( "E" ) + A1 = E.createChild( "A" ) + + F = w.createChild( "F" ) + A2 = F.createChild( "A" ) + B1 = A2.createChild( "B" ) + + A1.writeLink( A ) D.writeLink( r ) + B1.writeLink( B ) - del w, C, D + del w, C, D, E, F, A1, A2, B1 # ok lets read back in our linked scene and try and read the set names r = IECoreScene.LinkedScene( sceneFile, IECore.IndexedIO.OpenMode.Read ) self.assertEqualUnordered( r.setNames(), ['don', 'stew'] ) - self.assertEqual( r.readSet( "don" ), IECore.PathMatcher(['/C/D/A'] ) ) - self.assertEqual( r.readSet( "stew" ), IECore.PathMatcher(['/C/D/A/B'] ) ) + self.assertEqual( r.readSet( "don" ), IECore.PathMatcher( ['/C/D/A', '/E/A' ] ) ) + self.assertEqual( r.readSet( "stew" ), IECore.PathMatcher( ['/C/D/A/B', '/E/A/B', '/F/A/B' ] ) ) self.assertEqualUnordered( r.setNames( includeDescendantSets = False ), [] )