Hello, I’m testing Omniverse libraries and after several days of research and trial and errors, I don’t manage to properly write C++ code that would listen to Object changes that happen into a Live session.
It seems the helloworld example, plus livesession example plus omniUsdaWatcher example all show some elements of it, but I don’t manage to bring this all together. I’m wondering if some of these samples are showing some old concepts about live sessions or maybe I misunderstood the concept (one opens a .live file directly, but I read somewhere else that you should open a USD and then create/join a live session instead). Is there any sample code that I did not find that would illustrate this simple step?
I finally found what was missing on my end. I was taking the omniUsdaWatcher.cpp code and saw this section:
// Subscribe to stat callbacks for the live stage that we're watching
// This isn't absolutely necessary since we have the USD Notices, but
// this would work well for texture or material reload
OmniClientRequestId statSubscribeRequestId = omniClientStatSubscribe(stageUrl.c_str(), &userData, clientStatCallback, clientStatSubscribeCallback);
Well, despite the comment it seems it was not that optional on my end. Having this then triggers the other callbacks. Maybe it is what is missing on your end?