Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 8 May 2018 09:59:22 +0000 (11:59 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 8 May 2018 09:59:22 +0000 (11:59 +0200)
1  2 
source/blender/editors/space_clip/clip_ops.c

index 4afec844f6d971684655d701f2ef1d39bc2caaa0,af5a33bbebefe5ccaf1249e05b4e8c060ff0175f..0d9371a77844d954f67cffdb80412c87a85362b4
@@@ -56,6 -56,7 +56,6 @@@
  
  #include "BKE_context.h"
  #include "BKE_global.h"
 -#include "BKE_depsgraph.h"
  #include "BKE_report.h"
  #include "BKE_library.h"
  #include "BKE_main.h"
@@@ -82,8 -83,6 +82,8 @@@
  
  #include "PIL_time.h"
  
 +#include "DEG_depsgraph_build.h"
 +
  #include "clip_intern.h"      // own include
  
  /******************** view navigation utilities *********************/
@@@ -197,8 -196,9 +197,9 @@@ static int open_exec(bContext *C, wmOpe
                bool relative = RNA_boolean_get(op->ptr, "relative_path");
  
                RNA_string_get(op->ptr, "directory", dir_only);
-               if (relative)
-                       BLI_path_rel(dir_only, G.main->name);
+               if (relative) {
+                       BLI_path_rel(dir_only, CTX_data_main(C)->name);
+               }
  
                prop = RNA_struct_find_property(op->ptr, "files");
                RNA_property_collection_lookup_int(op->ptr, prop, 0, &fileptr);
  
        WM_event_add_notifier(C, NC_MOVIECLIP | NA_ADDED, clip);
  
 -      DAG_relations_tag_update(bmain);
 +      DEG_relations_tag_update(bmain);
        MEM_freeN(op->customdata);
  
        return OPERATOR_FINISHED;
@@@ -267,7 -267,7 +268,7 @@@ static int open_invoke(bContext *C, wmO
        if (clip) {
                BLI_strncpy(path, clip->name, sizeof(path));
  
-               BLI_path_abs(path, G.main->name);
+               BLI_path_abs(path, CTX_data_main(C)->name);
                BLI_parent_dir(path);
        }
        else {