@@ -0,0 +1,511 @@
+# This script aligns the normals of an object, trying to make them%0A# face outwards. The object should be fully closed and not%0A# self-intersecting.%0A%0Aimport c4d%0Aimport c4ddev%0Aalign = c4ddev.require('c4dtools/misc/normalalign')%0A%0Adef main():%0A  if not op or not op.CheckType(c4d.Opolygon):%0A    c4d.gui.MessageDialog(%22select a Polygon Object%22)%0A    return%0A%0A  doc.StartUndo()%0A  doc.AddUndo(c4d.UNDOTYPE_CHANGE, op)%0A  doc.EndUndo()%0A  c4d.EventAdd()%0A%0A  align.align_object_normals(op)%0A%0Aif __name__ == '__main__':%0A  main()%0A

add examples/scripts/align-normals.py