Skip to content

Commit

Permalink
#421 Fix error for loose parts
Browse files Browse the repository at this point in the history
  • Loading branch information
Weisl committed Jul 10, 2023
1 parent 4f61e37 commit 88fc15e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions collider_shapes/add_bounding_convex_hull.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def execute(self, context):
convex_collision_data['verts_loc'] = verts_co
collider_data = [convex_collision_data]

bpy.context.view_layer.objects.active = self.active_obj
bpy.ops.object.mode_set(mode='OBJECT')

for convex_collision_data in collider_data:
Expand Down
1 change: 1 addition & 0 deletions collider_shapes/add_collision_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def execute(self, context):
mesh_collider_data['new_collider'] = new_collider
collider_data.append(mesh_collider_data)

bpy.context.view_layer.objects.active = self.active_obj
bpy.ops.object.mode_set(mode='OBJECT')

# Create new collider objects
Expand Down
1 change: 1 addition & 0 deletions collider_shapes/add_collision_remesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def execute(self, context):
mesh_collider_data['new_collider'] = new_collider
collider_data.append(mesh_collider_data)

bpy.context.view_layer.objects.active = self.active_obj
bpy.ops.object.mode_set(mode='OBJECT')

# Create new collider objects
Expand Down

0 comments on commit 88fc15e

Please sign in to comment.