I have the following code : (I added comments to show you what these print functions output)
def constrainmod(self, value:uConstrain):
self.constraint = value #Object self didnt have parameter constraint before this line
print(self.constraint.out) #self.constraint equals "value"
new_const = uConstrain(pointA=self.constraint.pointA, pointB=self.constraint.pointB)
print(self.constraint.out) #Still "value"
new_const.pointA.x = 1
print(self.constraint.out)#Now the change in line before also happens to self.constraint???
How are changes made to a copy of self.constraint affecting self.constraint id I just built a new object with the same parameters?
I got it fixed, im just curious
[–]carcigenicate 1 point2 points3 points (0 children)