From 92aca19eda577f90574050c18d7fb1fb8ca9e90b Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sat, 22 Jun 2013 05:27:28 +0000 Subject: 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... --- source/gameengine/GamePlayer/common/GPC_Canvas.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') 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 -- cgit v1.2.3