View Issue Details

IDProjectCategoryView StatusLast Update
0000046FreeCADFeaturepublic2010-06-29 13:18
ReporterJriegelAssigned Towmayer  
Status closedResolutionfixed 
Target Version0.10Fixed in Version0.10 
Summary0000046: Changing viewer methods for animation
DescriptionChanging the interface of the animation in the 3DViwer thereby is one
methode which get as parameter (StartCamera, EndCamera, AnimationTime).
That allows more flexible to add animation to different applications
and a decent python interface.
TagsNo tags attached.
FreeCAD Information



2010-06-15 09:08

administrator   ~0000245

Implemented in rev. 3229

The method View3DInventorViewer::moveCameraTo has been added which accepts an SbRotation and SbVec3f for the target camera position, an int for the number of steps and a further int for the delay in ms between two steps to achieve the animation.

The method viewPosition() has been added to the Python binding for the viewer class. This method accepts three optional arguments where:
* the first argument is a placement to describe the camera movement
* the second parameter is an int for the number of steps (default: 20)
* the third parameter is an int for the delay in ms (default: 30)

The method always returns the current camera position as placement. If no argument is given nothing is done but the current position is returned.

# move the camera by hand
# move the camera by hand
for i in pos:

StartCamera as first argument doesn't make much sense because it is actually always the current camera position.
In case you really need a StartCamera which different is different to the current camera position you can achieve this by doing an additional first step:
Gui.ActiveDocument.ActiveView.viewPosition(StartCamera,0)# go directly to the start position without animation


2010-06-16 14:07

administrator   ~0000246



Issue History

Date Modified Username Field Change
2009-12-04 17:31 Jriegel New Issue
2009-12-04 17:32 Jriegel Status new => assigned
2009-12-04 17:32 Jriegel Assigned To => wmayer
2010-06-15 09:08 wmayer Note Added: 0000245
2010-06-15 09:08 wmayer Status assigned => closed
2010-06-15 09:08 wmayer Resolution open => fixed
2010-06-15 09:08 wmayer Summary Changing viewer methodes for animation => Changing viewer methods for animation
2010-06-16 14:07 Jriegel Note Added: 0000246
2010-06-29 13:18 Jriegel Fixed in Version => 0.10
2010-06-29 13:18 Jriegel Target Version => 0.10