バージョン:2.8以降
説明:選択したすべてのオブジェクトから、カスタム法線を削除します。
カテゴリ:法線、オブジェクト操作
import bpy
context = bpy.context
scene = context.scene
selected_mesh_objects = [o for o in context.selected_objects if o.type == 'MESH']
for o in selected_mesh_objects:
context.view_layer.objects.active = o
bpy.ops.mesh.customdata_custom_splitnormals_clear()
備考:
context.view_layer.objects.active = o
↑ここでオブジェクトをアクティブにすることで、ループさせた選択物をopsで操作出来るようになります
selected_mesh_objects = [o for o in context.selected_objects if o.type == 'MESH']
↑選択物からメッシュだけを選ぶ