Skip to content

Instantly share code, notes, and snippets.

@Dylancyclone
Last active August 1, 2024 07:06
Show Gist options
  • Save Dylancyclone/d9bd1b53dbdd02702814661d8d82be5d to your computer and use it in GitHub Desktop.
Save Dylancyclone/d9bd1b53dbdd02702814661d8d82be5d to your computer and use it in GitHub Desktop.
Blender script to clear all Custom Split Normal Data from selected objects. Simply select all the objects and run the script. This is useful when importing a bunch of objects used in game development, such as the output generated from https://github.com/Dylancyclone/VMF2OBJ/
import bpy
selection = bpy.context.selected_objects
for o in selection:
try:
bpy.context.view_layer.objects.active = o
bpy.ops.mesh.customdata_custom_splitnormals_clear()
except:
print("Object has no custom split normals: " + o.name + ", skipping")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment