← Back to team overview

openshot.code team mailing list archive

[Branch ~openshot.code/openshot/main] Rev 739: Fixed bug on Blender bug on dissolve animation (Blender Python API changed on Remesh and Particle...

 

------------------------------------------------------------
revno: 739
committer: Jonathan Thomas <Jonathan.Oomph@xxxxxxxxx>
branch nick: openshot
timestamp: Fri 2013-06-28 16:35:16 -0500
message:
  Fixed bug on Blender bug on dissolve animation (Blender Python API changed on Remesh and ParticleSystem)
modified:
  openshot/blender/scripts/dissolve.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/blender/scripts/dissolve.py'
--- openshot/blender/scripts/dissolve.py	2013-06-28 21:22:39 +0000
+++ openshot/blender/scripts/dissolve.py	2013-06-28 21:35:16 +0000
@@ -138,7 +138,12 @@
 	ActiveObjectText.modifiers['Remesh'].octree_depth = 9 #10 best quality but vertices number too high
 	ActiveObjectText.modifiers['Remesh'].scale=0.99
 	ActiveObjectText.modifiers['Remesh'].mode='SMOOTH'
-	ActiveObjectText.modifiers['Remesh'].remove_disconnected_pieces=False
+	
+	try:
+		ActiveObjectText.modifiers['Remesh'].remove_disconnected_pieces=False
+	except:
+		ActiveObjectText.modifiers['Remesh'].use_remove_disconnected=False
+		
 	#apply this mofifier
 	bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Remesh")
 	
@@ -167,8 +172,12 @@
 	ActiveObjectText.particle_systems['ParticleSystem'].settings.render_type='NONE'
 	ActiveObjectText.particle_systems['ParticleSystem'].settings.draw_method='DOT'
 	ActiveObjectText.particle_systems['ParticleSystem'].settings.effector_weights.gravity = 0
-	ActiveObjectText.particle_systems['ParticleSystem'].settings.adaptive_subframes = True
 	ActiveObjectText.particle_systems['ParticleSystem'].settings.courant_target = 0.2
+	
+	try:
+		ActiveObjectText.particle_systems['ParticleSystem'].settings.adaptive_subframes = True
+	except:
+		ActiveObjectText.particle_systems['ParticleSystem'].settings.use_adaptive_subframes = True
 
 	bpy.ops.object.select_all(action='DESELECT')