Skip to content

Commit f530b71

Browse files
committed
USDScene : Rename getTime() to timeCode()
Hopefully this makes it a little bit clearer what is being returned.
1 parent d4569e5 commit f530b71

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

contrib/IECoreUSD/src/IECoreUSD/USDScene.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ class USDScene::IO : public RefCounted
711711
return m_stage;
712712
}
713713

714-
pxr::UsdTimeCode getTime( double timeSeconds ) const
714+
pxr::UsdTimeCode timeCode( double timeSeconds ) const
715715
{
716716
return timeSeconds * m_timeCodesPerSecond;
717717
}
@@ -937,7 +937,7 @@ Imath::Box3d USDScene::readBound( double time ) const
937937
}
938938

939939
pxr::VtArray<pxr::GfVec3f> extents;
940-
attr.Get( &extents, m_root->getTime( time ) );
940+
attr.Get( &extents, m_root->timeCode( time ) );
941941

942942
// When coming from UsdGeomModelAPI, `extents` may contain several bounds,
943943
// on a per-purpose basis. Take the union, since the SceneInterface API only
@@ -965,12 +965,12 @@ ConstDataPtr USDScene::readTransform( double time ) const
965965

966966
Imath::M44d USDScene::readTransformAsMatrix( double time ) const
967967
{
968-
return localTransform( m_location->prim, m_root->getTime( time ) );
968+
return localTransform( m_location->prim, m_root->timeCode( time ) );
969969
}
970970

971971
ConstObjectPtr USDScene::readObject( double time, const Canceller *canceller ) const
972972
{
973-
return ObjectAlgo::readObject( m_location->prim, m_root->getTime( time ), canceller );
973+
return ObjectAlgo::readObject( m_location->prim, m_root->timeCode( time ), canceller );
974974
}
975975

976976
SceneInterface::Name USDScene::name() const
@@ -1023,7 +1023,7 @@ void USDScene::writeTransform( const Data *transform, double time )
10231023
if( xformable )
10241024
{
10251025
pxr::UsdGeomXformOp transformOp = xformable.MakeMatrixXform();
1026-
const pxr::UsdTimeCode timeCode = m_root->getTime( time );
1026+
const pxr::UsdTimeCode timeCode = m_root->timeCode( time );
10271027
transformOp.Set( DataAlgo::toUSD( m44->readable() ), timeCode );
10281028
}
10291029
}
@@ -1182,7 +1182,7 @@ ConstObjectPtr USDScene::readAttribute( const SceneInterface::Name &name, double
11821182
{
11831183
return nullptr;
11841184
}
1185-
pxr::TfToken value; attr.Get( &value, m_root->getTime( time ) );
1185+
pxr::TfToken value; attr.Get( &value, m_root->timeCode( time ) );
11861186
if( value == pxr::UsdGeomTokens->inherited )
11871187
{
11881188
return new BoolData( true );
@@ -1227,15 +1227,15 @@ ConstObjectPtr USDScene::readAttribute( const SceneInterface::Name &name, double
12271227
{
12281228
pxr::UsdAttribute attr = pxr::UsdGeomGprim( m_location->prim ).GetDoubleSidedAttr();
12291229
bool doubleSided;
1230-
if( attr.HasAuthoredValue() && attr.Get( &doubleSided, m_root->getTime( time ) ) )
1230+
if( attr.HasAuthoredValue() && attr.Get( &doubleSided, m_root->timeCode( time ) ) )
12311231
{
12321232
return new BoolData( doubleSided );
12331233
}
12341234
return nullptr;
12351235
}
12361236
else if( pxr::UsdAttribute attribute = AttributeAlgo::findUSDAttribute( m_location->prim, name.string() ) )
12371237
{
1238-
return DataAlgo::fromUSD( attribute, m_root->getTime( time ) );
1238+
return DataAlgo::fromUSD( attribute, m_root->timeCode( time ) );
12391239
}
12401240
else
12411241
{
@@ -1260,7 +1260,7 @@ void USDScene::writeAttribute( const SceneInterface::Name &name, const Object *a
12601260
pxr::UsdGeomImageable imageable( m_location->prim );
12611261
imageable.GetVisibilityAttr().Set(
12621262
data->readable() ? pxr::UsdGeomTokens->inherited : pxr::UsdGeomTokens->invisible,
1263-
m_root->getTime( time )
1263+
m_root->timeCode( time )
12641264
);
12651265
}
12661266
}
@@ -1293,7 +1293,7 @@ void USDScene::writeAttribute( const SceneInterface::Name &name, const Object *a
12931293
pxr::UsdGeomGprim gprim( m_location->prim );
12941294
if( gprim )
12951295
{
1296-
gprim.GetDoubleSidedAttr().Set( data->readable(), m_root->getTime( time ) );
1296+
gprim.GetDoubleSidedAttr().Set( data->readable(), m_root->timeCode( time ) );
12971297
}
12981298
else
12991299
{
@@ -1488,7 +1488,7 @@ PrimitiveVariableMap USDScene::readObjectPrimitiveVariables( const std::vector<I
14881488

14891489
void USDScene::writeObject( const Object *object, double time )
14901490
{
1491-
if( !ObjectAlgo::writeObject( object, m_root->getStage(), m_location->prim.GetPath(), m_root->getTime( time ) ) )
1491+
if( !ObjectAlgo::writeObject( object, m_root->getStage(), m_location->prim.GetPath(), m_root->timeCode( time ) ) )
14921492
{
14931493
IECore::msg(
14941494
IECore::Msg::Warning, "USDScene::writeObject",

0 commit comments

Comments
 (0)