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

use fos utility function for parsing scene json #4237

Merged
merged 2 commits into from
Apr 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
use fos.read_json instead
  • Loading branch information
sashankaryal committed Apr 5, 2024
commit cea9a3d099c30de9d048f0a65bd39fb585b75f7f
5 changes: 3 additions & 2 deletions fiftyone/core/threed/scene_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

from pydantic.dataclasses import dataclass

import fiftyone.core.storage as fos

from .camera import PerspectiveCamera
from .lights import Light
from .mesh import FbxMesh, GltfMesh, ObjMesh, PlyMesh, StlMesh
Expand Down Expand Up @@ -334,7 +336,6 @@ def from_fo3d(path: str):
if not path.endswith(".fo3d"):
raise ValueError("Scene must be loaded from a .fo3d file")

with open(path, "r") as f:
dict_data = json.load(f)
dict_data = fos.read_json(path)

return Scene._from_fo3d_dict(dict_data)
Loading