Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cittena
cittena
Commits
b2f51085
Commit
b2f51085
authored
Jan 03, 2017
by
Niels-Oliver Walkowski
Browse files
implement Frames.end and Frames.count_frames as properties
parent
1e6cce33
Changes
1
Show whitespace changes
Inline
Side-by-side
itten/movie.py
View file @
b2f51085
...
...
@@ -30,8 +30,37 @@ class Frames(object):
self
.
frames
=
self
.
get_frame_list
()
self
.
frm_length
=
self
.
count_total_frames
()
self
.
start
=
start
self
.
end
=
self
.
_get_end_frame
(
end
)
self
.
frm_cnt
=
self
.
count_frames
()
self
.
end
=
end
self
.
frm_cnt
=
0
@
property
def
end
(
self
):
return
self
.
__end
@
end
.
setter
def
end
(
self
,
nr
):
if
nr
==
0
:
self
.
__end
=
self
.
frm_length
self
.
frm_cnt
=
self
.
count_frames
elif
nr
>
self
.
frm_length
:
self
.
__end
=
self
.
frm_length
-
1
self
.
frm_cnt
=
self
.
count_frames
elif
nr
<
self
.
start
:
self
.
__end
=
self
.
start
+
1
self
.
frm_cnt
=
self
.
count_frames
else
:
self
.
__end
=
nr
self
.
frm_cnt
=
self
.
count_frames
@
property
def
frm_cnt
(
self
):
return
self
.
__frm_cnt
@
frm_cnt
.
setter
def
frm_cnt
(
self
,
nr
):
count
=
self
.
count_frames
()
print
(
count
)
self
.
__frm_cnt
=
count
def
get_frame_list
(
self
):
frm_path
=
Path
(
self
.
folder
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment