[Bf-blender-cvs] [59ce30f32b4] master: Tracking: Use bmain from context
Sergey Sharybin
noreply at git.blender.org
Tue May 8 11:59:15 CEST 2018
Commit: 59ce30f32b45a04eb352590fe719a30efa3f4a6a
Author: Sergey Sharybin
Date: Tue May 8 11:58:42 2018 +0200
Branches: master
https://developer.blender.org/rB59ce30f32b45a04eb352590fe719a30efa3f4a6a
Tracking: Use bmain from context
===================================================================
M source/blender/editors/space_clip/clip_ops.c
===================================================================
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 7d8dd629562..af5a33bbebe 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -196,8 +196,9 @@ static int open_exec(bContext *C, wmOperator *op)
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);
@@ -266,7 +267,7 @@ static int open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)
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 {
More information about the Bf-blender-cvs
mailing list