def __init__(self, duration=0.0): CATransaction.begin() self.animations = [] self.duration = duration self.max_animation_time = 0.0 self.beginTime = 0.0 if not self.duration: self.duration = 0.25
def __init__(self, duration = 0.0): CATransaction.begin() self.animations = [] self.duration = duration self.max_animation_time = 0.0 self.beginTime = 0.0 if not self.duration: self.duration = 0.25
def apply_immediate(self): if self.target: p_value = self.toValue CATransaction.begin() #CATransaction.setDisableActions_(True) self.target.setValue_forKeyPath_(p_value, self.animation.keyPath()) if self.extra_model: self.extra_model.setValue_forKeyPath_(p_value, self.animation.keyPath()) CATransaction.commit()
def set_model_value(self, realme=None): if self.target: p_layer = self.target.presentationLayer() if not p_layer: return p_value = p_layer.valueForKeyPath_(self.animation.keyPath()) CATransaction.begin() CATransaction.setDisableActions_(True) self.target.setValue_forKeyPath_(p_value, self.animation.keyPath()) if self.extra_model: self.extra_model.setValue_forKeyPath_(p_value, self.animation.keyPath()) self.target.removeAnimationForKey_(self.uukey) CATransaction.commit()