I have wondered how hard it would be to make Vec3 (and similar classes) pickable?
I have already had this issue a lot of times (i do lots of small projects), and everytime this gets to the point im have to getX, getY, getZ. At which point i also have to handle 2 variable types if i load (float list & vec3), or convert a vec3 to a list before i can create a object.
class myObj( NodePath ): def __init__( self, pos ): NodePath.__init__( self ) if type(pos) == list: self.setPos( *pos ) else: self.setPos( pos ) objA = myObj( Vec3(1,1,1) ) objB = myObj( [1,1,1] ) <- data would come from pickle
Or is there a better way to implement that?
I understand that i am raising the panda3d pythonic question again.