Made blender python work in background mode without a blend file loading.

Blender.c python initialization creates a scene when in background mode and when there is no scene.
Needed to skip redrawing when in background mode because it depended on screen data that wasnt there.
This commit is contained in:
2006-03-24 15:46:26 +00:00
parent 7417d07482
commit d29503cc6d
3 changed files with 16 additions and 14 deletions

View File

@@ -414,9 +414,6 @@ static PyObject *M_sys_expandpath( PyObject * self, PyObject * args )
if (!PyArg_ParseTuple( args, "s", &path))
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected string argument" );
if (!G.scene)
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"error, load a blend before expending the path." );
BLI_strncpy(expanded, path, FILE_MAXDIR + FILE_MAXFILE);
BLI_convertstringcode(expanded, G.sce, G.scene->r.cfra);