#303: Mesh Warp's grid can be dragged in the Composition viewer
Problem: Mesh Warp keeps its Distortion Mesh in a hidden text parameter, and the viewer only draws handles for point parameters (Bezier Warp's), so with Mesh Warp selected there was no grid and nothing to drag: the effect could not warp anything from the UI. Fix: with a Mesh Warp effect (or one of its parameters) selected and layer controls shown, the viewer draws the (rows+1)x(columns+1) grid over the layer in effect space, with a handle on every vertex (automation id viewer.meshWarp.<fx>.<row>.<col>). Dragging a vertex writes its offset to the `mesh` parameter through prop.set, one undo step per drag; a mesh that does not match Rows/Columns starts from the undistorted grid, as it renders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a7d3e7699
commit
c733277263
@@ -1415,6 +1415,9 @@ pub fn viewer_hook(
|
||||
if !picking && app.ui.viewer.show_layer_controls && matches!(&g.kind, GroupKind::Effect { effect } if effect == super::fx_editors::RESHAPE) {
|
||||
super::fx_editors::reshape_overlay(app, ui, painter, map, ectx, layer, g, &m, &mut actions);
|
||||
}
|
||||
if !picking && app.ui.viewer.show_layer_controls && matches!(&g.kind, GroupKind::Effect { effect } if effect == super::fx_editors::MESH_WARP) {
|
||||
super::fx_editors::mesh_warp_overlay(app, ui, painter, map, ectx, layer, g, &fm, &mut actions);
|
||||
}
|
||||
let scope = FxScope { effect: &g.match_id, root: g, path: String::new() };
|
||||
let mut pts = Vec::new();
|
||||
visible_points(g, &scope, layer, ectx, 0, &mut pts);
|
||||
|
||||
Reference in New Issue
Block a user