[Bf-python] Crashing Blender with incomplete objects

models at paposo.com models at paposo.com
Fri Oct 3 04:12:00 CEST 2003


I don't know if i made sense there.
 I think that New() was changed to stop adding default empty meshes to
Py_Objects because it interferes with Object.link().
    What I mean by this is that when you called Object.New() previously it
created a default datablock at the ->data pointer.  Then when you called
Object.link() it would create a new datablock, link it to the ->data pointer
and leave the default datablock 'hanging in the wind'. Because of this it
was better to set the data->pointer to NULL when New() was called, and then
wait until the user called Object.Link() to link a datablock to the ->data
pointer.
    When you call scene.link() it takes the object and adds it to a Base
which is then put in Global.scene's base list. Then problem is coming
because renderwin.c assumes that all scene linked objects - or real visable
3dview objects - have a datablock associated with them when it's rendering
the object. This makes sense. By calling New() and the linking it to the
scene the object isn't finished yet and the rendering of it blows up.
    Therefore my suggestion is to put the checking into Scene.link(), so
that unfinished objects, i.e. without a datablock, can't be rendered in the
3dview.
    P.s. It takes a long time for me to make a point.




More information about the Bf-python mailing list