Add brush_position_anchor - #9113
Merged
4ian merged 4 commits intoSep 16, 2026
Merged
Conversation
`brush_position` positions the ORIGIN of an instance, which for a 3D model is the origin the model was authored with - usually near its middle, not the corner of its box. The agent placed every part of a tank as if the position were the minimum corner, and the turret ended 16px behind the hull and flush with its edge: the arithmetic needs an origin nothing tells before the objects are placed. `put_2d_instances`/`put_3d_instances` now take a `brush_position_anchor` (`origin` by default, `min_corner`, `center`, and `bottom_center` in 3D): each instance is moved by its own size so that the point named lands on the brush position, which needs nothing to be known of the origin and makes two parts centered on each other the same position. It is refused, rather than guessed, when the size or the origin of the object is unknown (a 3D model that could not be read included). `fit_area_to_children` also reports where each child ended up (its box and its middle) and what the custom object turns around: the center of its area, or its own position with `centered_on_origin`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CuhWWcQTYqEwUG5RWdsCqi
A text is as big as what it displays: nothing knows its box until an instance is given a size, and an anchor on it would place it anywhere. Covered by a test, which also shows `instances_size` making the anchor work. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CuhWWcQTYqEwUG5RWdsCqi
…ng apart
`getNearby("Missile", "Tank", 100000)` kept every missile of the run
`01M2NHQ3SHVYRE4BAWYJPMW6Q5`, so the test asserting a missile near the tank
passed while it was spawning a thousand pixels away. A radius reaching further
than the whole screen AND letting every instance through says nothing about
where they are: the run now reports it, whatever the assertions concluded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CuhWWcQTYqEwUG5RWdsCqi
…e really are Two messages stated as unconditional what the engine only does by default: - the position semantics of a custom object scope said (0;0) IS the position of the custom object and that it turns around the center of its area. The engine turns the children around its center of rotation - the center of the area unless its own events set another one - so the rendered place of the local (0;0) is its position only when that center is at (0;0), the scale is 1 and nothing is flipped. It now says (0;0) is the origin of the object's own space, names the center of rotation, and says a position taken out of the object is not a scene position until the whole transform is applied to it. - `fit_area_to_children` reported the center of the area as the center of rotation, full stop. No behavior change: these are the messages the agent reads. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CuhWWcQTYqEwUG5RWdsCqi
4ian
marked this pull request as ready for review
September 16, 2026 20:47
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.
No description provided.