Edit a Rive file you already have

Open a Rive file, from the Rive editor or anywhere else, see what is in it, and change it in plain words: colours, text, timing, interactions, new pieces. A file saved with no changes comes back exactly as it was.

You bring
A .riv or .rev.
You get
The changed file, in the same format, or the other.
Needs
Nothing beyond the install. Adding painted art uses your own image model.

Ask your assistant

  • Open menu.riv, round the button corners more, make the hover faster, and save it as menu-v2.riv.
  • What's in scene.riv? List its artboards, animations and what an app can set.
  • Change the headline in banner.rev to "Summer sale" and keep it editable in the Rive editor.
  • Add a lantern hanging from the tree in my forest scene, painted to match.

How it works

  1. Open it. load_riv opens a .riv or .rev for editing.
  2. See what's inside. describe_scene and list_objects show the artboards, objects, animations and state machines. inspect_riv_interface lists what an app can set. get_object_info shows one object in detail.
  3. Change it. update_object changes position, size and other settings; update_fill, update_stroke and update_text change colours, outlines and text; move_object moves a thing into another group; remove_object removes it. New shapes, keyframes and state machine parts are added as in Logos, icons and shapes and Buttons and interactive files.
  4. Save it. export_riv writes it back. save_session keeps a checkpoint before a big change.

Rive editor files (.rev)

A loaded .rev is opened as a list of names, enough to find and change things by name. To read its full contents (shapes, keyframes, inputs) your assistant converts it to a .riv first, and render_riv draws a .rev directly. verify_editor_compat checks the Rive editor will read a .rev the way it was meant.

Add new art that matches the scene

  1. sprite_art_brief, in its scene mode, renders your artboard and writes a prompt asking your image model to draw the new thing into that picture, so it comes back in the scene's own style, light and scale.
  2. You run the prompt in your image model with the picture attached, and save the result.
  3. extract_layer cuts out what changed and places it on the artboard where it was drawn, at the size it was drawn, as its own picture you can animate.

Good to know

Related