Ophanim image editor tools
Ophanim has five high-level Python API operations:
api.ophanim.capture_viewport(...), api.ophanim.open_image(...), and
api.ophanim.capture_and_open(...), plus api.ophanim.actions() and
api.ophanim.invoke(action, ...). The latter two expose a controlled set of
32 actions on an already open editor tab. Invocation requires the desktop
UI thread; it never opens a new window. Sharing to Jira or Discord and applying
a fix back to a DCC are outside this general action list.
available = api.ophanim.actions().unwrap()["value"]
result = api.ophanim.invoke("add_new_layer") # from the desktop UI thread
Opening an editor or capturing a viewport requires a desktop session and the relevant source application. Editor actions are not usable in headless CI.
Documents and layers
- Open and save images and layered projects.
- Add, duplicate, delete, lock, and mask layers.
- Add and edit text layers.
- Link an image layer, refresh its source, and align smart layers.
- Copy or paste a selection into a new layer; crop to a selection.
- Undo and redo editor actions.
Color and effects
- Adjust brightness and contrast, curves and levels, hue and vibrance, exposure and gamma, and color balance.
- Apply gradient maps and drop shadows.
- Apply cel shading, sketch, sepia, pixel art, and posterize effects.
- Invert a layer's colors or flip a normal map's green channel.
Texture and review workflows
- Import a PBR texture set and export a channel-packed ORM texture.
- Inspect PBR channels and perspective guides.
- Capture a connected DCC viewport into a new document tab.
- Send an image to a configured Jira issue or Discord destination from the desktop editor; this is an external action and needs user approval.
For signatures of the five public Python operations, search the Python API reference. Image-editing tools require the Ophanim desktop widget and may show dialogs. They are not available from a headless process merely because they appear here.
Scriptable actions on an open editor
Call these through api.ophanim.invoke(action, ...). Some actions show dialogs or require an active layer or selection.
add_drop_shadow_layer· Effectsadd_new_layer· Layersadd_text_layer· Layersalign_active_smart_layer· Layersapply_brightness_contrast_adjustment· Colorapply_cel_shaded_filter· Effectsapply_color_balance_adjustment· Colorapply_curves_levels_adjustment· Colorapply_exposure_gamma_adjustment· Colorapply_gradient_map· Colorapply_hsv_vibrance_adjustment· Colorapply_notebook_sketch_filter· Effectsapply_pixel_art_filter· Effectsapply_posterize_threshold· Effectsapply_sepia_vintage_filter· Effectsclear_selection· Selectioncopy_selection_to_new_layer· Selectioncrop_to_selection· Selectiondelete_active_layer· Layersdelete_selected_pixels· Selectionduplicate_active_layer· Layersedit_active_text· Layersexport_channel_packed_orm· Texturesflip_normal_map_green_channel· Texturesimport_pbr_texture_set· Texturesinvert_active_layer_colors· Colorinvert_selection· Selectionpaste_image_as_layer· Selectionredo· Historyrefresh_active_link· Layerstoggle_active_layer_lock· Layersundo· History