Fix (unreported) improper handling of camera's baground image IDs in foreach_id callback.
`foreach_id` callbacks should not decide whether a given ID pointers should be processed or not (unless maybe some extremely specific cases). Even if an ID pointer is not currently 'used', it still needs to increment its ID user count, be remapped to a new pointer, etc. etc.
This commit is contained in:
@@ -98,12 +98,8 @@ static void camera_foreach_id(ID *id, LibraryForeachIDData *data)
|
||||
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, camera->dof.focus_object, IDWALK_CB_NOP);
|
||||
LISTBASE_FOREACH (CameraBGImage *, bgpic, &camera->bg_images) {
|
||||
if (bgpic->source == CAM_BGIMG_SOURCE_IMAGE) {
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, bgpic->ima, IDWALK_CB_USER);
|
||||
}
|
||||
else if (bgpic->source == CAM_BGIMG_SOURCE_MOVIE) {
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, bgpic->clip, IDWALK_CB_USER);
|
||||
}
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, bgpic->ima, IDWALK_CB_USER);
|
||||
BKE_LIB_FOREACHID_PROCESS_IDSUPER(data, bgpic->clip, IDWALK_CB_USER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user