mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-07 14:58:03 +00:00
Add layer locking feature (#1702)
* Add locking layer feature * Update locked state data to adjust the refactor * Make the locked layer cannot be selected using pointer and select all key * Make locked layer cannot be moved and disable bounding box * Add locked status selected node on CopyBuffer * Make locked layer cannot be selected when selected all layers, and disabled GRS and nudging operation on locked layer * Add refresh document metadata before update button on visible and locked * Updated from master * Fix icon logic on panel locked layer * Make the child locked when the parent is locked, and the child cannot be unlocked if the parent is locked * Revert "Make the child locked when the parent is locked, and the child cannot be unlocked if the parent is locked" This reverts commit7c93259bc2
. * Revert "Fix icon logic on panel locked layer" This reverts commit33939f2e84
. * Delete Make Lock button in the node graph top bar * Add ToggleSelectedLocked to action_with_node_graph_open * Fix parent and child locking behavior icon on panel * Fix boolean operator on icon button locking layer * Make bolean logic more readable in icon button locking layer * Fix locking layer can be moved or resizing when selected with unlocking layer, disabled pivot widget on locking layer, disable all action on pivot point, alignment, flipping, and boolean operation for locking layer * Fix axis align drag crash --------- Co-authored-by: 0hypercube <0hypercube@gmail.com>
This commit is contained in:
parent
0f43a254af
commit
bf81a31ff9
17 changed files with 142 additions and 32 deletions
|
@ -162,6 +162,9 @@ pub struct DocumentNode {
|
|||
/// Represents the eye icon for hiding/showing the node in the graph UI. When hidden, a node gets replaced with an identity node during the graph flattening step.
|
||||
#[serde(default = "return_true")]
|
||||
pub visible: bool,
|
||||
/// Represents the lock icon for locking/unlocking the node in the graph UI. When locked, a node cannot be moved in the graph UI.
|
||||
#[serde(default)]
|
||||
pub locked: bool,
|
||||
/// Metadata about the node including its position in the graph UI.
|
||||
pub metadata: DocumentNodeMetadata,
|
||||
/// When two different proto nodes hash to the same value (e.g. two value nodes each containing `2_u32` or two multiply nodes that have the same node IDs as input), the duplicates are removed.
|
||||
|
@ -210,6 +213,7 @@ impl Default for DocumentNode {
|
|||
has_primary_output: true,
|
||||
implementation: Default::default(),
|
||||
visible: true,
|
||||
locked: Default::default(),
|
||||
metadata: Default::default(),
|
||||
skip_deduplication: Default::default(),
|
||||
world_state_hash: Default::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue