File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
contrib/IECoreAlembic/src/IECoreAlembic Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1110.5.x.x (relative to 10.5.13.1)
22========
33
4+ Fixes
5+ -----
46
7+ - Alembic : Fixed crashes caused by invalid UVs.
58
6910.5.13.1 (relative to 10.5.13.0)
710=========
Original file line number Diff line number Diff line change @@ -150,8 +150,23 @@ class MeshReader : public PrimitiveReader
150150 }
151151 }
152152
153- PrimitiveVariable::Interpolation interpolation = PrimitiveReader::interpolation ( uvs.getScope () );
154- primitive->variables [" uv" ] = PrimitiveVariable ( interpolation, uvData, indexData );
153+ const PrimitiveVariable primitiveVariable ( PrimitiveReader::interpolation ( uvs.getScope () ), uvData, indexData );
154+ if ( primitive->isPrimitiveVariableValid ( primitiveVariable ) )
155+ {
156+ primitive->variables [" uv" ] = primitiveVariable;
157+ }
158+ else
159+ {
160+ IECore::msg (
161+ IECore::Msg::Warning, " PrimitiveReader::readGeomParam" ,
162+ boost::format (
163+ " Ignoring invalid \" uv\" property on object \" %1%\" (size %2%, expected %3%)"
164+ )
165+ % uvs.getParent ().getObject ().getFullName ()
166+ % ( indexData ? indexData->readable ().size () : uvData->readable ().size () )
167+ % primitive->variableSize ( primitiveVariable.interpolation )
168+ );
169+ }
155170 }
156171
157172};
You can’t perform that action at this time.
0 commit comments