[Bf-python] API : pass collection as parameter of python operator

Julien Duroure julien.duroure at gmail.com
Tue Mar 15 20:26:15 CET 2016


Hello Campbell,

Thanks for your answer !

Julien

On Tue, Mar 15, 2016 at 3:44 AM, Campbell Barton <ideasman42 at gmail.com>
wrote:

> Afraid the only 'supported' way is to manually re-create the
> collection and copy values.
>
> eg:
> http://www.pasteall.org/66371/python
>
> Also, I needed to change the operator to use a CollectionProperty.
>
> Note that you can workaround this by assigning underlying ID-properties,
> but this isn't guaranteed to work in the future.
>
> On Fri, Mar 11, 2016 at 9:14 AM, Julien Duroure
> <julien.duroure at gmail.com> wrote:
> > Hello,
> >
> > I am looking for a way to pass collection to a python defined operator.
> > I tried this code [1], but get following error :
> >
> > AttributeError: bpy_struct: attribute "collection" from
> > OBJECT_OT_example_op" is read-only
> >
> > Any ideas ?
> >
> > Julien
> >
> > [1] : http://www.pasteall.org/66193/python
> >
> > _______________________________________________
> > Bf-python mailing list
> > Bf-python at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-python
> >
>
>
>
> --
> - Campbell
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20160315/0625812f/attachment.html>


More information about the Bf-python mailing list