Fix click targets (in, e.g., the boolean node) by resolving footprints from render output (#1946)

* add NodeId (u64) and Footprint to Graphic Group

* Render Output footprints

* Small bug fixes

* Commented out render output click targets/footprints

* Run graph when deleting

* Switch to node path

* Add upstream clicktargets for boolean operation

* Fix boolean operations

* Fix grouped layers

* Add click targets to vello render

* Add cache to artwork

* Fix demo artwork

* Improve recursion

* Code review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
adamgerhant 2024-09-15 18:26:59 -07:00 committed by GitHub
parent ef007736f5
commit ca0d102296
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 1003 additions and 670 deletions

View file

@ -622,11 +622,13 @@ impl EditorHandle {
self.dispatch(message);
let id = NodeId(id);
let message = NodeGraphMessage::DeleteNodes {
self.dispatch(NodeGraphMessage::DeleteNodes {
node_ids: vec![id],
delete_children: true,
};
self.dispatch(message);
});
self.dispatch(NodeGraphMessage::RunDocumentGraph);
self.dispatch(NodeGraphMessage::SelectedNodesUpdated);
self.dispatch(NodeGraphMessage::SendGraph);
}
/// Toggle lock state of a layer from the layer list
@ -733,7 +735,7 @@ impl EditorHandle {
for node_id in nodes_to_upgrade {
document
.network_interface
.set_implementation(&node_id, &[], DocumentNodeImplementation::proto("graphene_core::ConstructArtboardNode<_, _, _, _, _, _>"));
.replace_implementation(&node_id, &[], DocumentNodeImplementation::proto("graphene_core::ConstructArtboardNode<_, _, _, _, _, _>"));
document
.network_interface
.add_input(&node_id, &[], TaggedValue::IVec2(glam::IVec2::default()), false, 2, "".to_string());