Fix for bug [#8405] makeParentDeform segfaults Blender
linking armatures to objects didnt make pose data.
This commit is contained in:
@@ -1684,9 +1684,11 @@ static PyObject *Object_link( BPy_Object * self, PyObject * args )
|
||||
self->object->data = data;
|
||||
|
||||
/* creates the curve for the text object */
|
||||
if (self->object->type == OB_FONT)
|
||||
if (self->object->type == OB_FONT) {
|
||||
text_to_curve(self->object, 0);
|
||||
|
||||
} else if (self->object->type == OB_ARMATURE) {
|
||||
armature_rebuild_pose(self->object, (bArmature *)data);
|
||||
}
|
||||
id_us_plus( id );
|
||||
if( oldid ) {
|
||||
if( oldid->us > 0 ) {
|
||||
|
||||
@@ -1565,8 +1565,11 @@ typeError:
|
||||
object->flag = SELECT;
|
||||
|
||||
/* creates the curve for the text object */
|
||||
if (type == OB_FONT)
|
||||
if (type == OB_FONT) {
|
||||
text_to_curve(object, 0);
|
||||
} else if (object->type == OB_ARMATURE) {
|
||||
armature_rebuild_pose(object, (bArmature *)data);
|
||||
}
|
||||
|
||||
/* link to scene */
|
||||
base = MEM_callocN( sizeof( Base ), "pynewbase" );
|
||||
|
||||
Reference in New Issue
Block a user