openshot.code team mailing list archive
-
openshot.code team
-
Mailing list archive
-
Message #00625
[Branch ~openshot.code/openshot/main] Rev 719: Improved length setting of animated titles, to prevent incorrect lengths (due to rounding)
------------------------------------------------------------
revno: 719
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Mon 2012-09-17 13:16:04 -0500
message:
Improved length setting of animated titles, to prevent incorrect lengths (due to rounding)
modified:
openshot/windows/BlenderGenerator.py
--
lp:openshot
https://code.launchpad.net/~openshot.code/openshot/main
Your team OpenShot Code is subscribed to branch lp:openshot.
To unsubscribe from this branch go to https://code.launchpad.net/~openshot.code/openshot/main/+edit-subscription
=== modified file 'openshot/windows/BlenderGenerator.py'
--- openshot/windows/BlenderGenerator.py 2012-09-17 04:09:20 +0000
+++ openshot/windows/BlenderGenerator.py 2012-09-17 18:16:04 +0000
@@ -665,14 +665,14 @@
# mark project as modified
self.project.set_project_modified(is_modified=True, refresh_xml=False, type=_("Added file"))
-
+
# Update the file properties (since it's added as an image)
# We need to make it look like a video
f.label = _("Image Sequence")
f.fps = self.project.fps()
f.max_frames = length
f.ttl = 1.0
- f.length = float(f.max_frames * f.ttl) / float(f.fps)
+ f.length = (float(f.max_frames) / float(f.fps)) - 0.01 # Subtract a 10th of a second, to prevent rounding errors
f.file_type = "image sequence"
f.name = os.path.join(target_folder, self.params["file_name"] + r"%04d.png")