View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000046 | FreeCAD | Feature | public | 2009-12-04 17:31 | 2010-06-29 13:18 |
Reporter | Assigned To | wmayer | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 0.10 | Fixed in Version | 0.10 | ||
Summary | 0000046: Changing viewer methods for animation | ||||
Description | Changing 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. | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
Implemented in rev. 3229 C++: 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. Python: 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. Example: pos=[] pos.append(Gui.ActiveDocument.ActiveView.viewPosition()) # move the camera by hand pos.append(Gui.ActiveDocument.ActiveView.viewPosition()) # move the camera by hand for i in pos: Gui.ActiveDocument.ActiveView.viewPosition(i) Note: 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 Gui.ActiveDocument.ActiveView.viewPosition(EndCamera) |
|
Cooooool!! thanks!! |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-12-04 17:31 |
|
New Issue | |
2009-12-04 17:32 |
|
Status | new => assigned |
2009-12-04 17:32 |
|
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 |
|
Note Added: 0000246 | |
2010-06-29 13:18 |
|
Fixed in Version | => 0.10 |
2010-06-29 13:18 |
|
Target Version | => 0.10 |