mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
Add tests for gradient drawing with transformations (#2481)
* Test gradient drawing with transformations * Fix bad import * Fix merge conflicts --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
use crate::consts::FILE_SAVE_SUFFIX;
|
||||
use crate::messages::animation::TimingInformation;
|
||||
use crate::messages::frontend::utility_types::{ExportBounds, FileType};
|
||||
use crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier;
|
||||
use crate::messages::portfolio::document::utility_types::network_interface::NodeNetworkInterface;
|
||||
use crate::messages::prelude::*;
|
||||
use crate::messages::tool::common_functionality::graph_modification_utils::NodeGraphLayer;
|
||||
use glam::{DAffine2, DVec2, UVec2};
|
||||
use graph_craft::concrete;
|
||||
use graph_craft::document::value::{RenderOutput, TaggedValue};
|
||||
@@ -920,4 +923,13 @@ impl Instrumented {
|
||||
|
||||
Self::downcast::<Input>(dynamic)
|
||||
}
|
||||
|
||||
pub fn grab_input_from_layer<Input: graphene_std::NodeInputDecleration>(&self, layer: LayerNodeIdentifier, network_interface: &NodeNetworkInterface, runtime: &NodeRuntime) -> Option<Input::Result>
|
||||
where
|
||||
Input::Result: Send + Sync + Clone + 'static,
|
||||
{
|
||||
let node_graph_layer = NodeGraphLayer::new(layer, network_interface);
|
||||
let node = node_graph_layer.upstream_node_id_from_protonode(Input::identifier())?;
|
||||
self.grab_protonode_input::<Input>(&vec![node], runtime)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user