-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Quake MDL feature #1591
base: master
Are you sure you want to change the base?
Quake MDL feature #1591
Changes from all commits
eab32ff
5cbf999
ccc8bdb
53145f7
81299cf
7037bd6
661ea9c
8d14eca
3356577
a8719c8
ccc3325
cf5f77e
59e51a4
0c69f22
60c5729
2cd0da5
9b58ad3
369b290
812df50
3b730a9
5bf4c14
d716829
52c2779
1b9e52a
09262d4
067d638
99b613f
b14dbc5
9dae267
e5f9f50
ae5c136
df6ec1b
85fc6d3
d70d78c
3b3ba5d
8bd72b5
9ae39fe
62dc0d3
c9d0cec
1915572
98a0870
d24665e
c12920e
7f2d79d
5cd40bc
d918979
2bef09f
79953f9
387d907
4cb6286
742908a
80d5116
4a1ffc3
62b1e79
d5e6fd8
27f82fd
559f230
6593b20
f651dbf
379edd8
1258b22
0057fa9
41e9a6a
467a64a
2755118
9d3f454
4bee8b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Youva marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,5 +61,12 @@ | |
"anti-aliasing": false, | ||
"translucency-support": false | ||
} | ||
}, | ||
{ | ||
"match": ".*(mdl)", | ||
"options": { | ||
"up": "+Z", | ||
"animation-index": "-1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So most animated models have multiples animations baked in and all animations should be enabled by default ? |
||
} | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,5 +44,12 @@ | |
"anti-aliasing": false, | ||
"translucency-support": false | ||
} | ||
}, | ||
{ | ||
"match": ".*(mdl)", | ||
"options": { | ||
"up": "+Z", | ||
"animation-index": "-1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that doesnt make much sense for thumbnail to have a animation related option tbh |
||
} | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
set(classes | ||
vtkF3DSplatReader | ||
vtkF3DQuakeMDLImporter | ||
) | ||
|
||
set(_no_install "") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set(vtkextNative_list | ||
TestF3DQuakeMDLImporter.cxx | ||
) | ||
|
||
vtk_add_test_cxx(vtkextNativeTests tests | ||
NO_DATA NO_VALID NO_OUTPUT | ||
${vtkextNative_list} | ||
${F3D_SOURCE_DIR}/testing/ ${CMAKE_BINARY_DIR}/Testing/Temporary/) | ||
|
||
vtk_test_cxx_executable(vtkextNativeTests tests) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "vtkF3DQuakeMDLImporter.h" | ||
|
||
#include <vtkDoubleArray.h> | ||
Youva marked this conversation as resolved.
Show resolved
Hide resolved
|
||
#include <vtkNew.h> | ||
#include <vtkTestUtilities.h> | ||
|
||
#include <iostream> | ||
|
||
int TestF3DQuakeMDLImporter(int vtkNotUsed(argc), char* argv[]) | ||
{ | ||
std::string filename = | ||
std::string(argv[1]) + "data/zombie_2.mdl"; // File was modified to add coverage. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ideally clarify what codepath it covers ? error ? specific feature ? |
||
vtkNew<vtkF3DQuakeMDLImporter> importer; | ||
std::cout << filename; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not needed |
||
importer->SetFileName(filename); | ||
importer->Update(); | ||
importer->Print(cout); | ||
vtkIdType numAnimations = importer->GetNumberOfAnimations(); | ||
for (int i = 0; i < numAnimations; i++) | ||
{ | ||
importer->DisableAnimation(i); | ||
} | ||
vtkIdType selectedAnimationIndex = 0; | ||
importer->EnableAnimation(selectedAnimationIndex); | ||
std::string animationName = importer->GetAnimationName(0); | ||
return numAnimations == 1 && animationName == "frame" ? EXIT_SUCCESS : EXIT_FAILURE; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.