mesh/animation exporters didnt work when there were no 3d views open, because the Blender.Set('curframe', i) called a update command that resulted in no viewable layers updating.
Made Blender.Set('curframe', i) do a scene_update_for_newframe(G.scene, (1<<20) - 1); removed 2 unused constants from Scene.c
This commit is contained in:
parent
ffed7d3566
commit
c8b06bba9c
@ -245,7 +245,9 @@ static PyObject *Blender_Set( PyObject * self, PyObject * args )
|
||||
if( !PyArg_Parse( arg, "i", &framenum ) )
|
||||
return ( NULL ); /* TODO: Do we need to generate a nice error message here? */
|
||||
G.scene->r.cfra = (short)framenum;
|
||||
update_for_newframe( );
|
||||
/* update all objects, so python scripts can export all objects in a scene
|
||||
without worrying about the view layers */
|
||||
scene_update_for_newframe(G.scene, (1<<20) - 1);
|
||||
|
||||
} else if (StringEqual( name , "uscriptsdir" ) ) {
|
||||
if ( !PyArg_Parse( arg , "s" , &dir ))
|
||||
|
@ -76,11 +76,6 @@ struct View3D;
|
||||
|
||||
PyObject *M_Object_Get( PyObject * self, PyObject * args ); /* from Object.c */
|
||||
|
||||
/*----------------------------------- Python BPy_Scene defaults------------*/
|
||||
#define EXPP_SCENE_FRAME_MAX 30000
|
||||
#define EXPP_SCENE_RENDER_WINRESOLUTION_MIN 4
|
||||
#define EXPP_SCENE_RENDER_WINRESOLUTION_MAX 10000
|
||||
|
||||
/* checks for the scene being removed */
|
||||
#define SCENE_DEL_CHECK_PY(bpy_scene) if (!(bpy_scene->scene)) return ( EXPP_ReturnPyObjError( PyExc_RuntimeError, "Scene has been removed" ) )
|
||||
#define SCENE_DEL_CHECK_INT(bpy_scene) if (!(bpy_scene->scene)) return ( EXPP_ReturnIntError( PyExc_RuntimeError, "Scene has been removed" ) )
|
||||
|
Loading…
Reference in New Issue
Block a user