fix [#28846] Relative paths on linked scene fails
[blender.git] / source / blender / makesdna / DNA_ID.h
index f81a05f562533a1a1aef5eb02bcba13bd0eb2a5e..9c8a0231907e814f824011161cb9b65cd89afd77 100644 (file)
@@ -206,6 +206,8 @@ typedef struct PreviewImage {
 
 #define ID_CHECK_UNDO(id) ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM))
 
+#define ID_BLEND_PATH(_bmain, _id) ((_id)->lib ? (_id)->lib->filepath : (_bmain)->name)
+
 #ifdef GS
 #undef GS
 #endif