← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 519: Added an extra check when effects are populated to see if the frei0r installation includes the ef...

 

------------------------------------------------------------
revno: 519
committer: Andy Finch <we.rocked.in79@xxxxxxxxx>
branch nick: openshot
timestamp: Mon 2011-08-29 22:01:13 +0100
message:
  Added an extra check when effects are populated to see if the frei0r installation includes the effect. Newer versions of the frei0r effects library have extra effects which we shouldn't let users with an old frei0r version select, otherwise they will get a crash.
modified:
  openshot/windows/AddEffect.py
  openshot/windows/TreeEffects.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/AddEffect.py'
--- openshot/windows/AddEffect.py	2011-01-27 06:06:56 +0000
+++ openshot/windows/AddEffect.py	2011-08-29 21:01:13 +0000
@@ -61,6 +61,12 @@
 				# skip to next item in loop
 				continue
 			
+			# does the frei0r installation include this effect?
+			if my_effect.service.startswith("frei0r"):
+				if my_effect.service not in self.form.filters:
+					# don't add this effect, skip to the next one
+					continue
+			
 			# get image for filter
 			file_path = os.path.join(EFFECTS_DIR, "icons", "small", my_effect.icon)
 			

=== modified file 'openshot/windows/TreeEffects.py'
--- openshot/windows/TreeEffects.py	2011-07-18 21:18:29 +0000
+++ openshot/windows/TreeEffects.py	2011-08-29 21:01:13 +0000
@@ -87,7 +87,7 @@
 		# clear the tree data
 		self.store.clear()
 
-
+		
 		# Init List of Effects
 		EFFECTS_DIR = self.project.EFFECTS_DIR
 		my_effects = []
@@ -125,6 +125,12 @@
 				# skip to next item in loop
 				continue
 			
+			# does the frei0r installation include this effect?
+			if my_effect.service.startswith("frei0r"):
+				if my_effect.service not in self.project.form.filters:
+					# don't add this effect, skip to the next one
+					continue
+			
 			# check if a filter matches (if any)
 			if not self.does_match_filter(my_effect, filter):
 				# NO match, so skip to next filter