diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-08 15:02:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-08 15:02:58 +0400 |
commit | 011a3645bf1d587101ec7cb9bf6a0a0d1421802a (patch) | |
tree | 08376565f4176dec29c893af8bbd56b843333dd9 /source/blender/editors | |
parent | 9a51266f3569eebca06c18d1af4ed8151d93aca7 (diff) |
fix [#28846] Relative paths on linked scene fails
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editfont.c | 9 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sound/sound_ops.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 3 |
4 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index fcac070f84e..d8257c524c1 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -259,6 +259,7 @@ static int insert_into_textbuf(Object *obedit, uintptr_t c) static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int recalc, int mode) { + struct Main *bmain= CTX_data_main(C); Curve *cu= obedit->data; EditFont *ef= cu->editfont; cu->curinfo = ef->textbufinfo[cu->pos?cu->pos-1:0]; @@ -269,7 +270,7 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re if(mode == FO_EDIT) update_string(cu); - BKE_text_to_curve(scene, obedit, mode); + BKE_text_to_curve(bmain, scene, obedit, mode); if(recalc) DAG_id_tag_update(obedit->data, 0); @@ -928,9 +929,10 @@ static int move_cursor(bContext *C, int type, int select) if(select == 0) { if(cu->selstart) { + struct Main *bmain= CTX_data_main(C); cu->selstart = cu->selend = 0; update_string(cu); - BKE_text_to_curve(scene, obedit, FO_SELCHANGE); + BKE_text_to_curve(bmain, scene, obedit, FO_SELCHANGE); } } @@ -1644,13 +1646,14 @@ static int open_cancel(bContext *UNUSED(C), wmOperator *op) static int open_exec(bContext *C, wmOperator *op) { + struct Main *bmain= CTX_data_main(C); VFont *font; PropertyPointerRNA *pprop; PointerRNA idptr; char filepath[FILE_MAX]; RNA_string_get(op->ptr, "filepath", filepath); - font= load_vfont(filepath); + font= load_vfont(bmain, filepath); if(!font) { if(op->customdata) MEM_freeN(op->customdata); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index a50dd00ef16..76cbfdc88e7 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1221,7 +1221,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) cu1->vfontbi= cu->vfontbi; id_us_plus((ID *)cu1->vfontbi); - BKE_text_to_curve(scene, base->object, 0); /* needed? */ + BKE_text_to_curve(bmain, scene, base->object, 0); /* needed? */ BLI_strncpy(cu1->family, cu->family, sizeof(cu1->family)); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 5b72e87f95a..d03c2b19300 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -519,6 +519,7 @@ static int sound_poll(bContext *C) static int pack_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); 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; - 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; diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 45bd1d58a53..33c3ae45a58 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1567,6 +1567,7 @@ static int pack_test(bContext *C, wmOperator *op) static int pack_exec(bContext *C, wmOperator *op) { + struct Main *bmain= CTX_data_main(C); Image *ima= CTX_data_edit_image(C); ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); int as_png= RNA_boolean_get(op->ptr, "as_png"); @@ -1582,7 +1583,7 @@ static int pack_exec(bContext *C, wmOperator *op) if(as_png) BKE_image_memorypack(ima); else - ima->packedfile= newPackedFile(op->reports, ima->name); + ima->packedfile= newPackedFile(op->reports, ima->name, ID_BLEND_PATH(bmain, &ima->id)); WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima); |