@@ -154,27 +154,27 @@ bool writeCamera( const IECoreScene::Camera *camera, const pxr::UsdStagePtr &sta
154154 auto usdCamera = pxr::UsdGeomCamera::Define ( stage, path );
155155 if ( camera->getProjection () == " orthographic" )
156156 {
157- usdCamera.GetProjectionAttr ().Set ( pxr::UsdGeomTokens->orthographic );
157+ usdCamera.GetProjectionAttr ().Set ( pxr::UsdGeomTokens->orthographic , time );
158158
159159 // For ortho cameras, USD uses aperture units of tenths of scene units
160- usdCamera.GetHorizontalApertureAttr ().Set ( 10 .0f * camera->getAperture ()[0 ] );
161- usdCamera.GetVerticalApertureAttr ().Set ( 10 .0f * camera->getAperture ()[1 ] );
162- usdCamera.GetHorizontalApertureOffsetAttr ().Set ( 10 .0f * camera->getApertureOffset ()[0 ] );
163- usdCamera.GetVerticalApertureOffsetAttr ().Set ( 10 .0f * camera->getApertureOffset ()[1 ] );
160+ usdCamera.GetHorizontalApertureAttr ().Set ( 10 .0f * camera->getAperture ()[0 ], time );
161+ usdCamera.GetVerticalApertureAttr ().Set ( 10 .0f * camera->getAperture ()[1 ], time );
162+ usdCamera.GetHorizontalApertureOffsetAttr ().Set ( 10 .0f * camera->getApertureOffset ()[0 ], time );
163+ usdCamera.GetVerticalApertureOffsetAttr ().Set ( 10 .0f * camera->getApertureOffset ()[1 ], time );
164164 }
165165 else if ( camera->getProjection () == " perspective" )
166166 {
167- usdCamera.GetProjectionAttr ().Set ( pxr::UsdGeomTokens->perspective );
167+ usdCamera.GetProjectionAttr ().Set ( pxr::UsdGeomTokens->perspective , time );
168168
169169 // We store focalLength and aperture in arbitary units. USD uses tenths
170170 // of scene units
171171 float scale = 10 .0f * camera->getFocalLengthWorldScale ();
172172
173- usdCamera.GetFocalLengthAttr ().Set ( camera->getFocalLength () * scale );
174- usdCamera.GetHorizontalApertureAttr ().Set ( camera->getAperture ()[0 ] * scale );
175- usdCamera.GetVerticalApertureAttr ().Set ( camera->getAperture ()[1 ] * scale );
176- usdCamera.GetHorizontalApertureOffsetAttr ().Set ( camera->getApertureOffset ()[0 ] * scale );
177- usdCamera.GetVerticalApertureOffsetAttr ().Set ( camera->getApertureOffset ()[1 ] * scale );
173+ usdCamera.GetFocalLengthAttr ().Set ( camera->getFocalLength () * scale, time );
174+ usdCamera.GetHorizontalApertureAttr ().Set ( camera->getAperture ()[0 ] * scale, time );
175+ usdCamera.GetVerticalApertureAttr ().Set ( camera->getAperture ()[1 ] * scale, time );
176+ usdCamera.GetHorizontalApertureOffsetAttr ().Set ( camera->getApertureOffset ()[0 ] * scale, time );
177+ usdCamera.GetVerticalApertureOffsetAttr ().Set ( camera->getApertureOffset ()[1 ] * scale, time );
178178 }
179179 else
180180 {
@@ -185,9 +185,9 @@ bool writeCamera( const IECoreScene::Camera *camera, const pxr::UsdStagePtr &sta
185185 );
186186 }
187187
188- usdCamera.GetClippingRangeAttr ().Set ( pxr::GfVec2f ( camera->getClippingPlanes ().getValue () ) );
189- usdCamera.GetFStopAttr ().Set ( camera->getFStop () );
190- usdCamera.GetFocusDistanceAttr ().Set ( camera->getFocusDistance () );
188+ usdCamera.GetClippingRangeAttr ().Set ( pxr::GfVec2f ( camera->getClippingPlanes ().getValue () ), time );
189+ usdCamera.GetFStopAttr ().Set ( camera->getFStop (), time );
190+ usdCamera.GetFocusDistanceAttr ().Set ( camera->getFocusDistance (), time );
191191
192192 if ( camera->hasShutter () )
193193 {
@@ -197,8 +197,8 @@ bool writeCamera( const IECoreScene::Camera *camera, const pxr::UsdStagePtr &sta
197197 // / and Houdini plugin sources, I've been unable to find evidence for
198198 // / anyone else doing this though, so maybe it's one of those things
199199 // / everyone is just getting wrong?
200- usdCamera.GetShutterOpenAttr ().Set ( (double )camera->getShutter ()[0 ] );
201- usdCamera.GetShutterCloseAttr ().Set ( (double )camera->getShutter ()[1 ] );
200+ usdCamera.GetShutterOpenAttr ().Set ( (double )camera->getShutter ()[0 ], time );
201+ usdCamera.GetShutterCloseAttr ().Set ( (double )camera->getShutter ()[1 ], time );
202202 }
203203
204204 return true ;
0 commit comments