ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).
[blender.git] / source / blender / editors / space_buttons / buttons_context.c
index 42e2d6b90f04894d83af0c4b59c8643cde7c299f..5b03bdd776178bf2383c20c8e522daf06699f775 100644 (file)
@@ -1180,33 +1180,3 @@ ID *buttons_context_id_path(const bContext *C)
 
        return NULL;
 }
-
-void ED_buttons_id_unref(SpaceButs *sbuts, const ID *id)
-{
-       if (sbuts->pinid == id) {
-               sbuts->pinid = NULL;
-               sbuts->flag &= ~SB_PIN_CONTEXT;
-       }
-
-       if (sbuts->path) {
-               ButsContextPath *path = sbuts->path;
-               int i;
-
-               for (i = 0; i < path->len; i++) {
-                       if (path->ptr[i].id.data == id) {
-                               break;
-                       }
-               }
-
-               if (i == path->len) {
-                       /* pass */
-               }
-               else if (i == 0) {
-                       MEM_SAFE_FREE(sbuts->path);
-               }
-               else {
-                       memset(&path->ptr[i], 0, sizeof(path->ptr[i]) * (path->len - i));
-                       path->len = i;
-               }
-       }
-}