From 0da37ae6e742728b30e79be1813fc1ac12260bad Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 8 Dec 2021 12:02:42 +0100 Subject: [PATCH] Revert "Workaround for if layer is None somehow." This reverts commit f0cb9dd39ef996225ebd6d7b8d5ffc986c90e2f0. --- plugins/SimulationView/SimulationPass.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/SimulationView/SimulationPass.py b/plugins/SimulationView/SimulationPass.py index 495feb6fd3..86cf643e08 100644 --- a/plugins/SimulationView/SimulationPass.py +++ b/plugins/SimulationView/SimulationPass.py @@ -172,8 +172,7 @@ class SimulationPass(RenderPass): # where a type-chage occurs. However, the shader expects vertices to have only one type. In order to # fix this, those vertices are duplicated. This introduces a discrepancy that we have to take into # account, which is done by the type-change-count. - layer = layer_data.getLayer(self._layer_view._current_layer_num) - type_change_count = 0 if layer is None else layer.lineMeshCumulativeTypeChangeCount(max(self._layer_view._current_path_num - 1, 0)) + type_change_count = layer_data.getLayer(self._layer_view._current_layer_num).lineMeshCumulativeTypeChangeCount(max(self._layer_view._current_path_num - 1, 0)) current_layer_start = end current_layer_end = current_layer_start + self._layer_view._current_path_num + current_polygon_offset + type_change_count