diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-12-28 08:00:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-12-28 08:00:35 +0300 |
commit | ab06e52343fbd45661388d4d41a636b4fb15629d (patch) | |
tree | c70e3a4d5c02fe6033bc70b00925cdc0be9d3ae7 /source/blender/python/api2_2x/Group.c | |
parent | c063e01f068fa6a02891238f9e73f9e3f952919a (diff) |
Mech cleanup use new edge_keys
continual script stuff, minor stuff..
fix for bad return in group.
Added back group.objects.append/remove but print deprectaed warning. also some epydoc changes.
Diffstat (limited to 'source/blender/python/api2_2x/Group.c')
-rwxr-xr-x | source/blender/python/api2_2x/Group.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c index 25c6dba8c6e..33465574f79 100755 --- a/source/blender/python/api2_2x/Group.c +++ b/source/blender/python/api2_2x/Group.c @@ -262,7 +262,7 @@ static PyObject *Group_getFakeUser( BPy_Group * self ) static int Group_setFakeUser( BPy_Group * self, PyObject * value ) { - GROUP_DEL_CHECK_PY(self); + GROUP_DEL_CHECK_INT(self); return SetIdFakeUser(&self->group->id, value); } @@ -803,6 +803,11 @@ static PyObject *GroupObSeq_link( BPy_GroupObSeq * self, PyObject *args ) Py_RETURN_NONE; } +static PyObject *GroupObSeq_append( BPy_GroupObSeq * self, PyObject *args ) +{ + printf("WARNING: grp.objects.append() has been deprecated, use grp.objects.link() instead.\nBlender releases after 2.43 will not support .append()"); + return GroupObSeq_link(self, args); +} static PyObject *GroupObSeq_unlink( BPy_GroupObSeq * self, PyObject *args ) @@ -833,13 +838,26 @@ static PyObject *GroupObSeq_unlink( BPy_GroupObSeq * self, PyObject *args ) Py_RETURN_NONE; } +static PyObject *GroupObSeq_remove( BPy_GroupObSeq * self, PyObject *args ) +{ + printf("WARNING: grp.objects.remove() has been deprecated, use grp.objects.unlink() instead.\nBlender releases after 2.43 will not support .remove()"); + return GroupObSeq_unlink(self, args); +} + static struct PyMethodDef BPy_GroupObSeq_methods[] = { {"link", (PyCFunction)GroupObSeq_link, METH_VARARGS, "make the object a part of this group"}, - {"remove", (PyCFunction)GroupObSeq_unlink, METH_VARARGS, - "remove object from this group"}, - {NULL, NULL, 0, NULL} + {"unlink", (PyCFunction)GroupObSeq_unlink, METH_VARARGS, + "unlink an object from this group"}, + + /* Deprecated! use the above functions */ + {"append", (PyCFunction)GroupObSeq_append, METH_VARARGS, + "make the object a part of this group - deprecated, use link"}, + {"remove", (PyCFunction)GroupObSeq_remove, METH_VARARGS, + "remove an object from this group - deprecated, use unlink"}, + + {NULL, NULL, 0, NULL} }; /************************************************************************ |