Skip to content

Commit

Permalink
Fix load problem for knee simulator example (#665)
Browse files Browse the repository at this point in the history
* Fix load problem for knee simulator example

* Use overlay from assist folder if it exists

* Pin sphinx build packages

* Fix paths
  • Loading branch information
melund authored May 2, 2022
1 parent 7c1b583 commit eb3646f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Application/Examples/KneeSimulator/Model/AnyKneeSimulator.any
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ Main = {
InverseDynamics.ForceDepKin.MaxNewtonStep = FDK_MaxNewtonStep;
InverseDynamics.ForceDepKin.LocalSearchOnOff = FDK_LocalSearchOnOff;

#ifdef TOOLS_MODELUTILITIES_VIDEO_CAMERACLASSTEMPLATE
// Include functions to generate a video:
// -> Run `Study.VideoTool.Preview` to preview the camera view.
// -> Run `Study.VideoTool.Create_Video` to generate video from the analysis.
#include "CreateVideo.any"
#endif

};

#include "OperationSequences.any"
Expand Down
13 changes: 12 additions & 1 deletion Application/Examples/KneeSimulator/Model/ClassTemplates.any
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
#include "../../../../Tools/ModelUtilities/Video/CameraClassTemplate.any"


#ifndef ANYBODY_PATH_MODELUTILS
#ifpathexists "..\..\..\..\Tools\ModelUtilities"
#path ANYBODY_PATH_MODELUTILS "..\..\..\..\Tools\ModelUtilities\"
#endif
#endif

#ifdef ANYBODY_PATH_MODELUTILS
#include "<ANYBODY_PATH_MODELUTILS>/Video/CameraClassTemplate.any"
#endif


#define NONE_ZERO_DIVISION(A, B, Threshold) A/iffun(gteqfun(B, Threshold), B, 1e10)

Expand Down
6 changes: 3 additions & 3 deletions Docs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: sphinx
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.9
- pip
- sphinx
- sphinx=3.5.4
- make
- myst-parser
- cloud_sptheme
- pygments_anyscript
- matplotlib
- pillow
- jinja2
- jinja2=3.0.1
- pip:
- sphinxext-opengraph
5 changes: 5 additions & 0 deletions Tools/ModelUtilities/Video/CameraClassTemplate.any
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ Main = {
#define _CAMERA_FFMPEG_DEFAULT_PATH_ "ffmpeg.exe"
#endif #endif


#ifpathexists "<ANYBODY_PATH_INSTALLDIR>\Assist\video_overlay.png"
#define _ANYBODY_OVERLAY_LOGO_ ANYBODY_PATH_INSTALLDIR + "\Assist\video_overlay.png"
#else
#define _ANYBODY_OVERLAY_LOGO_ ANYBODY_PATH_MODELUTILS + "video_overlay.png"
#endif

#class_template VideoLookAtCamera (
UP_DIRECTION = y,
Expand Down

0 comments on commit eb3646f

Please sign in to comment.