Cleanup: Remove more #if 0 blocks
[blender.git] / source / blender / blenkernel / intern / library.c
index a209b2a..a34ebcd 100644 (file)
@@ -1373,6 +1373,9 @@ void BKE_libblock_init_empty(ID *id)
                        /* Should not be needed - animation from lib pre-2.5 is broken anyway. */
                        BLI_assert(0);
                        break;
+               case ID_PAL:
+                       BKE_palette_init((Palette *)id);
+                       break;
                default:
                        BLI_assert(0);  /* Should never reach this point... */
        }
@@ -1979,15 +1982,6 @@ bool new_id(ListBase *lb, ID *id, const char *tname)
        result = check_for_dupid(lb, id, name);
        strcpy(id->name + 2, name);
 
-       /* This was in 2.43 and previous releases
-        * however all data in blender should be sorted, not just duplicate names
-        * sorting should not hurt, but noting just incase it alters the way other
-        * functions work, so sort every time */
-#if 0
-       if (result)
-               id_sort_by_name(lb, id);
-#endif
-
        id_sort_by_name(lb, id);
 
        return result;