Skip to content

Commit

Permalink
Merge pull request #142 from ModiaSim/gh_fixAnimationExportFileMeshHa…
Browse files Browse the repository at this point in the history
…ndling

Fix FileMesh handling of AnimationExport
  • Loading branch information
AndreaNeumayr authored Feb 29, 2024
2 parents d7c935b + b8acb12 commit b22a9c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ julia -JModia3D_sysimage.so (otherwise)
- Add Result Element SensorResult
- Enable kinematic chain flipping for structure variable systems
- Avoid function code generation for linear stiffness and damping in SpringDamperPtP and Bushing
- Enable FileMesh support in AnimationExport for other mesh file formats than obj


### Version 0.12.2
Expand Down
9 changes: 3 additions & 6 deletions src/AnimationExport/exportAnimation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,12 @@ function exportObject(object, elements, obj::Modia3D.Composition.Object3D, fileM
(head,ext) = splitext(filenameOld)
if ext == ".json"
filename = filenameOld
elseif ext == ".obj"
else
filename = head * ".json"
if !isfile(filename)
@warn("Please convert $filenameOld into a .json file.")
return nothing
@warn("Only FileMeshes in three.js json object scene format are supported by AnimationExport.\nPlease convert $filenameOld into a .json file and move it to the same folder.")
return (nothing, nothing)
end
else
@warn("Please convert $filenameOld into a .json file.")
return nothing
end

io = open(filename, "r")
Expand Down

0 comments on commit b22a9c3

Please sign in to comment.