Skip to content

Commit

Permalink
warn when legacy viewerelements are used in new viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrj committed Jan 19, 2024
1 parent 3fdb4fa commit 0d66c8d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nerfstudio/viewer/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,15 @@ def nested_folder_install(folder_labels: List[str], prev_labels: List[str], elem
nested_folder_install(folder_labels[1:], prev_labels + [folder_labels[0]], element)

with control_tab:
from nerfstudio.viewer_legacy.server.viewer_elements import ViewerElement as LegacyViewerElement

if len(parse_object(pipeline, LegacyViewerElement, "Custom Elements")) > 0:
from nerfstudio.utils.rich_utils import CONSOLE

CONSOLE.print(
"Legacy ViewerElements detected in model, please import nerfstudio.viewer.viewer_elements instead",
style="bold yellow",
)
self.viewer_elements = []
self.viewer_elements.extend(parse_object(pipeline, ViewerElement, "Custom Elements"))
for param_path, element in self.viewer_elements:
Expand Down

0 comments on commit 0d66c8d

Please sign in to comment.