Creating Splines & sticking points to Objects

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 01/11/2010 at 15:52, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   12.028 
Platform:    Mac  ;  Mac OSX  ; 
Language(s) :       PYTHON  ;

---------
hey!

based on http://forums.cgsociety.org/showthread.php?f=182&t=929169 this thread, i came up with a similar idea to dive little more into python development.

my idea was, that i have a parent object. Under this partend Objects, you can than put your child objects you want to connect to the parent object via splines. (see screenshot 1).

At the moment i took a python generator as the parent object, and put 5 cubes beneath it, to test the stuff. When i m hitting the "update generator" button in the python generator ... it creates 5 splines exactly the way i want them to be created. (screenshot 2).

now to my question: a) at the moment those splines are created everytime i m doin some changes in the generator, how do i get rid of this?
and b) (the main question) what i m aiming for, would be the following:
          -when i want to animate one of this cubes (after the splines where created) i want the splinepoint (the one at the position of the cube) to stick to the cube´s position. but i dont have any idea how to realize that. especially as i need some things to just get executed once (the spline creation) and other things (comparing and sticking the point and the cube´s position) on a per frame basis.

any help very welcome 🙂

cheers

alex