Skip to content

Commit c48e744

Browse files
authored
Merge pull request #1377 from lucienfostier/caribouFollowUp
Caribou follow up
2 parents 45a3975 + 0e287d7 commit c48e744

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

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 )

0 commit comments

Comments
 (0)