Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FileMesh handling of AnimationExport #142

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading