Bugfixes for frame number boost:

- Found several places, where people explicitly casted the frame number
  to short.
- Fixed the crash in BPY_interface by adding an empty line (to make it
  recompile everywhere, make clean doesn't help...)

  For the build system maintainers:

  Problem was: The change in makesdna changed the position of the
  scriptlink structure. BPY_interface.c somehow didn't get recompiled
  (not even after a make clean!!!) which triggered crashes on adding
  scriptlinks.
This commit is contained in:
2006-05-07 08:23:51 +00:00
parent 53e777aae1
commit 390380e97b
7 changed files with 15 additions and 14 deletions

View File

@@ -752,7 +752,7 @@ static PyObject *Lattice_insertKey( BPy_Lattice * self, PyObject * args )
if( frame > 0 ) {
frame = EXPP_ClampInt( frame, 1, MAXFRAME );
oldfra = G.scene->r.cfra;
G.scene->r.cfra = (short)frame;
G.scene->r.cfra = (int)frame;
}
// else just use current frame, then
// return (EXPP_ReturnPyObjError (PyExc_RuntimeError,
@@ -763,7 +763,7 @@ static PyObject *Lattice_insertKey( BPy_Lattice * self, PyObject * args )
allspace(REMAKEIPO, 0);
if( frame > 0 )
G.scene->r.cfra = (short)oldfra;
G.scene->r.cfra = (int)oldfra;
Py_INCREF( Py_None );
return Py_None;

View File

@@ -1248,7 +1248,7 @@ static PyObject *NMesh_insertKey( PyObject * self, PyObject * args )
if( fra > 0 ) {
fra = EXPP_ClampInt( fra, 1, NMESH_FRAME_MAX );
oldfra = G.scene->r.cfra;
G.scene->r.cfra = (short)fra;
G.scene->r.cfra = (int)fra;
}
if( !mesh )
@@ -1259,7 +1259,7 @@ static PyObject *NMesh_insertKey( PyObject * self, PyObject * args )
allspace(REMAKEIPO, 0);
if( fra > 0 )
G.scene->r.cfra = (short)oldfra;
G.scene->r.cfra = (int)oldfra;
return EXPP_incr_ret( Py_None );
}

View File

@@ -463,7 +463,7 @@ static PyObject *PoseBone_insertKey(BPy_PoseBone *self, PyObject *args)
//set the frame we want insertion on
oldframe = G.scene->r.cfra;
G.scene->r.cfra = (short)frame;
G.scene->r.cfra = frame;
//add the action channel if it's not there
verify_action_channel(((BPy_Object*)parent_object)->object->action,
@@ -498,7 +498,7 @@ static PyObject *PoseBone_insertKey(BPy_PoseBone *self, PyObject *args)
}
//flip the frame back
G.scene->r.cfra = (short)oldframe;
G.scene->r.cfra = oldframe;
//update the IPOs
remake_action_ipos (((BPy_Object*)parent_object)->object->action);