Directory folder and file-list indices are only needed while initializing
descriptions and their cache. Replace the persistent lcPieceData fields
with local jobs holding the selected file info, source folder and change
flag. Workers update independent jobs, and cache writing uses their
timestamps after all workers finish.
Pass the discovered paths to alias classification so it opens the selected
source directly without reconstructing paths from asset bookkeeping.
Move include-free piece member defaults into the header and zero-initialize
the filename and description arrays there.
Validated with a warning-free Qt 6.10 Debug build, 58 offscreen lifecycle
groups covering directory/archive caches and cross-source aliases, and
clean diff whitespace checks.
Detect decorations from filenames and description keywords so obsolete
parts with numeric IDs and descriptions starting with ~ are hidden when
Show Decorated Pieces is disabled. Keep decoration flags separate from
the optional plain parent ID, preserving classification when no parent
exists and leaving standalone stickers outside the current heuristic.
Resolve single-reference aliases across official and unofficial sources,
reject cycles, and use resolved parent IDs for category grouping. Cache
classification with descriptions and rebuild dependent alias metadata when
directory sources change. Keep local classification and cache restoration
in lcPieceData; the library handles source reads and registry resolution.
Validated with a warning-free Qt 6.10 Debug build, 58 lifecycle checks,
and offscreen filter checks for 81 obsolete numeric patterned parts on
cold and cached loads.
Fixes#538
Update model filenames and descriptions directly in SetModel, removing
metadata-only forwarding through the library and piece manager. Registry
renames remain synchronized in the manager.
Reuse the bounded piece-name normalizer for archive and directory discovery
to remove duplicated conversion loops and avoid writing a terminator past
the name buffer. Preserve original source filenames and archive offsets.
Validated with a warning-free Qt 6.10 Debug build and all 51 offscreen
lifecycle groups; diff whitespace checks pass.
Piece registrations were centralized but creation, reference bookkeeping and
cleanup still lived in the library. Move creation/model reuse, normalization,
metadata renaming, reference operations, temporary cleanup, project transfer and
ordered identity teardown into the manager. Keep registration/deletion helpers
private and remove the temporary local-registry enumeration APIs.
The library remains the acquisition facade and coordinates source resolution,
loading, invalidation and cancellation after unlocking. Handles still bind to
the library. Clear sparse errors from lcPieceData::Unload before resource teardown
so manager deletion does not require a library pointer or callback. Sparse error
storage and the existing synchronization remain library-side.
Use one project-aware manager lookup, passing nullptr for shared-only searches.
Remove the maximum-size name reservation so short names can use inline storage.
Replace remaining bounded C-string copy/terminator pairs with lcstrcpy and record
the helper convention in common/AGENTS.md. Update the asset lifetime documentation.
Validation: macOS Qt 6.10 Debug build, whitespace checks and 40 offscreen lifecycle
checks, including already-zero release, last-owner cancellation, model reuse,
project detach/transfer cleanup, sparse errors, archive/directory caches and forced
nested external-project teardown. Successful GPU rendering is not covered by the
offscreen checks.
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.