Skip to content

Commit 6da526c

Browse files
committed
FromNukePointsConverter: Convert Nuke Color4f to 3f as supported by Gaffer
1 parent 225c6fa commit 6da526c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
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

0 commit comments

Comments
 (0)