Commit Graph
132 Commits
Author SHA1 Message Date
Leonardo Zide 688859b120 Localize numeric displays and HTML export labels
Format UI measurements, snap angles, ladder increments, edge-color values, Preferences labels, counts, and step/page labels using the widget locale without grouping. Preserve numeric table sorting with stored count values and trim localized zero digits correctly. Give float/double formatting and float parsing explicit helper names.

Mark HTML export titles, navigation, alternate text, and credits for translation, escape translated text, and declare UTF-8 output. Keep numbers in HTML, piece-list images, and print/PDF output in ASCII. Include the pending command-status translation drafts in all eight language catalogs, preserving their unfinished review status.

Validation: macOS Qt debug build, display and count-sorting checks across ten locales, all three HTML layouts with test translations under an Arabic numeric locale, and ASCII print/image checks. All eight catalogs pass XML, changed-placeholder, and lrelease validation.
2026-10-23 14:17:52 -07:00
Leonardo Zide 5c1126519d Reject invalid Array and transform input with optional results
Rename the localized float parser to lcParseFloatValueLocalized and return std::optional<float> so conversion failures and nonfinite values cannot silently become zero. Return std::optional<lcVector3> from GetTransformAmount and apply transforms only when every nonempty axis is valid, preserving blank axes as zero.

Validate all Array offsets and rotations before updating dialog results, and show an informational message with focus on invalid input. Verified with a macOS Qt debug build and actual Array/transform checks in US English, German, and Arabic locales, including blank input, overflow, NaN, and infinity.
2026-10-23 13:04:18 -07:00
Leonardo Zide 5f3bfbf9fa Use consistent message severities and simplify ordinary dialogs
Show recoverable rendering, export, library, and network failures as warnings.
Default Blender messages to Warning, keep renderer startup failures Critical,
and remove the duplicate Blender installation failure dialog.

Replace 28 ordinary Blender helper calls with QMessageBox statics while
retaining specialized dialogs with informative text, details, or update
preferences. Preserve confirmation buttons and defaults and suppress static
startup/export messages without a main window. Rename the failed-result
helper to ShowResultError and refresh catalog locations and retired strings.

Validation: Qt 6.10 debug build; catalog coverage for all 2,056 active messages
and existing translation preservation; git diff --check.
2026-10-22 12:29:30 -07:00
Leonardo Zide 61be531444 Manage piece data ownership with scoped asset references
Replace manual piece-data retain/release bookkeeping with shared copyable
asset-reference handles. Pieces, models, selection, minifigs, thumbnails,
and stored insertion previews retain their dependencies explicitly, while
transient queries continue to borrow pointers.

Separate registered lookup and acquisition from asynchronous load requests
and explicit readiness waits. Keep loader-held references through work and
notification delivery, resetting shared request handles on the UI thread
and guarding callback-triggered library teardown.

Validated with the Qt 6.10 debug build and 26 offscreen lifecycle checks,
including cancellation, stale requests, copy/move operations, model/preview
teardown, undo, project merge/export, and loader shutdown.
2026-10-19 10:02:26 -07:00
Leonardo Zide 7bc6c018b1 Rename PieceInfo to lcPieceData
Use PieceData consistently for the shared part/model record, its related
APIs and variables, and its source files. Keep the existing reference
counting and loading behavior so ownership and readiness changes can be
reviewed separately.
2026-10-18 23:22:28 -07:00
Leonardo Zide 6438bf2682 Expand far clipping distance when fitting large models
Large models can extend beyond the default far plane after fitting,
leaving the view blank or clipped. Pass an explicit adjustment flag
through view, model, and camera fitting, and reuse the fitted bounds
to expand clipping with a margin, rounded up to multiples of 10,000.

Adjust restored ordinary cameras after applying their saved state.
Preserve named cameras and explicit command-line clipping planes,
and avoid recalculating clipping during redraws or navigation.

Route output fitting through the view and move the bounds policy
definition out of the precompiled header.
2026-10-09 15:00:18 -07:00
Leonardo Zide a719139d47 Replace asset loading progress bar with animated spinner 2026-09-30 10:15:44 -07:00
Leonardo Zide bd6bd50ecc Require complete geometry for image and 3D exports
Report missing generated meshes and failed image writes, keep thumbnails and interactive geometry using their fallback behavior, and frame command-line images at the requested step or full range. Use explicit mesh loader flags and reject incomplete synthesized meshes. Keep selection and ray tests aligned with the rendered mesh.
2026-09-28 11:39:49 -07:00
Leonardo Zide 1d02dde890 Scope project pieces and preserve assets across model changes
Keep project-local piece mappings separate from library pieces and preserve references across rename, merge, delete, and Save As.

Remap local external pieces after Save As, retain texture source order, invalidate stale loads, and refresh previews and thumbnails after asset changes. Save projects atomically and preserve active model selection in the model list.
2026-09-28 09:22:09 -07:00
Leonardo Zide 8e2490c4ba Open LDraw and LDD projects without waiting for meshes
Queue model geometry builds and mesh conversion on workers so project opening can return after parsing. Keep complete-asset waits for previews and output, and show project loading progress in the status bar.

Preserve live pieces when project names overlap, restore mappings after failed loads, and include detached pieces in buffer and stud-style updates.
2026-09-27 10:59:34 -07:00
Leonardo Zide d6359a063a Show loading placeholders and require complete assets for output
- Draw a shared cube for parts whose meshes or textures are still loading.
- Update model bounds, picking, views, and loading status as assets complete.
- Wait for required assets before thumbnails, screenshots, instructions,
  and geometry exports; report failures instead of rendering placeholders.
- Render and pick direct geometry in external projects.
- Defer shared buffer repacking until pending loads finish.
2026-09-26 16:06:20 -07:00
Leonardo Zide 0361c61ab1 More result cleanup. 2026-07-31 22:53:25 -07:00
Leonardo Zide 9dbe3695b7 Add new lcResult class to handle task failures more cleanly. 2026-07-29 22:48:12 -07:00
Leonardo Zide 2439e6f72e Fix MMB not closing model tabs. 2026-07-22 17:19:28 -07:00
Leonardo Zide 2574114ae4 Update recent menu when it's shown. 2026-07-22 16:10:13 -07:00
Leonardo Zide 60c4a674c6 Support merging multiple files at once. Fixes #1007. 2026-05-20 16:54:03 -07:00
Leonardo Zide 80ea68245c Move Select Dialog. 2026-05-02 16:06:27 -07:00
Leonardo Zide e4b829b7e2 Reorganize Save Image dialog. 2026-05-02 15:44:48 -07:00
Leonardo Zide 44de1f19fc Reorganized the Render Dialog. Fixes #875. 2025-08-03 11:47:51 -07:00
Leonardo Zide 72c8e7a6c2 Update parts in use category after changes. Fixes #890. 2024-11-14 17:28:51 -08:00
Leonardo Zide 82463473d5 Renamed part selection events. 2024-07-25 17:56:29 -07:00
Leonardo Zide b2074a7c0a Use the part selection widget in the properties widget. 2024-07-25 14:16:23 -07:00
Leonardo Zide cb6a836178 Use unique_ptr to control group ownership. 2024-05-27 11:43:36 -07:00
Leonardo Zide 45ab8e8d60 Update camera menu before showing. 2024-02-19 17:51:34 -08:00
Leonardo Zide ef43c152ad Replaced piece properties widget. 2023-12-31 12:55:35 -08:00
Trevor SANDY e98e375984 Blender addon - render command 2023-06-11 17:43:25 +02:00
Leonardo Zide 4ca78ec8ec Moved color list widget files. 2023-04-29 19:48:30 -07:00
Leonardo Zide 7d884e6b5f Static analysis fixes. 2021-11-14 18:34:24 -08:00
Leonardo Zide 7a9e193d41 View cleanup. 2021-02-28 11:32:12 -08:00
Leonardo Zide 92c8bdc09a View cleanup. 2021-02-27 11:53:00 -08:00
Leonardo Zide 4a77391c6b Removed GetViews(). 2021-02-27 11:32:52 -08:00
Leonardo Zide 95fbc13247 Removed GetViewsForModel. 2021-02-27 11:15:04 -08:00
Leonardo Zide 4b36b90f7c Fixed view array removal loop. 2021-02-27 10:46:10 -08:00
Hubert Figuière cd68bb16a5 Remove views in destructor
- This avoid a use-after-free when the view remove itself in its dtor
2021-02-26 22:28:56 -05:00
Leonardo Zide 3bee3a2bcf Removed the find widget part checkbox. 2021-01-31 12:05:15 -08:00
Leonardo Zide b74eb3a81e New find/replace widget. 2021-01-30 15:37:17 -08:00
Leonardo 75fdca0387 Added transform menu and indicator. Fixes #554. 2021-01-29 15:18:02 -08:00
Leonardo Zide b70fab3059 Require Qt5. 2021-01-08 10:35:52 -08:00
Leonardo Zide f9c025f3b9 Show preview widget when double clicking. Fixes #589. 2021-01-05 12:32:03 -08:00
Leonardo Zide 9f6c0abf23 Set MSAA from application. 2020-12-30 16:43:23 -08:00
Leonardo Zide 58981f9580 Added option to paint selected pieces. Fixes #561. 2020-12-29 19:20:03 -08:00
Leonardo Zide 7de5d4eb22 Renamed view class. 2020-12-25 10:54:33 -08:00
Leonardo Zide 72bb41e8aa Added shortcut to toggle the grid. 2020-12-23 19:10:54 -08:00
Leonardo Zide 2718a4253c Cleanup. 2020-12-23 18:16:00 -08:00
Leonardo Zide baa0a70de2 Refactored duplicate code. 2020-12-18 12:15:35 -08:00
Leonardo a492a935b6 Renamed lcQGLWidget to lcViewWidget. 2020-12-17 17:59:11 -08:00
Leonardo Zide c2d1b5ce7c Use events for view focus changes. 2020-12-15 18:27:54 -08:00
Leonardo Zide de29c49608 Reorganized redraw. 2020-12-15 17:19:32 -08:00
Leonardo Zide a0385a3783 Merged menu update functions. 2020-12-15 10:20:14 -08:00
Leonardo Zide 1ce80b8c2c Have the view use signals to pass camera changes to the main window. 2020-12-13 10:33:42 -08:00