Hi,

I defined a class called vec3 which contains x, y, z and in another
function, I tried to call a function which takes a vec3 as a parameter, but
it seems that parameter is passed as a generic object and I can not access x
, y, z in my vec3. Could anyone help me with that?

 class vec3:
    def __init__(self, x_ = 0.0, y_ = 0.0, z_ = 0.0):
        self.x = x_
        self.y = y_
        self.z = z_
class mat4:
         def translation( traV = vec3() ):
              tranM.rowLst[index][0] = traV.x
AttributeError: 'NoneType' object has no attribute 'x'

Could anyone help me how to turn the traV as type of vec3() instead of
NoneType object?

Thanks a lot,

Wei
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to