mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-23 04:02:49 -05:00
With a Puppet tool, a click off the pins picked the topmost layer under the pointer by its own bounds, and selected it. So a click where the deformation had stretched the mesh past the layer's bounds went to the layer behind (selecting it and giving it a Puppet effect), and any click on another layer switched to it. While selected layers have a Puppet effect, a click (or a press that might start a pin marquee) now works only on them, as in After Effects: on the layer whose mesh, as deformed now, is under the pointer (the pin lands on the deformed shape), else the one whose own art is (a new mesh); elsewhere nothing happens and the selection stays. Without a rigged layer selected, the tools pick and rig the layer under the pointer as before. `puppet::contains` tests a point against a deformed mesh; `puppet.addPin` uses it too (its own test only held for one triangle winding). Test: puppet_pins_go_on_the_deformed_mesh_and_the_tool_stays_on_the_rigged_layer (ui_viewer). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>