Refactor naming to deprecate "node graph frame" terminology (#1187)

This commit is contained in:
Keavon Chambers
2023-04-28 01:30:47 -07:00
parent 3f17207a32
commit dcabd6c0b4
35 changed files with 286 additions and 313 deletions
@@ -18,13 +18,13 @@ pub fn new_vector_layer(subpaths: Vec<Subpath<ManipulatorGroupId>>, layer_path:
pub fn new_custom_layer(network: NodeNetwork, layer_path: Vec<LayerId>, responses: &mut VecDeque<Message>) {
responses.add(DocumentMessage::DeselectAllLayers);
responses.add(Operation::AddNodeGraphFrame {
responses.add(Operation::AddFrame {
path: layer_path.clone(),
insert_index: -1,
transform: DAffine2::ZERO.to_cols_array(),
network,
});
responses.add(DocumentMessage::NodeGraphFrameGenerate { layer_path });
responses.add(DocumentMessage::InputFrameRasterizeRegionBelowLayer { layer_path });
}
pub fn set_manipulator_mirror_angle(manipulator_groups: &Vec<ManipulatorGroup<ManipulatorGroupId>>, layer_path: &Vec<u64>, mirror_angle: bool, responses: &mut VecDeque<Message>) {
@@ -33,8 +33,8 @@ impl PathOutline {
// TODO Purge this area of BezPath and Kurbo
// Get the bezpath from the shape or text
let subpath = match &document_layer.data {
LayerDataType::Shape(layer_shape) => Some(layer_shape.shape.clone()),
LayerDataType::NodeGraphFrame(frame) => frame.as_vector_data().map(|vector_data| Subpath::from_bezier_crate(&vector_data.subpaths)),
LayerDataType::Shape(shape) => Some(shape.shape.clone()),
LayerDataType::Layer(layer) => layer.as_vector_data().map(|vector_data| Subpath::from_bezier_crate(&vector_data.subpaths)),
_ => document_layer.aabb_for_transform(DAffine2::IDENTITY, render_data).map(|[p1, p2]| Subpath::new_rect(p1, p2)),
}?;