Add support for raw object/instance changes in the agent - #9139
Merged
Merged
Conversation
The object editors renamed the references of a global object's animation or point only in the scene the object was opened from. A shared helper now updates every scene using the object (except scenes shadowing it with a local object) and is used by the Sprite, Model3D, Spine and custom object editors. Also read the tile map of a simple tile map instance with the right property name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLDon1wJWbvEviobt4ttQK
…mations `inspect_object_properties_effects` can return the configuration of an object (`include_raw_json`), with the size of the images of its frames, for what is not exposed as properties: Sprite animations, points and collision masks, 3D model and Spine animation lists, tile map settings, custom object children. `change_object_properties_effects` can write it back complete (`raw_json`). The JSON is read by the engine into a copy first, and what the engine kept is validated and committed: on any error, nothing changes. Animations are identified by their names: they can be reordered, removed or added (the starting animation of instances is kept), but a rename goes through `renamed_animations` or `renamed_points`, which update the events, including in the variants and overrides of a child of a custom object. These changes are refused while the object is open in the object editor, whose Cancel would undo them. In scripts, the raw JSON arguments are kept only as their size in the call records sent back to the model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLDon1wJWbvEviobt4ttQK
`describe_instances` can return, for each instance, the data that `put_2d_instances`/`put_3d_instances` don't set (`include_raw_json`): its custom properties (starting animation, tile map of a simple tile map, text input values) and its flips. The new `change_instances_raw_json` writes it back, for several instances at once: everything is validated first (the properties must be declared by the object, a tile map must use the atlas of its object, flips must be offered by the object), then applied. A simple tile map resized by its new grid keeps its scale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLDon1wJWbvEviobt4ttQK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLDon1wJWbvEviobt4ttQK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLDon1wJWbvEviobt4ttQK
A Sprite has no object properties: creating one now says that its animations and their images are in its raw JSON, and the raw JSON of a Sprite without frames gives the format of an animation. A test builds the animations of a Sprite created from scratch with images attached by the user. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLDon1wJWbvEviobt4ttQK
`inspect_object_properties_effects` with `include_raw_json` returns `modelAnimationSources`, the animations of the model file, so that the AI agent can set the `source` of the animations it adds (for example to a 3D model attached by the user). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLDon1wJWbvEviobt4ttQK
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.