"""pytorch3d.vis.plotly_vis stub with catch-all.""" import warnings from collections import namedtuple def __getattr__(name): if name.startswith("__") and name.endswith("__"): raise AttributeError(name) # Return a callable dummy for any missing name def _dummy(*a, **kw): return None _dummy.__name__ = name return _dummy def plot_scene(plots, **kwargs): return None def get_camera_wireframe(**kwargs): return None # These need to be namedtuples with _asdict() support because plot_scene.py calls ._asdict() AxisArgs = namedtuple("AxisArgs", ["showgrid", "backgroundcolor", "showticklabels", "tickcolor", "gridcolor", "zeroline"], defaults=[True, "rgb(230,230,230)", True, "black", "rgb(200,200,200)", False]) Lighting = namedtuple("Lighting", ["ambient", "diffuse", "specular", "roughness", "fresnel"], defaults=[0.5, 1.0, 0.3, 0.5, 0.2]) # Explicitly define all private functions that plot_scene imports def _add_camera_trace(fig, cameras, trace_name, subplot_idx, ncols, camera_scale, **kw): pass def _add_pointcloud_trace(fig, pointclouds, trace_name, subplot_idx, ncols, max_points=20000, marker_size=1, **kw): pass def _add_ray_bundle_trace(fig, ray_bundle, trace_name, subplot_idx, ncols, *a, **kw): pass def _is_ray_bundle(obj): return False def _scale_camera_to_bounds(value, vrange, is_position): return value def _update_axes_bounds(verts_center, max_expand, current_layout): pass