Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. def __get_source_property(self, prop):
  2. if self.__source_uses_keyframes():
  3. try:
  4. position = self._project.pipeline.get_position()
  5. start = self.source.props.start
  6. in_point = self.source.props.in_point
  7. duration = self.source.props.duration
  8.  
  9. # If the position is outside of the clip, take the property
  10. # value at the start/end (whichever is closer) of the clip.
  11. source_position = max(0, min(position - start, duration - 1)) + in_point
  12. value = self.__control_bindings[prop].get_value(source_position)
  13. res = value is not None
  14. return res, value
  15. except PipelineError:
  16. pass
  17.  
  18. return self.source.get_child_property(prop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement