Image editor: slim down to image-loading; park legacy UV editor#24
Open
joeedh wants to merge 1 commit into
Open
Image editor: slim down to image-loading; park legacy UV editor#24joeedh wants to merge 1 commit into
joeedh wants to merge 1 commit into
Conversation
The image editor fused two concerns: loading/displaying images and a full UV editor (UVEditor component, UV picking, select/transform/flag ToolOps, unwrap tools sidebar). To support sculptcore and a future UV-editing abstraction, split them apart. - Park the legacy implementation, unwired, under scripts/editors/image/pending-port/ (ImageEditor.ts, uv_ops.js, uv_selectops.js, uv_transformops.js) with a TODO.md port checklist. Nothing imports them, so they fall out of the TS module graph (tsconfig uses `files`) and are neither typechecked nor bundled. ImageBus.ts stays put: it is a cross-cutting bus token still used by the mesh unwrapper. - New minimal ImageEditor: loads images into ImageBlocks (image.open(), Ctrl+O, DataBlockBrowser) and displays the active image with a checker background + textured quad and pan/zoom. Owns the ImageUser directly, so the active image now lives at `imageEditor.imageUser.image` (was `imageEditor.uvEditor.imageUser.image`). - Update cross-layer consumers to the new path / decouple them: context.activeTexture, image_ops.js dataPath default, and mesh_uvops_base.ts (stops reaching into editor.uvEditor; defaults selectedFacesOnly=true until the new UV layer restores a binding). Regenerate the datapath catalog and update documentation/editors.md. A new UV-editing abstraction layer will be designed in a follow-up plan; see scripts/editors/image/pending-port/TODO.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
f0431c9 to
eaff69a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The image editor fused two concerns — loading/displaying images and a full UV editor (the
UVEditorUIBase component, UV picking, select/transform/flag ToolOps, and the unwrap-tools sidebar). To support sculptcore and a forthcoming UV-editing abstraction, this splits them apart and reduces the editor to a single responsibility: loading images intoImageBlocks and displaying the active one.Changes
scripts/editors/image/pending-port/:ImageEditor.ts,uv_ops.js,uv_selectops.js,uv_transformops.js, plus a detailedTODO.mdport checklist. Nothing imports them, so they fall out of the TS module graph (tsconfig.jsonusesfiles, not a glob) and are neither typechecked nor bundled.ImageBus.tsstays at its original location — it's a cross-cutting bus token still imported by the mesh addon's unwrapper and re-exported from@framework/api. The new editor simply doesn't subscribe (seam-line triggers become harmless no-ops).ImageEditor.ts(~365 lines):image.open()menu + Ctrl+O + aDataBlockBrowser; displays the active image with a checker background + textured quad and pan/zoom (VelPan+ wheel). Owns theImageUserdirectly, so the active image now lives atimageEditor.imageUser.image(wasimageEditor.uvEditor.imageUser.image).scripts/core/context.ts—activeTexturereadseditor.imageUser.image.scripts/image/image_ops.js—dataPathdefault →imageEditor.imageUser.addons/builtin/mesh/src/mesh_uvops_base.ts— stops reaching intoeditor.uvEditor; defaultsselectedFacesOnly = trueuntil the new UV layer restores a real binding.pnpm gen:paths); updateddocumentation/editors.md.Tool paths that were registered as a side effect of the old files (
uveditor.*,image.set_type) are intentionally no longer registered — seepending-port/TODO.md. The mesh-addon unwrap/relax/pack ToolOps are unaffected (they live in the mesh addon); they just lose their image-editor UI surface for now.Follow-up
A new UV-editing abstraction layer will be designed in a separate plan and will replace
pending-port/. The checklist (decouple UV display/edit from theMeshaddon, restoreselectedFacesOnly, replace thewindow.redraw_uveditorsglobal with a bus signal, relocateimage.set_type) lives inscripts/editors/image/pending-port/TODO.md.Verification
pnpm buildsucceeds.npx tsgo --noEmit: zero new errors in any touched file (the 108 reported are all pre-existing baseline files —pbvh_sculptops.ts,subsurf_mesh.ts, sculptcore node-types, etc.).🤖 Generated with Claude Code