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:
authorAndrea Weikert <elubie@gmx.net>2007-01-20 11:01:56 +0300
committerAndrea Weikert <elubie@gmx.net>2007-01-20 11:01:56 +0300
commit38375784dfa61b8dd8224fab1530c321fb30bd69 (patch)
tree92274ed7433eecd712f8da871fb226479ce8a39d /source/blender/python/api2_2x/sceneRender.c
parent783a2900a6382ebb3232ab54f66f214a95ab3f92 (diff)
[ #4786 ] if space in the Application path name, system() doesn't work on some platforms
commited temporary fix: executable name is quoted for all platforms except Windows now, nicely wrapped in #ifdefs. Will be doing nice wrapper function BLI_system for system calls in blenlib after release. Please test on all platforms!
Diffstat (limited to 'source/blender/python/api2_2x/sceneRender.c')
-rw-r--r--source/blender/python/api2_2x/sceneRender.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c
index 0016f983189..3986df44e52 100644
--- a/source/blender/python/api2_2x/sceneRender.c
+++ b/source/blender/python/api2_2x/sceneRender.c
@@ -508,8 +508,13 @@ PyObject *RenderData_Play( BPy_RenderData * self )
BKE_makepicstring( file, G.scene->r.pic, self->renderContext->sfra, G.scene->r.imtype);
if( BLI_exist( file ) ) {
calc_renderwin_rectangle(640, 480, G.winpos, pos, size);
+#ifdef WIN32
sprintf( str, "%s -a -p %d %d \"%s\"", bprogname,
pos[0], pos[1], file );
+#else
+ sprintf( str, "\"%s\" -a -p %d %d \"%s\"", bprogname,
+ pos[0], pos[1], file );
+#endif
system( str );
} else
sprintf( "Can't find image: %s", file );