AnimateDocumentObserver Namespace Reference

AnimateDocumentObserver and a method how to safely add it to FreeCAD. More...

Classes

class  AnimateDocumentObserver
 Class that keeps Animate workbench objects in recommended structures. More...
 

Functions

def addObserver ()
 Adds an AnimateDocumentObserver between FreeCAD's document observers safely. More...
 

Variables

list ANIMATE_OBJECT_GROUP_CLASSES
 All the DocumentObjectGroupPython classes in the Animate workbench. More...
 
list ANIMATE_CLASSES
 All the FeaturePython and DocumentObjectGroupPython classes in the animate toolbox. More...
 
list ALLOWED_IN_CONTROL
 Classes allowed in the Control group. More...
 

Detailed Description

AnimateDocumentObserver and a method how to safely add it to FreeCAD.

Function Documentation

◆ addObserver()

def AnimateDocumentObserver.addObserver ( )

Adds an AnimateDocumentObserver between FreeCAD's document observers safely.

It's preferred to add an AnimateDocumentObserver using this method, because other ways could result in having multiple document observers added to FreeCAD. Having a lot of document observers slows down FreeCAD due to necessity to inform them all about imminent changes and so on.

Definition at line 328 of file AnimateDocumentObserver.py.

328 def addObserver():
329  # Check FreeCAD doesn't have an AnimateDocumentObserver already assigned
330  # and assign one
331  if not hasattr(FreeCAD, "animate_observer"):
332  FreeCAD.animate_observer = AnimateDocumentObserver()
333  FreeCAD.addDocumentObserver(FreeCAD.animate_observer)
AnimateDocumentObserver and a method how to safely add it to FreeCAD.

Variable Documentation

◆ ALLOWED_IN_CONTROL

list AnimateDocumentObserver.ALLOWED_IN_CONTROL
Initial value:
1 = ["TrajectoryProxy", "ServerProxy",
2  "CollisionDetectorProxy", "RobWorldProxy",
3  "RobRotationProxy", "RobTranslationProxy"]

Classes allowed in the Control group.

Definition at line 50 of file AnimateDocumentObserver.py.

◆ ANIMATE_CLASSES

list AnimateDocumentObserver.ANIMATE_CLASSES
Initial value:
1 = ["TrajectoryProxy", "ControlProxy", "ServerProxy",
2  "CollisionDetectorProxy", "CollisionProxy", "RobWorldProxy",
3  "RobRotationProxy", "RobTranslationProxy"]

All the FeaturePython and DocumentObjectGroupPython classes in the animate toolbox.

Definition at line 45 of file AnimateDocumentObserver.py.

◆ ANIMATE_OBJECT_GROUP_CLASSES

list AnimateDocumentObserver.ANIMATE_OBJECT_GROUP_CLASSES
Initial value:
1 = ["TrajectoryProxy", "ControlProxy",
2  "CollisionDetectorProxy", "RobWorldProxy",
3  "RobRotationProxy", "RobTranslationProxy"]

All the DocumentObjectGroupPython classes in the Animate workbench.

Definition at line 39 of file AnimateDocumentObserver.py.