Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/bpath.c
| Show First 20 Lines • Show All 580 Lines • ▼ Show 20 Lines | void BKE_bpath_traverse_id( | ||||
| Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data) | Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data) | ||||
| { | { | ||||
| const char *absbase = (flag & BKE_BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL; | const char *absbase = (flag & BKE_BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL; | ||||
| if ((flag & BKE_BPATH_TRAVERSE_SKIP_LIBRARY) && ID_IS_LINKED(id)) { | if ((flag & BKE_BPATH_TRAVERSE_SKIP_LIBRARY) && ID_IS_LINKED(id)) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (id->library_weak_reference != NULL) { | |||||
| rewrite_path_fixed( | |||||
| id->library_weak_reference->library_filepath, visit_cb, absbase, bpath_user_data); | |||||
| } | |||||
| switch (GS(id->name)) { | switch (GS(id->name)) { | ||||
| case ID_IM: { | case ID_IM: { | ||||
| Image *ima; | Image *ima; | ||||
| ima = (Image *)id; | ima = (Image *)id; | ||||
| if (BKE_image_has_packedfile(ima) == false || (flag & BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) { | if (BKE_image_has_packedfile(ima) == false || (flag & BKE_BPATH_TRAVERSE_SKIP_PACKED) == 0) { | ||||
| /* Skip empty file paths, these are typically from generated images and | /* Skip empty file paths, these are typically from generated images and | ||||
| * don't make sense to add directories to until the image has been saved | * don't make sense to add directories to until the image has been saved | ||||
| * once to give it a meaningful value. */ | * once to give it a meaningful value. */ | ||||
| ▲ Show 20 Lines • Show All 311 Lines • Show Last 20 Lines | |||||