Seperating the Timeline into Timeline and Animation#694
Conversation
skoudoro
left a comment
There was a problem hiding this comment.
See below a quick review, I will look deeper tomorrow
| def _get_data(self, is_camera=False): | ||
| if is_camera: | ||
| self._is_camera_animated = True | ||
| return self._camera_data | ||
| else: | ||
| return self._data |
There was a problem hiding this comment.
you split it for all the other functions so you should split here also (_get_data and get_camera_data)
| import numpy as np | ||
| from scipy.spatial import transform |
| colors = [1, 1, 1] | ||
| if len(lines) > 0: | ||
| lines = np.array([lines]) | ||
| if colors is []: |
There was a problem hiding this comment.
avoid is, it will return what you expect. use isonly with None otherwise to check copy. see below
>>> a = []
>>> a is []
False| def get_keyframes(self, attrib=None, is_camera=False): | ||
| """Set a keyframe for a certain attribute. |
| is_camera: bool, optional | ||
| Indicated whether setting a camera property or general property. | ||
| update_interpolator: bool, optional | ||
| Interpolator will be reinitialized if Ture |
| function that does not depend on keyframes. | ||
|
|
||
| Examples | ||
| --------- |
| Specifies whether the `interpolator` is time-only based evaluation | ||
| function that does not depend on keyframes. | ||
| Examples | ||
| --------- |
There was a problem hiding this comment.
too long and miss empty line between 2 sections
| Examples | ||
| --------- |
| Examples | ||
| --------- |
| attrib = self._get_attribute_data(property_name) | ||
| attrib.get('callbacks', []).append(cbk_func) | ||
|
|
||
| def update_animation(self, t=None): |
There was a problem hiding this comment.
avoid 1 letter variable. 3 letters minimum. to update
|
All tests are failing, can you fix the issue in this PR? see here: https://github.com/fury-gl/fury/actions/runs/3135809301/jobs/5091933852#step:12:433 this is due to the renaming of |
…ine`-into-`Timeline`-and-`Animation`
@skoudoro Should I change the |
filipinascimento
left a comment
There was a problem hiding this comment.
Thanks, this one looks good. Please check other places that you still may be calling timeline.add_child_animation.
|
|
||
| ############################################################################### | ||
| # Adding the main animation to the Timeline. | ||
| timeline.add_child_animation(main_arm_animation) |
There was a problem hiding this comment.
This should be timeline.add_animation, correct?
No matter if it was set automatically of by a Timeline
…ine`-into-`Timeline`-and-`Animation`
Timeline into Timeline and Animation
Codecov Report
@@ Coverage Diff @@
## master #694 +/- ##
==========================================
+ Coverage 50.19% 50.21% +0.02%
==========================================
Files 120 126 +6
Lines 28019 28291 +272
Branches 2987 3033 +46
==========================================
+ Hits 14063 14206 +143
- Misses 13489 13611 +122
- Partials 467 474 +7
|
|
@m-agour please rebase. |
…ine`-into-`Timeline`-and-`Animation`
|
Hi @Garyfallidis @skoudoro, The scipy problem has been fixed now. |
|
Thank you @m-agour. |
In this PR, a new structure for the animation module is introduced while maintaining the old API (except for
add_child_timelineis changed to becomeadd_child_animation)There is still modifing the tests. Tutorials will be updated in another PR.