I'm getting this error and am not quite sure how to fix it
Please see below for my code....
def execute(self, context):
for obj in bpy.context.selected_objects:
charlen = 15
namestore_1 = obj.name[:charlen]
bpy.context.scene.objects.active = obj
for ob in bpy.context.scene.objects:
namestore_2 = ob.name[:charlen]
if ob.type == 'MESH':
if str(namestore_1) == (namestore_2):
ob.select = True
else:
ob.select = False
for selected in bpy.context.selected_objects:
if selected.type == 'MESH':
bpy.ops.object.join()
Thanks in advance for any help :) this ones been bugging me for a while!
[edit - updated code slightly for variable in place of number where the character lenght is involved]