Skip to content

Commit

Permalink
fix: fix transition schedule overrides that I accidentally broke in t…
Browse files Browse the repository at this point in the history
…he previous release
  • Loading branch information
ntamas committed Dec 23, 2024
1 parent 60a2fff commit c125388
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ def calculate_departure_index_of_drone(
return drone_index if previous_entry_index == 0 else 0

previous_obj = previous_constraint.target
previous_mesh = cast(Mesh, previous_obj.data)

if previous_constraint.subtarget:
# The constraint targets a vertex group of the object and the
Expand All @@ -384,6 +383,7 @@ def calculate_departure_index_of_drone(
# fails, we will iterate over all vertices in the mesh to find the one
# that is in the vertex group.
vertex_index = _vertex_group_name_to_vertex_index(previous_constraint.subtarget)
previous_mesh = cast(Mesh, previous_obj.data)
if vertex_index is not None:
previous_target = previous_mesh.vertices[vertex_index]
else:
Expand All @@ -399,7 +399,7 @@ def calculate_departure_index_of_drone(
return 0

else:
previous_target = previous_mesh
previous_target = previous_constraint.target

return targets_in_previous_formation.find(previous_target)

Expand Down

0 comments on commit c125388

Please sign in to comment.