Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-31 17:21:47 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-31 17:21:47 +0300
commiteb1feb9f4a62e3caca4b72964c9fdd8187df53e5 (patch)
tree2c6b18ee72db4a386bf68425cc40620f9d49c48f /source/blender/windowmanager/intern/wm_operators.c
parent0b396bc15bd4433bfe9b8c6ffbc87d312d2426c1 (diff)
parent16100f8261770e367b0892bb38c778699ed609fe (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/editors/object/object_add.c source/blender/editors/object/object_select.c source/blender/editors/space_outliner/outliner_edit.c
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index ed731cf5f32..7d0fcbdcaf6 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1408,6 +1408,7 @@ void WM_operator_last_properties_ensure(wmOperatorType *ot, PointerRNA *ptr)
*/
ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short idcode)
{
+ Main *bmain = CTX_data_main(C);
ID *id = NULL;
/* check input variables */
if (RNA_struct_property_is_set(op->ptr, "filepath")) {
@@ -1435,8 +1436,6 @@ ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short i
if (is_relative_path ) {
if (exists == false) {
- Main *bmain = CTX_data_main(C);
-
if (idcode == ID_IM) {
BLI_path_rel(((Image *)id)->name, bmain->name);
}
@@ -1449,7 +1448,7 @@ ID *WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short i
else if (RNA_struct_property_is_set(op->ptr, "name")) {
char name[MAX_ID_NAME - 2];
RNA_string_get(op->ptr, "name", name);
- id = BKE_libblock_find_name(idcode, name);
+ id = BKE_libblock_find_name(bmain, idcode, name);
if (!id) {
BKE_reportf(op->reports, RPT_ERROR, "%s '%s' not found",
BKE_idcode_to_name(idcode), name);