Skip to content

Commit ea49e91

Browse files
committed
Convert: Support for DD::Image::Vector4 to Imath.Color4f
1 parent e4024bf commit ea49e91

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/IECoreNuke/Convert.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ IECORENUKE_API Imath::V3f convert( const DD::Image::Vector4 &from );
112112
template<>
113113
IECORENUKE_API Imath::Color3f convert( const DD::Image::Vector4 &from );
114114

115+
template<>
116+
IECORENUKE_API Imath::Color4f convert( const DD::Image::Vector4 &from );
117+
115118
/// Discards from.w
116119
template<>
117120
IECORENUKE_API Imath::V3d convert( const DD::Image::Vector4 &from );

src/IECoreNuke/Convert.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ Imath::Color3f convert( const DD::Image::Vector4 &from )
121121
return Imath::Color3f( from.x, from.y, from.z );
122122
}
123123

124+
template<>
125+
Imath::Color4f convert( const DD::Image::Vector4 &from )
126+
{
127+
return Imath::Color4f( from.x, from.y, from.z, from.w );
128+
}
129+
124130
template<>
125131
Imath::M44f convert( const DD::Image::Matrix4 &from )
126132
{

0 commit comments

Comments
 (0)