Fix hiding and collapsing layers (#1481)

* Hide and collapse layers

* Reorder imports

* Fix Ctrl+H shortcut advertized action and hotkey tooltip; improve graph top right of options bar

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube 2023-11-27 02:27:11 +00:00 committed by GitHub
parent 6d9dd5fc27
commit 5ee79031ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 164 additions and 123 deletions

View file

@ -809,9 +809,14 @@ impl NodeNetwork {
return;
};
if self.disabled.contains(&id) {
if node.implementation != DocumentNodeImplementation::Unresolved("graphene_core::ops::IdNode".into()) && self.disabled.contains(&id) {
node.implementation = DocumentNodeImplementation::Unresolved("graphene_core::ops::IdNode".into());
node.inputs.drain(1..);
if node.name == "Layer" {
// Connect layer node to the graphic group below
node.inputs.drain(..7);
} else {
node.inputs.drain(1..);
}
self.nodes.insert(id, node);
return;
}