why is this code not working some_comp_node.name = some_comp_node.name.strip(“0”), i want to remove the zeros from suffixes .001 .002 .003 and so on.
i have tried storing the obj name in a variable first, str = some_comp_node.name
some_comp_node.name = str.strip(“0”)
`for obj in whatever:
if “.” in render_node.name:
suffix = obj.name[-3:]
stripp = obj.strip(suffix)
obj.name = stripp+ str(counter1)
if counter1 <= len( number_of_selected_objects):
counter1 += 1´
as part of a loop, and worked just fine.
i’m sure
obj.name = obj.name.replace(“0”,"") should do the job, how ever im no sure if it would give the unwanted result to leave a blank space in between the dot and the number. like so “obj_name. 1”