# Hydra StageSceneIndex question

**URL:** <https://forum.aousd.org/t/hydra-stagesceneindex-question/2352>\
**Category:** Hydra\
**Created:** [April 4, 2025, 6:22am UTC](https://forum.aousd.org/t/hydra-stagesceneindex-question/2352 "2025-04-04T06:22:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BaptistePerrin](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/baptisteperrin/32/390_2.png) [@BaptistePerrin](https://forum.aousd.org/u/BaptistePerrin)\
**Post date:** [April 4, 2025, 6:22am UTC](https://forum.aousd.org/t/hydra-stagesceneindex-question/2352/1 "2025-04-04T06:22:06Z")

</div>

Hi guys,

I have a custom Hydra 2.0 implementation and I encountered a weird bug / unexpected situation.  
I have a chain scene indexes that is very close to the one GLEngine is using.  
When I opened the first scen, everything is working as expected. But then when I opened another stage, doing

```auto
				m_stageSceneIndex->SetStage(m_stage);

```

I indeed see that every prim is removed through the \_SendPrimRemoved, but then the HdMergingSceneIndex observer from UsdImaging\_PiPrototypeSceneIndex is sending back \_SendPrimsAdded with all the previous stage, and I ended up with a merged scene, which is not desired.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/aousd/original/1X/94879aecb5b8914f52e96256f4f79a94e1c1cfb3.png)

I check the usdView implementation and it seems that, when changing the stage, the whole GLEngine is deleted and recreated.

Any idea / recommendation ?

Thanks,

Baptiste

---

<div class="post-metadata">

**Author:** ![robp\_sidefx](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/robp_sidefx/32/327_2.png) [@robp\_sidefx](https://forum.aousd.org/u/robp_sidefx)\
**Post date:** [April 5, 2025, 11:11am UTC](https://forum.aousd.org/t/hydra-stagesceneindex-question/2352/2 "2025-04-05T11:11:17Z")

</div>

I’ve replied to your Issue post - [Hydra 2.0 scene index · Issue #3588 · PixarAnimationStudios/OpenUSD · GitHub](https://github.com/PixarAnimationStudios/OpenUSD/issues/3588)
