Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Tool > Geometry > Micro on one row (the slider beside its buttons), so the section keeps its height
islandmedb1c0d076c2f2
diff --git a/src/app/PanelGeometry.cpp b/src/app/PanelGeometry.cppindex 9ae0a903..e7b95404 100644--- a/src/app/PanelGeometry.cpp+++ b/src/app/PanelGeometry.cpp@@ -64,16 +64,17 @@ void App::drawGeometrySection() {ImGui::TextDisabled("No subdivision levels - Divide adds them");}- // Micro: displacement levels above the highest level (core/Micro.h).- ImGui::Spacing();+ // Micro: displacement levels above the highest level (core/Micro.h). One row: the level slider and Divide to+ // Micro (or Bake / Delete once there is one), so the section stays as tall as before.const bool micro = hasMicro(m);if (micro) microSlider_ = float(microLevel(m));+ const float sliderW = std::floor(ImGui::GetContentRegionAvail().x * 0.42f);ImGui::BeginDisabled(micro);- ImGui::SetNextItemWidth(-1);+ ImGui::SetNextItemWidth(sliderW);{const size_t est = m.triangleCount() << (2 * int(microSlider_));char fmt[64];- std::snprintf(fmt, sizeof fmt, "Micro %%.0f (%.0fM)", double(est) / 1e6);+ std::snprintf(fmt, sizeof fmt, "Micro %%.0f (%.0fM)", double(est) / 1e6);ui::SliderInside("##micro", µSlider_, 1.0f, float(MicroMesh::kMaxLevel), fmt, ImGuiSliderFlags_AlwaysClamp);microSlider_ = std::round(microSlider_);}@@ -83,13 +84,16 @@ void App::drawGeometrySection() {"displacement per point (no mesh), so 300 million triangles take about 0.4 GB and sculpt in real time. ""Move reshapes the level below and the detail rides along.","Tool > Geometry");+ ImGui::SameLine();if (!micro) {ui::ActionButton(*this, "geometry.micro_divide", ImVec2(-1, 0));} else {- ui::ActionButton(*this, "geometry.micro_bake", ImVec2(half, 0));+ const float w = (ImGui::GetContentRegionAvail().x - style.ItemSpacing.x) * 0.5f;+ ui::ActionButton(*this, "geometry.micro_bake", ImVec2(w, 0));+ ImGui::SameLine();+ ui::ActionButton(*this, "geometry.micro_delete", ImVec2(-1, 0));+ ui::ActionButton(*this, "geometry.micro_export", ImVec2(half, 0));ImGui::SameLine();- ui::ActionButton(*this, "geometry.micro_delete", ImVec2(half, 0));- ui::ActionButton(*this, "geometry.micro_export", ImVec2(-1, 0));ImGui::Checkbox("Move along normals", &doc_.sculptor.microMoveAlongNormals);}if (micro && m.micro) { // (a button above may have just removed it)