mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 22:38:48 +08:00
Immediately update viewer when output or cmap changes (#1131)
* Immediately update viewer when output or cmap changes * lint
This commit is contained in:
1 parent
5630148c50
commit
d51718ec2b
1 file changed
+13
@@ -454,6 +454,19 @@ class ViewerState:
|
|||||||
else:
|
else:
|
||||||
self.prev_camera_matrix = camera_object["matrix"]
|
self.prev_camera_matrix = camera_object["matrix"]
|
||||||
self.camera_moving = True
|
self.camera_moving = True
|
||||||
|
|
||||||
|
output_type = self.vis["renderingState/output_choice"].read()
|
||||||
|
if output_type is None:
|
||||||
|
output_type = OutputTypes.INIT
|
||||||
|
if self.prev_output_type != output_type:
|
||||||
|
self.camera_moving = True
|
||||||
|
|
||||||
|
colormap_type = self.vis["renderingState/colormap_choice"].read()
|
||||||
|
if colormap_type is None:
|
||||||
|
colormap_type = ColormapTypes.INIT
|
||||||
|
if self.prev_colormap_type != colormap_type:
|
||||||
|
self.camera_moving = True
|
||||||
|
|
||||||
return camera_object
|
return camera_object
|
||||||
|
|
||||||
def _apply_colormap(self, outputs: Dict[str, Any], colors: torch.Tensor = None, eps=1e-6):
|
def _apply_colormap(self, outputs: Dict[str, Any], colors: torch.Tensor = None, eps=1e-6):
|
||||||
|
|||||||
Reference in new issue
Block a user