prebuilt() only split render_asset on an escaped double backslash and then on
'/', so paths using single backslashes (mesh\ftcommunityitems\x.nif) kept
their directories in the file name. The LXFML lookup then failed and
get_model returned 500. Extract the base name by splitting on any run of
backslashes or forward slashes and lowercasing it. Also return 404 instead
of an unusable string when a LOT has no render asset.
Co-authored-by: bob-g-code <346622190+bob-g-code@users.noreply.github.com>
With several gunicorn workers and an empty cache, every worker ran the
brickdb unpack at once and workers crashed with FileExistsError on
app/cache/brickprimitives. Serialize it with a file lock, extract to a temp
dir and move into place, and mark completion with a marker file.
Co-authored-by: bob-g-code <bob-g-code@users.noreply.github.com>
UGC LXFML brick transforms are relative to the model's own origin, but the
LDD viewer added the bricks straight to the scene and never applied the
model's properties_contents position/rotation, so the models ended up around
(0,0,0), far below the property ground plane. Properties with only
brick-built models showed just the green ground.
Build each LXFML into its own THREE.Group placed with the saved
position/quaternion (like pre-built models), load each file into a fresh
Scene, and target the single-model camera at the placed model.
Co-authored-by: bob-g-code <346622190+bob-g-code@users.noreply.github.com>
Deleting an account crashed with IntegrityError (ugc.character_id cannot be
null) and left the account half-deleted. Remove all dependent rows explicitly
with bulk deletes in a single transaction, and roll back on failure.
Co-authored-by: bob-g-code <bob-g-code@users.noreply.github.com>