[Bf-taskforce25] 2.5 io scripts design

Arystan Dyussenov arystan.d at gmail.com
Sat Jun 20 22:08:57 CEST 2009


Hi Brecht,

Again I need your help with RNA.

I get a crash when accessing DupliObject.object property.

DupliObject.matrix and DupliObject.ob_matrix can be accessed ok, but not
DupliObject.object.

To reproduce the crash: open animation/dupliverts.blend in
http://download.blender.org/demo/test/test249.zip, select the duplivert
parent and run the following script:

----------------------------------------------------------------------
ob = bpy.data.objects["Plane"]
ob.create_dupli_list()

ob.dupli_list[0].object

ob.free_dupli_list()
----------------------------------------------------------------------

I've checked DupliObject.object property definition, to me it looks ok.
I even defined a custom get function for this property, didn't help.

This crash happens in soc-2009-kazanbas branch, latest revision.

Arystan

On Fri, Jun 19, 2009 at 5:19 PM, Brecht Van Lommel <brecht at blender.org>wrote:

> Hi,
>
> I would move DupliObject into DNA_object_types.h. The other alternative
> is to write manual get/set functions, but moving the data structure
> seems reasonable in this case. For storing the duplilist in the object,
> it seems easier to just create a ListBase in the Object struct? It
> doesn't really help to do this using RNA functions, mostly seems to make
> the code more complicated.
>
> Brecht.
>
> On Fri, 2009-06-19 at 16:41 +0600, Arystan Dyussenov wrote:
> > I've committed changes to my branch.
> >
> > On Fri, Jun 19, 2009 at 4:25 PM, Arystan Dyussenov
> > <arystan.d at gmail.com> wrote:
> >         Hi Brecht,
> >
> >         I need your help.
> >
> >         I've created a struct function to create duplilist for an
> >         object. It
> >         uses object_duplilist which returns a dynamically allocated
> >         list of
> >         DupliObjects. DupliObject struct I partially RNA-wrapped.
> >
> >         But build fails with the following message:
> >         http://www.pasteall.org/6214/text
> >
> >         Here's contents of rna_object_api.c:
> >         http://www.pasteall.org/6215/c
> >
> >         Here's how I wrap DupliObject: http://www.pasteall.org/6216/c
> >
> >         This is probably because DupliObject struct is defined in
> >         BKE_anim.h,
> >         not in DNA_*.h.  What should I do?
> >
> >         Arystan
> >
> > _______________________________________________
> > Bf-taskforce25 mailing list
> > Bf-taskforce25 at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-taskforce25
>
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-taskforce25/attachments/20090621/e372b68b/attachment.htm 


More information about the Bf-taskforce25 mailing list