Skip to content

Commit

Permalink
#474 Fix Suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
Weisl committed Jan 31, 2024
1 parent 8e1c512 commit 5bebd5a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions collider_shapes/add_bounding_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,21 @@ def set_object_collider_group(self, obj):

def set_collider_name(self, new_collider, parent_name):
new_name = self.collider_name(basename=parent_name)
prefs = self.prefs

#Ignore rigid body in base_name
if prefs.rigid_body_extension:
if prefs.rigid_body_naming_position == 'SUFFIX':
end = prefs.rigid_body_separator + prefs.rigid_body_extension
if new_name.endswith(end):
new_name = new_name[:-(len(end))]

else:
start = prefs.rigid_body_extension + prefs.rigid_body_separator
if new_name.startswith(start):
new_name = new_name[len(start):]


new_collider.name = new_name
self.set_data_name(new_collider, new_name, self.data_suffix)

Expand Down

0 comments on commit 5bebd5a

Please sign in to comment.