Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 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()
Ejemplo n.º 4
0
 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()
Ejemplo n.º 5
0
    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()
Ejemplo n.º 6
0
    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()