diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-06-22 09:27:28 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-06-22 09:27:28 +0400 |
commit | 92aca19eda577f90574050c18d7fb1fb8ca9e90b (patch) | |
tree | 619fde747dcff6df4c9c7f43ccd217b5cc5c6bb6 | |
parent | 86c7bf733124b2959c4586e2e315e6a4ad53f725 (diff) |
BGE: Fix for [#35815] "makeScreenshot() relative path not working in Blenderplayer" reported by HG1.
Someone forgot to add relative path expansion (BLI_path_abs) to the Blenderplayer...
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_Canvas.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp index 8a6a41f3f99..dd914cd6e7d 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp @@ -41,11 +41,14 @@ #include "RAS_IPolygonMaterial.h" #include "GPC_Canvas.h" +#include "BLI_path_util.h" #include "BLI_string.h" #include "DNA_scene_types.h" #include "DNA_space_types.h" +#include "BKE_global.h" +#include "BKE_main.h" #include "BKE_image.h" extern "C" { @@ -454,6 +457,7 @@ MakeScreenShot( // create file path char path[FILE_MAX]; BLI_strncpy(path, filename, sizeof(path)); + BLI_path_abs(path, G.main->name); BKE_add_image_extension_from_type(path, im_format.imtype); // create and save imbuf |