Since Blender 2.93 hair system not support curves anymore, I have to convert them to meshes.
Trying to replace bpy.ops.object.convert(target='MESH')
with obj.to_mesh() function. but, It is not able to keep attributes like the ops option can.
any ideas? thanks
import bpy
try :
hair_colection = bpy.data.collections['Hairs']
hairs_objects = hair_colection.all_objects
for hair in hairs_objects:
if hair.type == 'CURVE':
hair.select_set(True)
bpy.context.view_layer.objects.active = hair
bpy.ops.object.convert(target='MESH')
print (hair,hair.type)
except:
print( "no hairs collection")