Skip to content

Commit

Permalink
Potential fix for test_ruler_from_surface, removing transformation fi…
Browse files Browse the repository at this point in the history
…xes a lot of the transposition bugs
  • Loading branch information
IgorTatarnikov committed Oct 30, 2023
1 parent 3cf712a commit 9a24de2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion brainrender/actors/ruler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion brainrender/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})"'
Expand Down

0 comments on commit 9a24de2

Please sign in to comment.