BPython bug fixes:

- bug #2033 reported by Ken Hughes: Vertices of mesh parented to lattice is scaled incorrectly:
https://projects.blender.org/tracker/?func=detail&aid=2033&group_id=9&atid=125

- bug #2211 reported by German Alonso Tamayo (servivo): Add a vertex to a mesh with groups using a script and then edit that mesh hangs blender:
https://projects.blender.org/tracker/index.php?func=detail&aid=2211&group_id=9&atid=125

(#2211's hang was already fixed with previous commit, but this way should work better)

- doc updates (Ken reported missing info about Render slinks, thanks).
This commit is contained in:
2005-05-22 07:22:34 +00:00
parent ae2acbf49b
commit 2f3dbcc5b7
10 changed files with 103 additions and 23 deletions

View File

@@ -1553,6 +1553,12 @@ static PyObject *Object_makeParent( BPy_Object * self, PyObject * args )
"expected a list of objects" ) );
}
parent = ( Object * ) self->object;
if (parent->id.us == 0)
return EXPP_ReturnPyObjError (PyExc_RuntimeError,
"object must be linked to a scene before it can become a parent");
/* Check if the PyObject passed in list is a Blender object. */
for( i = 0; i < PySequence_Length( list ); i++ ) {
child = NULL;
@@ -1561,12 +1567,13 @@ static PyObject *Object_makeParent( BPy_Object * self, PyObject * args )
child = ( Object * ) Object_FromPyObject( py_child );
if( child == NULL ) {
Py_DECREF (py_child);
return ( EXPP_ReturnPyObjError( PyExc_TypeError,
"Object Type expected" ) );
}
parent = ( Object * ) self->object;
if( test_parent_loop( parent, child ) ) {
Py_DECREF (py_child);
return ( EXPP_ReturnPyObjError( PyExc_RuntimeError,
"parenting loop detected - parenting failed" ) );
}
@@ -1587,7 +1594,7 @@ static PyObject *Object_makeParent( BPy_Object * self, PyObject * args )
sort_baselist( G.scene );
}
// We don't need the child object anymore.
//Py_DECREF ((PyObject *) child);
Py_DECREF (py_child);
}
return EXPP_incr_ret( Py_None );
}