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

Track all viser GUI folders to avoid folder duplicates (viewer-beta) #2466

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

chungmin99
Copy link
Contributor

With the current "Custom Elements" folder generation, you end up with duplicate folder structures like below:

Given this ViewerText in nerfacto.py
image
The folder appears as
image

This is because viser's gui_add_folder creates a unique ID for every folder -- there can exist two folders with the exact same names, but with different IDs --> duplicate structures.

with self.viser_server.add_gui_folder(folder_labels[0]):

This PR changes the viewer element population code to keep track of all the generated folders (with their respective paths), so that the previously folder contexts are used instead of re-generating them (if applicable).

With the PR the structure should be fixed:
image
, with it also working for nested structures as expected (adding ViewerTexts in nerfacto_field.py):
image

Copy link
Collaborator

@kerrj kerrj left a comment

Choose a reason for hiding this comment

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

sgtm!

@chungmin99 chungmin99 merged commit 4cdeaa6 into main Sep 25, 2023
4 checks passed
@chungmin99 chungmin99 deleted the cmk/beta_folder_bug branch September 25, 2023 20:14
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.

2 participants