@@ -48,6 +48,7 @@ HdChangeTracker::HdChangeTracker()
4848 , _rprimRenderTagVersion(1 )
4949 , _taskRenderTagsVersion(1 )
5050 , _emulationSceneIndex(nullptr )
51+ , _disableEmulationAPI(false )
5152{
5253 /* NOTHING*/
5354}
@@ -127,6 +128,10 @@ HdChangeTracker::MarkRprimDirty(SdfPath const& id, HdDirtyBits bits)
127128 _emulationSceneIndex->DirtyPrims ({{id, locators}});
128129 }
129130 } else {
131+ if (_disableEmulationAPI) {
132+ TF_CODING_ERROR (
133+ " Calling method on HdChangeTracker that requires emulation." );
134+ }
130135 // XXX: During the migration, "DirtyPrimvar" implies DirtyPoints/etc.
131136 if (bits & DirtyPrimvar) {
132137 bits |= DirtyPoints | DirtyNormals | DirtyWidths;
@@ -409,6 +414,10 @@ HdChangeTracker::MarkTaskDirty(SdfPath const& id, HdDirtyBits bits)
409414 _emulationSceneIndex->DirtyPrims ({{id, locators}});
410415 }
411416 } else {
417+ if (_disableEmulationAPI) {
418+ TF_CODING_ERROR (
419+ " Calling method on HdChangeTracker that requires emulation." );
420+ }
412421 _MarkTaskDirty (id, bits);
413422 }
414423}
@@ -496,6 +505,10 @@ HdChangeTracker::MarkInstancerDirty(SdfPath const& id, HdDirtyBits bits)
496505 _emulationSceneIndex->DirtyPrims ({{id, locators}});
497506 }
498507 } else {
508+ if (_disableEmulationAPI) {
509+ TF_CODING_ERROR (
510+ " Calling method on HdChangeTracker that requires emulation." );
511+ }
499512 _MarkInstancerDirty (id, bits);
500513 }
501514}
@@ -623,6 +636,10 @@ HdChangeTracker::MarkSprimDirty(SdfPath const& id, HdDirtyBits bits)
623636 _emulationSceneIndex->DirtyPrims ({{id, locators}});
624637 }
625638 } else {
639+ if (_disableEmulationAPI) {
640+ TF_CODING_ERROR (
641+ " Calling method on HdChangeTracker that requires emulation." );
642+ }
626643 _MarkSprimDirty (id, bits);
627644 }
628645}
@@ -720,6 +737,10 @@ HdChangeTracker::MarkBprimDirty(SdfPath const& id, HdDirtyBits bits)
720737 _emulationSceneIndex->DirtyPrims ({{id, locators}});
721738 }
722739 } else {
740+ if (_disableEmulationAPI) {
741+ TF_CODING_ERROR (
742+ " Calling method on HdChangeTracker that requires emulation." );
743+ }
723744 _MarkBprimDirty (id, bits);
724745 }
725746}
@@ -993,6 +1014,11 @@ HdChangeTracker::MarkAllRprimsDirty(HdDirtyBits bits)
9931014 return ;
9941015 }
9951016
1017+ if (_disableEmulationAPI) {
1018+ TF_CODING_ERROR (
1019+ " Calling method on HdChangeTracker that requires emulation." );
1020+ }
1021+
9961022 //
9971023 // This function runs similar to calling MarkRprimDirty on every prim.
9981024 // First it checks to see if the request will set any new dirty bits that
@@ -1286,5 +1312,11 @@ HdChangeTracker::_SetTargetSceneIndex(HdRetainedSceneIndex *emulationSceneIndex)
12861312 _emulationSceneIndex = emulationSceneIndex;
12871313}
12881314
1315+ void
1316+ HdChangeTracker::_SetDisableEmulationAPI (bool disable)
1317+ {
1318+ _disableEmulationAPI = disable;
1319+ }
1320+
12891321PXR_NAMESPACE_CLOSE_SCOPE
12901322
0 commit comments