Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion ExplodedAssembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)

Expand Down