- assigning vectors in the BGE wasn't updating the vector from the callback
- Pkey only starts in BGE in Object Mode - warning in readblenentry.c, is silent on 64bit too.
This commit is contained in:
@@ -200,7 +200,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
|
||||
buf[2]= buf[2]?buf[2]:' ';
|
||||
buf[3]= buf[3]?buf[3]:' ';
|
||||
|
||||
fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (intptr_t)bhead->len+sizeof(BHead));
|
||||
fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long int)bhead->len+sizeof(BHead));
|
||||
}
|
||||
}
|
||||
fprintf(fp, "]\n");
|
||||
|
||||
@@ -1444,6 +1444,11 @@ extern void StartKetsjiShell(struct bContext *C, struct ARegion *ar, int always_
|
||||
|
||||
#endif // GAMEBLENDER == 1
|
||||
|
||||
int game_engine_poll(bContext *C)
|
||||
{
|
||||
return CTX_data_mode_enum(C)==CTX_MODE_OBJECT ? 1:0;
|
||||
}
|
||||
|
||||
static int game_engine_exec(bContext *C, wmOperator *unused)
|
||||
{
|
||||
#if GAMEBLENDER == 1
|
||||
@@ -1503,7 +1508,7 @@ void VIEW3D_OT_game_start(wmOperatorType *ot)
|
||||
/* api callbacks */
|
||||
ot->exec= game_engine_exec;
|
||||
|
||||
//ot->poll= ED_operator_view3d_active;
|
||||
ot->poll= game_engine_poll;
|
||||
}
|
||||
|
||||
/* ************************************** */
|
||||
|
||||
@@ -109,6 +109,7 @@ bool PyVecTo(PyObject* pyval, T& vec)
|
||||
|
||||
if(VectorObject_Check(pyval)) {
|
||||
VectorObject *pyvec= (VectorObject *)pyval;
|
||||
BaseMath_ReadCallback(pyvec);
|
||||
if (pyvec->size != Size(vec)) {
|
||||
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", pyvec->size, Size(vec));
|
||||
return false;
|
||||
@@ -118,6 +119,7 @@ bool PyVecTo(PyObject* pyval, T& vec)
|
||||
}
|
||||
else if(QuaternionObject_Check(pyval)) {
|
||||
QuaternionObject *pyquat= (QuaternionObject *)pyval;
|
||||
BaseMath_ReadCallback(pyquat);
|
||||
if (4 != Size(vec)) {
|
||||
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", 4, Size(vec));
|
||||
return false;
|
||||
@@ -128,6 +130,7 @@ bool PyVecTo(PyObject* pyval, T& vec)
|
||||
}
|
||||
else if(EulerObject_Check(pyval)) {
|
||||
EulerObject *pyeul= (EulerObject *)pyval;
|
||||
BaseMath_ReadCallback(pyeul);
|
||||
if (3 != Size(vec)) {
|
||||
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", 3, Size(vec));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user