diff --git a/nerfstudio/viewer/app/src/reducer.js b/nerfstudio/viewer/app/src/reducer.js index d8335c80d..76a21fbb8 100644 --- a/nerfstudio/viewer/app/src/reducer.js +++ b/nerfstudio/viewer/app/src/reducer.js @@ -71,9 +71,6 @@ const initialState = { }; function setData(newState, state, path, data) { - if (path === 'colormap_options') { - newState.colormap_choice = 'default'; // eslint-disable-line no-param-reassign - } if (path.length === 1) { newState[path[0]] = data; // eslint-disable-line no-param-reassign } else { diff --git a/nerfstudio/viewer/server/viewer_utils.py b/nerfstudio/viewer/server/viewer_utils.py index 37580c7e1..79370b184 100644 --- a/nerfstudio/viewer/server/viewer_utils.py +++ b/nerfstudio/viewer/server/viewer_utils.py @@ -753,10 +753,12 @@ class ViewerState: if self.output_type_changed or self.prev_colormap_type is None: self.prev_colormap_type = ColormapTypes.DEFAULT colormap_options = [] + self.vis["renderingState/colormap_options"].write(list(ColormapTypes)) if outputs[reformatted_output].shape[-1] == 3: colormap_options = [ColormapTypes.DEFAULT] if outputs[reformatted_output].shape[-1] == 1 and outputs[reformatted_output].dtype == torch.float: - colormap_options = list(ColormapTypes) + self.prev_colormap_type = ColormapTypes.TURBO + colormap_options = list(ColormapTypes)[1:] self.output_type_changed = False self.vis["renderingState/colormap_choice"].write(self.prev_colormap_type) self.vis["renderingState/colormap_options"].write(colormap_options)