Last active
August 1, 2024 07:06
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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