Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tileset loaded event #348

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Add tileset loaded event #348

merged 1 commit into from
Jun 16, 2023

Conversation

lilleyse
Copy link
Contributor

@lilleyse lilleyse commented Jun 15, 2023

Adds a tileset loaded event that's broadcasted when the all tiles are loaded for the current view. This will be helpful for #261. Inspired by the implementation in Unreal: CesiumGS/cesium-unreal#906.

To test, add this code to _setup_subscriptions in main_window.py:

        tileset_loaded_event = carb.events.type_from_string("cesium.omniverse.TILESET_LOADED")
        self._subscriptions.append(
            bus.create_subscription_to_pop_by_type(
                tileset_loaded_event,
                lambda _e: self._logger.warn("Cesium tileset loaded {}".format(_e.payload["tilesetPath"])),
                name="cesium.omniverse.TILESET_LOADED",
            )
        )

You'll see "Cesium tileset loaded" messages printed in the console.

loaded.mp4

Copy link
Contributor

@weegeekps weegeekps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lilleyse lilleyse merged commit bcd70e2 into main Jun 16, 2023
3 checks passed
@lilleyse lilleyse deleted the tileset-loaded-event branch June 16, 2023 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants