Skip to content

Commit 86fffdd

Browse files
authored
Merge pull request #1513 from johnhaddon/usdPrimPathMessages
USD CurvesAlgo, MeshAlgo : Add prim path to warnings
2 parents 5db57ee + ca8eb36 commit 86fffdd

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
10.6.x.x (relative to 10.6.3.1)
22
========
33

4+
Improvements
5+
------------
46

7+
- USDScene : Added prim path to warnings when reading curves and meshes.
58

69
10.6.3.1 (relative to 10.6.3.0)
710
========

contrib/IECoreUSD/src/IECoreUSD/CurvesAlgo.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ IECore::ObjectPtr readBasisCurves( pxr::UsdGeomBasisCurves &curves, pxr::UsdTime
110110
}
111111
else
112112
{
113-
IECore::msg( IECore::Msg::Warning, "USDScene", boost::format( "Unsupported basis \"%1%\"" ) % usdBasis );
113+
IECore::msg(
114+
IECore::Msg::Warning, "USDScene",
115+
boost::format( "Unsupported basis \"%1%\" reading \"%2%\"" )
116+
% usdBasis % curves.GetPath()
117+
);
114118
}
115119
}
116120

@@ -125,7 +129,11 @@ IECore::ObjectPtr readBasisCurves( pxr::UsdGeomBasisCurves &curves, pxr::UsdTime
125129
}
126130
else if( wrap != pxr::UsdGeomTokens->nonperiodic )
127131
{
128-
IECore::msg( IECore::Msg::Warning, "USDScene", boost::format( "Unsupported wrap \"%1%\"" ) % wrap );
132+
IECore::msg(
133+
IECore::Msg::Warning, "USDScene",
134+
boost::format( "Unsupported wrap \"%1%\" reading \"%2%\"" )
135+
% wrap % curves.GetPath()
136+
);
129137
}
130138

131139
return readCurves( curves, time, basis, periodic, canceller );
@@ -205,7 +213,9 @@ bool writeCurves( const IECoreScene::CurvesPrimitive *curves, const pxr::UsdStag
205213
}
206214
else if ( curves->basis() != CubicBasisf::linear() )
207215
{
208-
IECore::msg( IECore::Msg::Warning, "USDScene", "Unsupported basis" );
216+
IECore::msg(
217+
IECore::Msg::Warning, "USDScene", boost::format( "Unsupported basis writing \"%1%\"" ) % path
218+
);
209219
}
210220

211221
if( !basis.IsEmpty() )

contrib/IECoreUSD/src/IECoreUSD/MeshAlgo.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ IECore::ObjectPtr readMesh( pxr::UsdGeomMesh &mesh, pxr::UsdTimeCode time, const
141141
// within a single crease, rather than just a sharpness per crease. We don't know how
142142
// we would author one of these in practice (certainly not in Maya), and we're not sure
143143
// why we'd want to. For now we ignore them.
144-
IECore::msg( IECore::Msg::Warning, "USDScene", "Ignoring creases with varying sharpness" );
144+
IECore::msg(
145+
IECore::Msg::Warning, "USDScene",
146+
boost::format( "Ignoring creases with varying sharpness on \"%1%\"" ) % mesh.GetPath()
147+
);
145148
}
146149
}
147150

0 commit comments

Comments
 (0)