[Soc-2009-dev] Generic RNA collection add - help needed

Arystan Dyussenov arystan.d at gmail.com
Tue Jun 16 21:23:07 CEST 2009


Yep, delete would be handy. Brecht said that on C level we could have extend
only and on Python level both add/extend.

On Wed, Jun 17, 2009 at 12:52 AM, joe <joeedh at gmail.com> wrote:

> I was wondering, are any other collection functions planned, like e.g.
> a delete funtion, an extend function, etc?
>
> Joe
>
> On Tue, Jun 16, 2009 at 12:24 PM, Arystan Dyussenov<arystan.d at gmail.com>
> wrote:
> > Hi,
> >
> > I've implemented the backend for RNA collection add capable of adding a
> > single item to an array or listbase. The interface for add takes
> PointerRNA
> > as item to add.
> >
> > I want the add function to return PointerRNA of the new item added, and
> If
> > the item is NULL, then Main struct implementation could create a new
> > datablock so that the following would be possible:
> >
> > mesh = bpy.data.meshes.add()
> > object = bpy.data.objects.add()
> > object.set_data(mesh)
> > scene.add(object)
> >
> > Python would detect empty param list and pass NULL.
> >
> > Is this design ok?
> >
> > Will be happy to hear other ideas too :)
> >
> > More questions later...
> > Arystan
> >
> > _______________________________________________
> > Soc-2009-dev mailing list
> > Soc-2009-dev at blender.org
> > http://lists.blender.org/mailman/listinfo/soc-2009-dev
> >
> >
> _______________________________________________
> Soc-2009-dev mailing list
> Soc-2009-dev at blender.org
> http://lists.blender.org/mailman/listinfo/soc-2009-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/soc-2009-dev/attachments/20090617/d5754fa1/attachment.htm 


More information about the Soc-2009-dev mailing list