From 9a24de2628088a26d8940d1eed4a7006ea1d3275 Mon Sep 17 00:00:00 2001 From: IgorTatarnikov Date: Mon, 30 Oct 2023 11:04:57 +0000 Subject: [PATCH] Potential fix for test_ruler_from_surface, removing transformation fixes a lot of the transposition bugs --- brainrender/actors/ruler.py | 2 +- brainrender/render.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/brainrender/actors/ruler.py b/brainrender/actors/ruler.py index f32a5cfa..f4a98f9d 100644 --- a/brainrender/actors/ruler.py +++ b/brainrender/actors/ruler.py @@ -66,7 +66,7 @@ def ruler_from_surface( p2 = p1.copy() p2[axis] = 0 # zero the chosen coordinate - pts = root.mesh.intersectWithLine(p1, p2) + pts = root.mesh.intersect_with_line(p1, p2) surface_point = pts[0] return ruler(p1, surface_point, unit_scale=unit_scale, units=units, s=s) diff --git a/brainrender/render.py b/brainrender/render.py index adca0083..b2dcc0d1 100644 --- a/brainrender/render.py +++ b/brainrender/render.py @@ -129,7 +129,7 @@ def _prepare_actor(self, actor): if not actor._is_transformed: try: actor._mesh = actor.mesh.clone() - actor._mesh.apply_transform(mtx) + # actor._mesh.apply_transform(mtx) except AttributeError: # some types of actors don't transform logger.debug( f'Failed to transform actor: "{actor.name} (type: {actor.br_class})"'