diff --git a/ExplodedAssembly.py b/ExplodedAssembly.py index 5058d70..c7ee9e0 100644 --- a/ExplodedAssembly.py +++ b/ExplodedAssembly.py @@ -319,7 +319,15 @@ def resetPlacement(): rot = FreeCAD.Rotation(plm[1][0], plm[1][1], plm[1][2], plm[1][3]) obj.Placement = FreeCAD.Placement(base, rot) - +# Inclusion to import the Connection module +MC_CONNECTION = False +def connectionMC(option = False): + global MC_CONNECTION + if option == True: + MC_CONNECTION = True + else: + MC_CONNECTION = False +# End of inclusion def runAnimation(start=0, end=0, mode='complete', direction='forward'): # runs the animation from a start step number to the end step number @@ -344,6 +352,7 @@ def runAnimation(start=0, end=0, mode='complete', direction='forward'): traj_iterator = range(number_of_trajectories-1, -1, -1) animation_paused = False + for r in traj_iterator: # break animation loop if not InAnimation (this is where pause animation takes place): EA = FreeCAD.ActiveDocument.ExplodedAssembly @@ -394,6 +403,13 @@ def runAnimation(start=0, end=0, mode='complete', direction='forward'): incremental_placement = FreeCAD.Placement(obj_base, obj_rot, obj_rot_center) obj.Placement = incremental_placement.multiply(obj.Placement) + + # Inclusion to connects with Movie Camera module + if MC_CONNECTION == True: + import MovieConnection as co + co.connectionEA() + # End of inclusion + FreeCAD.Gui.updateGui() time.sleep(traj.AnimationStepTime)