@@ -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
966966Imath::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
971971ConstObjectPtr 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
976976SceneInterface::Name USDScene::name () const
@@ -1008,7 +1008,7 @@ void USDScene::writeBound( const Imath::Box3d &bound, double time )
10081008 extent.push_back ( DataAlgo::toUSD ( Imath::V3f ( bound.max ) ) );
10091009
10101010 pxr::UsdAttribute extentAttr = boundable.CreateExtentAttr ();
1011- extentAttr.Set ( pxr::VtValue ( extent ) );
1011+ extentAttr.Set ( pxr::VtValue ( extent ), m_root-> timeCode ( time ) );
10121012}
10131013
10141014void USDScene::writeTransform ( const Data *transform, double time )
@@ -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 {
@@ -1341,7 +1341,7 @@ void USDScene::writeAttribute( const SceneInterface::Name &name, const Object *a
13411341 pxr::TfToken ( g.first .string ().substr ( 10 ) ),
13421342 DataAlgo::valueTypeName ( d )
13431343 );
1344- globalAttribute.Set ( DataAlgo::toUSD ( d ) );
1344+ globalAttribute.Set ( DataAlgo::toUSD ( d ), m_root-> timeCode ( time ) );
13451345 }
13461346 }
13471347 }
@@ -1357,14 +1357,14 @@ void USDScene::writeAttribute( const SceneInterface::Name &name, const Object *a
13571357 pxr::UsdGeomPrimvar usdPrimvar = primvarsAPI.CreatePrimvar (
13581358 usdName.name , DataAlgo::valueTypeName ( data ), pxr::UsdGeomTokens->constant
13591359 );
1360- usdPrimvar.Set ( DataAlgo::toUSD ( data ), time );
1360+ usdPrimvar.Set ( DataAlgo::toUSD ( data ), m_root-> timeCode ( time ) );
13611361 }
13621362 else
13631363 {
13641364 pxr::UsdAttribute newAttribute = m_location->prim .CreateAttribute (
13651365 usdName.name , DataAlgo::valueTypeName ( data )
13661366 );
1367- newAttribute.Set ( DataAlgo::toUSD ( data ), time );
1367+ newAttribute.Set ( DataAlgo::toUSD ( data ), m_root-> timeCode ( time ) );
13681368 }
13691369 }
13701370 }
@@ -1488,7 +1488,7 @@ PrimitiveVariableMap USDScene::readObjectPrimitiveVariables( const std::vector<I
14881488
14891489void 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