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-06-05 16:10:33 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-05 17:33:46 +0300
commit481cdb08ed6f33a09d0e6843d1024db93c301178 (patch)
tree77166d130bfff2d5dca884676aaeff6bc0758f96 /source/blender/makesrna/intern
parent1d97e948d2c4867306e7fb5ce5fccf8b72c13391 (diff)
Cleanup: use new accessors to blendfile path (Main.name).
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_color.c4
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c4
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c4
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index d51436df563..8f3160e84d2 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -574,7 +574,7 @@ static const EnumPropertyItem *rna_ColorManagedColorspaceSettings_colorspace_ite
return items;
}
-static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
ID *id = ptr->id.data;
@@ -591,7 +591,7 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain)
else if (GS(id->name) == ID_MC) {
MovieClip *clip = (MovieClip *) id;
- BKE_movieclip_reload(clip);
+ BKE_movieclip_reload(bmain, clip);
/* all sequencers for now, we don't know which scenes are using this clip as a strip */
BKE_sequencer_cache_cleanup();
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index f5f7ade6390..b50e263e01d 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -66,7 +66,7 @@
static void rna_ImagePackedFile_save(ImagePackedFile *imapf, Main *bmain, ReportList *reports)
{
- if (writePackedFile(reports, bmain->name, imapf->filepath, imapf->packedfile, 0) != RET_OK) {
+ if (writePackedFile(reports, BKE_main_blendfile_path(bmain), imapf->filepath, imapf->packedfile, 0) != RET_OK) {
BKE_reportf(reports, RPT_ERROR, "Could not save packed file to disk as '%s'",
imapf->filepath);
}
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 18a69ca4d88..7d5c327f25a 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -481,7 +481,7 @@ static Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *f
Text *txt;
errno = 0;
- txt = BKE_text_load_ex(bmain, filepath, bmain->name, is_internal);
+ txt = BKE_text_load_ex(bmain, filepath, BKE_main_blendfile_path(bmain), is_internal);
if (!txt)
BKE_reportf(reports, RPT_ERROR, "Cannot read '%s': %s", filepath,
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index d63f3fe76f8..3639c8547ba 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -56,11 +56,11 @@
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
-static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_MovieClip_reload_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
{
MovieClip *clip = (MovieClip *)ptr->id.data;
- BKE_movieclip_reload(clip);
+ BKE_movieclip_reload(bmain, clip);
DAG_id_tag_update(&clip->id, 0);
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 6eaaf842cb9..f976c286ea9 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2963,7 +2963,7 @@ static void rna_ShaderNodeTexIES_mode_set(PointerRNA *ptr, int value)
if (value == NODE_IES_EXTERNAL && text->name) {
BLI_strncpy(nss->filepath, text->name, sizeof(nss->filepath));
- BLI_path_rel(nss->filepath, G.main->name);
+ BLI_path_rel(nss->filepath, BKE_main_blendfile_path_from_global());
}
id_us_min(node->id);
@@ -2988,7 +2988,7 @@ static void rna_ShaderNodeScript_mode_set(PointerRNA *ptr, int value)
if (value == NODE_SCRIPT_EXTERNAL && text->name) {
BLI_strncpy(nss->filepath, text->name, sizeof(nss->filepath));
- BLI_path_rel(nss->filepath, G.main->name);
+ BLI_path_rel(nss->filepath, BKE_main_blendfile_path_from_global());
}
id_us_min(node->id);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 70c4b912d9f..70023679e3c 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -148,7 +148,7 @@ static void rna_SceneRender_get_frame_path(
}
else {
BKE_image_path_from_imformat(
- name, rd->pic, bmain->name, (frame == INT_MIN) ? rd->cfra : frame,
+ name, rd->pic, BKE_main_blendfile_path(bmain), (frame == INT_MIN) ? rd->cfra : frame,
&rd->im_format, (rd->scemode & R_EXTENSION) != 0, true, suffix);
}
}