mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 00:08:11 +08:00
* Set spline mirror handles to enabled by default * refactor mirror setting into common function --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
1f5bfdc2e5
commit
0bac707241
@@ -1,7 +1,8 @@
|
||||
use crate::messages::portfolio::document::node_graph;
|
||||
use crate::messages::portfolio::document::node_graph::VectorDataModification;
|
||||
use crate::messages::prelude::*;
|
||||
|
||||
use bezier_rs::Subpath;
|
||||
use bezier_rs::{ManipulatorGroup, Subpath};
|
||||
use document_legacy::{LayerId, Operation};
|
||||
use graph_craft::document::NodeNetwork;
|
||||
use graphene_core::uuid::ManipulatorGroupId;
|
||||
@@ -28,3 +29,15 @@ pub fn new_custom_layer(network: NodeNetwork, layer_path: Vec<LayerId>, response
|
||||
);
|
||||
responses.add(DocumentMessage::NodeGraphFrameGenerate { layer_path });
|
||||
}
|
||||
|
||||
pub fn set_manipulator_mirror_angle(manipulator_groups: &Vec<ManipulatorGroup<ManipulatorGroupId>>, layer_path: &Vec<u64>, mirror_angle: bool, responses: &mut VecDeque<Message>) {
|
||||
for manipulator_group in manipulator_groups {
|
||||
responses.add(GraphOperationMessage::Vector {
|
||||
layer: layer_path.clone(),
|
||||
modification: VectorDataModification::SetManipulatorHandleMirroring {
|
||||
id: manipulator_group.id,
|
||||
mirror_angle,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user