Accept system Assimp 6.x #12
No files matched your search
@@ -20,7 +20,11 @@ find_package(OpenGL REQUIRED)
|
||||
|
||||
# --- Assimp --------------------------------------------------------------------
|
||||
# Assimp 5.2 (Ubuntu 22.04) crashes on some Blender FBX exports and uses older bone-offset conventions.
|
||||
# Assimp's version file only matches the requested major version, so look for 6.x separately.
|
||||
find_package(assimp 5.3 CONFIG QUIET)
|
||||
if(NOT assimp_FOUND)
|
||||
find_package(assimp 6 CONFIG QUIET)
|
||||
endif()
|
||||
if(NOT assimp_FOUND)
|
||||
if(NOT MR_FETCH_ASSIMP)
|
||||
message(FATAL_ERROR "Assimp not found. Install it or configure with -DMR_FETCH_ASSIMP=ON")
|
||||
|
||||
@@ -148,6 +148,7 @@ private:
|
||||
float motionFrame_ = 0.f;
|
||||
bool playing_ = false;
|
||||
bool loopMotion_ = true;
|
||||
int frameInput_ = 0;
|
||||
double lastTick_ = -1.0;
|
||||
std::shared_ptr<Motion> camera_;
|
||||
std::string cameraName_;
|
||||
|
||||
@@ -59,10 +59,11 @@ void App::drawTimelineWindow() {
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(">|")) setMotionFrame(end);
|
||||
ImGui::SameLine();
|
||||
int frame = static_cast<int>(motionFrame_ + 0.5f);
|
||||
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 4.5f);
|
||||
if (ImGui::InputInt("##frame", &frame, 0, 0, ImGuiInputTextFlags_EnterReturnsTrue))
|
||||
setMotionFrame(std::clamp(static_cast<float>(frame), 0.f, end));
|
||||
ImGui::InputInt("##frame", &frameInput_, 0, 0);
|
||||
if (ImGui::IsItemDeactivatedAfterEdit())
|
||||
setMotionFrame(std::clamp(static_cast<float>(frameInput_), 0.f, end));
|
||||
if (!ImGui::IsItemActive()) frameInput_ = static_cast<int>(motionFrame_ + 0.5f);
|
||||
ImGui::SameLine();
|
||||
const float seconds = motionFrame_ / 30.f;
|
||||
ImGui::Text("/ %.0f %d:%05.2f", end, static_cast<int>(seconds) / 60, std::fmod(seconds, 60.f));
|
||||
|
||||
Reference in new issue
Block a user