Add relative option to NodePath manipulation methods?

Any thoughts on this, is it good or bad idea and why?

Add “relative” key-tag to nodepath manipulation methods

self.NP.setY(self.NP,3) #this is not too bad



Or maybe even go so far as to use relative as default?
And pass “abs” or render to use global coordinate system? Maybe add configuration option as to not break compatibilty with existing programs?

I skimmed trough some of my code, and it looks like i use relative to self mode more often than not.

Thought came to me when i wrote code which looks like this:

x = self.myLongAndDescriptiveNameForNodePath

I think the behavior or NodePath is quite intuitive and very mighty.

Don’t forget, that the first optional argument to some common methods like setPos(), setH() and so on doesn’t have to be the nodepath you’re operating on. It can basically be any nodepath.

Here a small example:

np1 = loader.loadModel("smiley")
np2 = loader.loadModel("smiley")
np2.setX(np1, 5)  # place smiley 5 units aside from the other

translated in simpler commands it could be something like this, I think:

np2.setX(np1.getX(render) + 5)