== Pynodes ==
1) Trying to bring back compatibility with Python2.3. 2) Adding some stubs to compile blender player again on linux. Please tell me if Blender still doesn't compile with py 2.3 or if the player isn't compiling. There was a binreloc related stub I needed to add, so probably the player wasn't compiling before the pynodes commit. Thanks PanzerMKZ for reporting and testing part of the fix to py 2.3.
This commit is contained in:
@@ -535,7 +535,7 @@ static int sockoutmap_has_key( BPy_SockMap *self, PyObject *key) {
|
||||
static int sockoutmap_assign_subscript(BPy_SockMap *self, PyObject *pyidx, PyObject *value) {
|
||||
int i, idx, len, wanted_len = 0, ret = -1;
|
||||
PyObject *val;
|
||||
PyObject **items;
|
||||
PyObject *items[4];
|
||||
|
||||
if (!self->node)
|
||||
return EXPP_ReturnIntError(PyExc_RuntimeError, "no access to Blender node data!");
|
||||
@@ -567,9 +567,8 @@ static int sockoutmap_assign_subscript(BPy_SockMap *self, PyObject *pyidx, PyObj
|
||||
return EXPP_ReturnIntError(PyExc_AttributeError, "expected a non-empty numeric tuple or list");
|
||||
}
|
||||
|
||||
items = PySequence_Fast_ITEMS(val);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
items[i] = PySequence_Fast_GET_ITEM(val, i); /* borrowed */
|
||||
if (!PyNumber_Check(items[i])) {
|
||||
Py_DECREF(val);
|
||||
return EXPP_ReturnIntError(PyExc_AttributeError, "expected a *numeric* tuple or list");
|
||||
@@ -1208,6 +1207,11 @@ BPy_Node *Node_CreatePyObject(bNode *node)
|
||||
return pynode;
|
||||
}
|
||||
|
||||
int pytype_is_pynode(PyObject *pyob)
|
||||
{
|
||||
return PyObject_TypeCheck(pyob, &Node_Type);
|
||||
}
|
||||
|
||||
void InitNode(BPy_Node *self, bNode *node) {
|
||||
self->node = node;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ extern BPy_Node *Node_CreatePyObject(bNode *node);
|
||||
extern BPy_NodeSockets *Node_CreateSockets(bNode *node);
|
||||
extern void Node_SetStack(BPy_Node *self, bNodeStack **stack, int type);
|
||||
extern void Node_SetShi(BPy_Node *self, ShadeInput *shi);
|
||||
extern int pytype_is_pynode(PyObject *pyob);
|
||||
|
||||
#define NODE_INPUTSTACK 0
|
||||
#define NODE_OUTPUTSTACK 1
|
||||
|
||||
Reference in New Issue
Block a user