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
Merge remote-tracking branch 'origin/main' into feat/real-world-units
islandmeded1b0099f877
diff --cc assets/fonts/NotoSansSC-UI.otfindex cb3ac7fd,2037e887..1e1a0badBinary files differdiff --cc assets/fonts/NotoSansTC-UI.otfindex 859e5505,6b27f320..0f188886Binary files differdiff --cc src/app/App.cppindex 450bbca9,d07cbc89..3e46f23f--- a/src/app/App.cpp+++ b/src/app/App.cpp@@@ -2588,18 -2593,9 +2593,21 @@@ void App::runCommand(const std::stringflushBrushEdits(); // commands may replace brushes: save edits first, then watch what's there afterwardscrashlog::action(name); // (failures reach the log through SDL_Log below)const auto commandStart = std::chrono::steady_clock::now();- // OBJ and PLY have no units: read them in the Preferences > Interface > Units file unit unless the call says.++ // OBJ and PLY have no units: read them in the Preferences > Interface > OBJ/PLY in unit unless the call says.+ Args withUnit;+ if ((name == "open" || name == "open_obj" || name == "part_append") && !args.contains("unit")) {+ const std::string path = argString(args, "path");+ std::string ext = path.size() >= 4 ? path.substr(path.size() - 4) : "";+ std::transform(ext.begin(), ext.end(), ext.begin(), [](unsigned char c) { return char(std::tolower(c)); });+ if (ext == ".obj" || ext == ".ply") {+ withUnit = args;+ withUnit["unit"] = uiPrefs_.fileUnit;+ }+ }- CommandResult r = commands_.execute(doc_, name, withUnit.empty() ? args : withUnit);+ // Auto UV unwraps on a worker (seconds on big meshes): the frame never waits for it. A running macro keeps the+ // synchronous command, as its next steps read the UVs at once.- CommandResult r = name == "uv_auto" && macros_.runDepth == 0 ? startAutoUvCommand(args) : commands_.execute(doc_, name, args);++ CommandResult r = name == "uv_auto" && macros_.runDepth == 0 ? startAutoUvCommand(args)++ : commands_.execute(doc_, name, withUnit.empty() ? args : withUnit);if (perftrace::on()) { // a command that held up the frames (remesh, Divide, micro, open...)const double ms = std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - commandStart).count();if (ms > perf_.traceLongMs) {diff --cc src/core/Document.cppindex 4bb3381f,6681b284..91c23b88--- a/src/core/Document.cpp+++ b/src/core/Document.cpp@@@ -26,9 -26,8 +26,10 @@@ void Document::setMesh(Mesh m, std::stractiveLayer = -1;bvhDirty = false;bridgeName.clear();+ unitlessScale = 0.0;+ unitlessFormat.clear();qremeshGuides.clear();+ partFolders.clear();parts.clear();parts.emplace_back();parts.back().id = nextPartId_++;diff --cc src/core/Project.cppindex ba21918c,683b4a75..05ef84c1--- a/src/core/Project.cpp+++ b/src/core/Project.cpp@@@ -56,8 -55,7 +56,8 @@@ ProjectThumbnailProvider& thumbnailProv// version 1); every other key belongs to// Document::projectSettings (camera, render, brush, symmetry, ...).const char* const kCoreKeys[] = {"format", "version", "app_version", "mesh", "layers", "active_layer",- "parts", "active_part", "brushes", "active_brush", "splats", "attachments",- "parts", "active_part", "part_folders", "brushes", "active_brush", "splats", "attachments"};++ "parts", "active_part", "part_folders", "brushes", "active_brush", "splats", "attachments",+ "unitless_scale", "unitless_format"};std::filesystem::path fsPath(const std::string& p) { return std::filesystem::path(std::u8string(p.begin(), p.end())); }@@@ -1167,12 -1173,17 +1180,22 @@@ bool loadProject(const std::string& pats.bridgeName = parts[i].bridgeName;s.qremeshGuides = std::move(parts[i].qremeshGuides);}+ // Folders (#96): a Part pointing at a folder that isn't there is simply outside any folder.+ if (const Json& folders = manifest["part_folders"]; folders.isArray() && folders.size() <= kMaxProjectParts) {+ std::vector<uint32_t> ids;+ for (const Json& fj : folders.items()) {+ ids.push_back(doc.addPartFolder(fj["name"].isString() ? fj["name"].asString() : std::string("Folder")));+ doc.partFolders.back().collapsed = fj["collapsed"].asBool(false);+ }+ for (size_t i = 0; i < parts.size(); ++i)+ if (parts[i].folder >= 0 && parts[i].folder < int(ids.size())) doc.parts[i].folder = ids[size_t(parts[i].folder)];+ }doc.selectPart(activePart);+ if (const double scale = manifest["unitless_scale"].asNumber(0.0); scale > 0.0 && std::isfinite(scale)) {+ doc.unitlessScale = scale;+ const std::string& format = manifest["unitless_format"].asString();+ doc.unitlessFormat = format == "stl" || format == "obj" || format == "ply" ? format : "";+ }doc.splats = std::move(splats);doc.splatsChanged();if (!skippedSets.empty())