[Bf-python] makeparent()
models at paposo.com
models at paposo.com
Mon Nov 10 10:42:40 CET 2003
followup:
>>The parent needs to be sent for the link to occur (the cool little dashed
line :o). But when I do this I get some wacked out behavior from the
displists when I move the child object around. It reshapes itself to the
size of the parent object. ???
I fixed this. For some reason although LT_GRID = 1 and LT_OUTSIDE = 2 when
you make an 'outside' lattice it's flag value is 3! Silly coders :/ That's
what got the weird displist behavior going.
This is what I have for makeparent() to make it work.......
.............
child->partype = PAROBJECT; ......
child->parent = parent; <------------ add this (it's important).
This is what actually makes the parent child relationship!
//py_obj_child = (BPy_Object *) py_child; <--------- this doesn't seem to
serve a purpose bye!
..........
...........
/* We don't need the child object anymore. */
//Py_DECREF ((PyObject *) child); <------------- this crashes blender ??
Its a cast of a datablock pointer to a py_object *?*
..............
Correct me if Im wrong on the decref thing :)
More information about the Bf-python
mailing list