On 17/01/2014 at 02:51, xxxxxxxx wrote:
Hi
I try to Position Objects on a spline and have some issues when the spline is not in the same null object- i try to get the offset by checking all - parent objects - but i have to mention the rotation - have one of you an idea ?
def GetContainerPosOffset(self, node) :
parentpos = c4d.Vector(0)
if node.GetUp() != None:
parnode = self.GetContainerPosOffset(node.GetUp())
#print parnode
parentpos += parnode
parentpos += node.GetAbsPos()
return parentpos
Edit notice NiklasR : fixed code formatting