ViewportWidget Multiple Textures Error


I have a simple kit app that creates a ViewportWidget from omni.kit.widget.viewport, but when I click Ctrl+S in VSCode to restart my kit app, it crashes with this error:

[Error] [omni.kit.widget.viewport.impl.texture] Multiple textures for pxr engine is not currently supported

After debugging, I realized this comes from function __set_hd_engine at file, where those two variables are different:

  • pxr_in_use = ‘/plugins/omni.hydratexture.plugin/omni_kit_widget_viewport_ViewportTexture_0/’
  • pxr_in_use_value =‘/plugins/omni.hydratexture.plugin/omni_kit_widget_viewport_ViewportTexture_1/’

I’ve seen that there is an incremental global variable (ViewportTexture.__g_hd_texture_counter) that makes those names different, how can I overcome this issue?

My kit app is so simple I don’t believe I need to upload code.

PD: I only activated and enabled pxr render engine settings in kit file.


Solved with this code.

    def on_shutdown(self):

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.