FreeCAD workbench to create assembly handbooks
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
671 B

from typing import Optional
import FreeCADGui as Gui
import FreeCAD as App
class AHB_Animate:
def GetResources(self):
return {"MenuText": "Animate",
"ToolTip": "Animate active stage to show all build stages",
"Pixmap": ""
}
def IsActive(self):
return True
def Activated(self, stageId: Optional[int] = None):
workbench = Gui.getWorkbench("AssemblyHandbookWorkbench")
workbench.context.setAnimationActive(not workbench.context.getAnimationActive())
from ahb_command import AHB_CommandWrapper
AHB_CommandWrapper.addGuiCommand('AHB_animate', AHB_Animate())