Skip to content

Commit 86f13fb

Browse files
authored
Merge pull request #1382 from ImageEngine/RB-10.5
RB 10.5 to main
2 parents 164643e + 4629329 commit 86f13fb

File tree

5 files changed

+39
-7
lines changed

5 files changed

+39
-7
lines changed

Changes

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
10.5.0.0 (relative to 10.4.10.1)
1+
10.5.0.0 (relative to 10.4.10.2)
22
========
33

44
Features
@@ -40,6 +40,17 @@ Breaking Changes
4040
- Changed function signature.
4141
- Bug fixes mean subtle changes to the resulting points.
4242

43+
10.4.10.2 (relative to 10.4.10.1)
44+
=========
45+
46+
Fixes
47+
-----
48+
49+
- LinkedScene : Fixed bug where `linkLocations` attribute was baked incorrectly if the link target location wasn't the ROOT
50+
- This in turn caused LinkedScene::setNames() and LinkedScene::readSet() to error
51+
- IECoreNuke::FromNukePointsConverter : Use `Color3f` instead of `Color4f` to be compatible with `Gaffer`
52+
- IECoreNuke::SceneCacheReader : Fixed crash with `SceneCacheReader` when widget updates while Caribou updates
53+
4354
10.4.10.1 (relative to 10.4.10.0)
4455
========
4556

src/IECoreNuke/FromNukePointsConverter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ IECore::ObjectPtr FromNukePointsConverter::doConversion( IECore::ConstCompoundOb
7171
const DD::Image::Attribute *colorAttr = m_geo->get_typed_attribute( "Cf", DD::Image::VECTOR4_ATTRIB );
7272
if( colorAttr && colorAttr->size() == result->getNumPoints() )
7373
{
74-
Color4fVectorDataPtr colorData = new Color4fVectorData();
74+
Color3fVectorDataPtr colorData = new Color3fVectorData();
7575
colorData->writable().resize( result->getNumPoints() );
76-
std::transform( colorAttr->vector4_list->begin(), colorAttr->vector4_list->end(), colorData->writable().begin(), IECore::convert<Imath::Color4f, DD::Image::Vector4> );
76+
std::transform( colorAttr->vector4_list->begin(), colorAttr->vector4_list->end(), colorData->writable().begin(), IECore::convert<Imath::Color3f, DD::Image::Vector4> );
7777
result->variables["Cs"] = PrimitiveVariable( PrimitiveVariable::Vertex, colorData );
7878

7979
// Adding a separate alpha primvar as according to my test

src/IECoreNuke/SceneCacheReader.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,12 @@ void SceneCacheReader::filterScene( const std::string &filterText, const std::st
818818
m_data->m_itemToFiltered.clear();
819819

820820
// Set the filtered items.
821-
sceneView->setImportedItems( filteredIndices );
821+
std::vector<unsigned int> currentIndices;
822+
sceneView->getImportedItems( currentIndices );
823+
if( currentIndices != filteredIndices )
824+
{
825+
sceneView->setImportedItems( filteredIndices );
826+
}
822827

823828
// Create a mapping of item indices to filtered indices.
824829
for( std::vector<unsigned int>::const_iterator it( filteredIndices.begin() ); it != filteredIndices.end(); ++it )

src/IECoreScene/LinkedScene.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,7 @@ void LinkedScene::writeAttribute( const Name &name, const Object *attribute, dou
700700
{
701701
throw Exception( "Trying to store a broken link!" );
702702
}
703+
m_rootLinkDepth = linkDepth;
703704

704705
// check for child name clashes:
705706
NameList mainSceneChildren;

test/IECoreScene/LinkedSceneTest.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,26 +1094,41 @@ def testCanReadSetNamesAndMembersOfLinkedScene( self ) :
10941094

10951095
r = IECoreScene.SceneCache( sceneFile, IECore.IndexedIO.OpenMode.Read )
10961096
A = r.child( "A" )
1097+
B = A.child( "B" )
10971098

10981099
# Master scene which contains link to above scene
10991100
# C
11001101
# D -> [target.scc, /]
1102+
# E
1103+
# A -> [target.scc, /A]
1104+
# F
1105+
# A
1106+
# B -> [target.scc, /A/B]
11011107

11021108
sceneFile = os.path.join( self.tempDir, "scene.lscc" )
11031109
w = IECoreScene.LinkedScene( sceneFile, IECore.IndexedIO.OpenMode.Write )
11041110
C = w.createChild( "C" )
11051111
D = C.createChild( "D" )
11061112

1113+
E = w.createChild( "E" )
1114+
A1 = E.createChild( "A" )
1115+
1116+
F = w.createChild( "F" )
1117+
A2 = F.createChild( "A" )
1118+
B1 = A2.createChild( "B" )
1119+
1120+
A1.writeLink( A )
11071121
D.writeLink( r )
1122+
B1.writeLink( B )
11081123

1109-
del w, C, D
1124+
del w, C, D, E, F, A1, A2, B1
11101125

11111126
# ok lets read back in our linked scene and try and read the set names
11121127
r = IECoreScene.LinkedScene( sceneFile, IECore.IndexedIO.OpenMode.Read )
11131128
self.assertEqualUnordered( r.setNames(), ['don', 'stew'] )
11141129

1115-
self.assertEqual( r.readSet( "don" ), IECore.PathMatcher(['/C/D/A'] ) )
1116-
self.assertEqual( r.readSet( "stew" ), IECore.PathMatcher(['/C/D/A/B'] ) )
1130+
self.assertEqual( r.readSet( "don" ), IECore.PathMatcher( ['/C/D/A', '/E/A' ] ) )
1131+
self.assertEqual( r.readSet( "stew" ), IECore.PathMatcher( ['/C/D/A/B', '/E/A/B', '/F/A/B' ] ) )
11171132

11181133
self.assertEqualUnordered( r.setNames( includeDescendantSets = False ), [] )
11191134

0 commit comments

Comments
 (0)