diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-09 17:43:37 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-09 17:43:37 +0400 |
commit | de4bd55e01bc574c13977537ace1a0901dcfcaf0 (patch) | |
tree | 4e2555dd5aa13b3b86dc7a5a89f56986d4108486 /source/blender/editors | |
parent | 0c68f0eee87d7add5915794ca7f05c666c464433 (diff) |
DO not increment image user counter on view3d duplicate and not decrement
it's user count on free. That's how other spaces handles ID block (like
image editor, space clip).
This fixes issue when loading file without loading UI when current layout
has got background images set.
Also this hopefully will fix issue #30429: Background Images Lost on Save/Close/Reload
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 6 |
2 files changed, 0 insertions, 14 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 43d74a7d2cd..405ce80323b 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -333,10 +333,6 @@ static void view3d_free(SpaceLink *sl) { View3D *vd= (View3D *) sl; - BGpic *bgpic; - for (bgpic= vd->bgpicbase.first; bgpic; bgpic= bgpic->next) { - if (bgpic->ima) bgpic->ima->id.us--; - } BLI_freelistN(&vd->bgpicbase); if (vd->localvd) MEM_freeN(vd->localvd); @@ -355,7 +351,6 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) { View3D *v3do= (View3D *)sl; View3D *v3dn= MEM_dupallocN(sl); - BGpic *bgpic; /* clear or remove stuff from old */ @@ -374,9 +369,6 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) /* copy or clear inside new stuff */ BLI_duplicatelist(&v3dn->bgpicbase, &v3do->bgpicbase); - for (bgpic= v3dn->bgpicbase.first; bgpic; bgpic= bgpic->next) - if (bgpic->ima) - bgpic->ima->id.us++; v3dn->properties_storage= NULL; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index e3ab8cf7f11..0b12db5d290 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3648,12 +3648,6 @@ void ED_view3D_background_image_remove(View3D *v3d, BGpic *bgpic) { BLI_remlink(&v3d->bgpicbase, bgpic); - if (bgpic->ima) - id_us_min(&bgpic->ima->id); - - if (bgpic->clip) - id_us_min(&bgpic->clip->id); - MEM_freeN(bgpic); } |