fix [#28846] Relative paths on linked scene fails
[blender.git] / source / blender / editors / sound / sound_ops.c
index 5b72e87f95a56eda1ee13deb07a07b0d493d6174..d03c2b1930004e9359aa05cb4617edd18402afa0 100644 (file)
@@ -519,6 +519,7 @@ static int sound_poll(bContext *C)
 
 static int pack_exec(bContext *C, wmOperator *op)
 {
 
 static int pack_exec(bContext *C, wmOperator *op)
 {
+       Main *bmain= CTX_data_main(C);
        Editing* ed = CTX_data_scene(C)->ed;
        bSound* sound;
 
        Editing* ed = CTX_data_scene(C)->ed;
        bSound* sound;
 
@@ -530,7 +531,7 @@ static int pack_exec(bContext *C, wmOperator *op)
        if(!sound || sound->packedfile)
                return OPERATOR_CANCELLED;
 
        if(!sound || sound->packedfile)
                return OPERATOR_CANCELLED;
 
-       sound->packedfile= newPackedFile(op->reports, sound->name);
+       sound->packedfile= newPackedFile(op->reports, sound->name, ID_BLEND_PATH(bmain, &sound->id));
        sound_load(CTX_data_main(C), sound);
 
        return OPERATOR_FINISHED;
        sound_load(CTX_data_main(C), sound);
 
        return OPERATOR_FINISHED;