mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 05:18:11 +08:00
Make Imaginate into a node (#878)
* Simplify document node input defenitions * Remove imaginate layer * Imaginate node properties * Fix serde feature gate * Add Proc Macro for Protonode implementation * Fix incorrect type * Add cargo.toml metadata * Send imaginate params to frontend * Fix image_creativity range * Finish imaginate implementation * Fix the imaginate draw tool * Remove node-graph/rpco-macro * Cargo fmt * Fix missing workspace member * Changes to the resolution * Add checkbox for Imaginate auto resolution; improve Properties panel layouts And fix bugs in panel resizing * Implement the Rescale button * Reorder imports * Update Rust deps Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
2f2daa25e9
commit
2732492307
@@ -7,8 +7,9 @@ use crate::messages::portfolio::document::utility_types::layer_panel::{JsRawBuff
|
||||
use crate::messages::prelude::*;
|
||||
use crate::messages::tool::utility_types::HintData;
|
||||
|
||||
use graph_craft::document::NodeId;
|
||||
use graph_craft::imaginate_input::*;
|
||||
use graphene::color::Color;
|
||||
use graphene::layers::imaginate_layer::{ImaginateBaseImage, ImaginateGenerationParameters, ImaginateMaskFillContent, ImaginateMaskPaintMode};
|
||||
use graphene::layers::text_layer::Font;
|
||||
use graphene::LayerId;
|
||||
|
||||
@@ -61,13 +62,13 @@ pub enum FrontendMessage {
|
||||
#[serde(rename = "baseImage")]
|
||||
base_image: Option<ImaginateBaseImage>,
|
||||
#[serde(rename = "maskImage")]
|
||||
mask_image: Option<ImaginateBaseImage>,
|
||||
mask_image: Option<ImaginateMaskImage>,
|
||||
#[serde(rename = "maskPaintMode")]
|
||||
mask_paint_mode: ImaginateMaskPaintMode,
|
||||
#[serde(rename = "maskBlurPx")]
|
||||
mask_blur_px: u32,
|
||||
#[serde(rename = "maskFillContent")]
|
||||
mask_fill_content: ImaginateMaskFillContent,
|
||||
imaginate_mask_starting_fill: ImaginateMaskStartingFill,
|
||||
hostname: String,
|
||||
#[serde(rename = "refreshFrequency")]
|
||||
refresh_frequency: f64,
|
||||
@@ -75,12 +76,16 @@ pub enum FrontendMessage {
|
||||
document_id: u64,
|
||||
#[serde(rename = "layerPath")]
|
||||
layer_path: Vec<LayerId>,
|
||||
#[serde(rename = "nodePath")]
|
||||
node_path: Vec<NodeId>,
|
||||
},
|
||||
TriggerImaginateTerminate {
|
||||
#[serde(rename = "documentId")]
|
||||
document_id: u64,
|
||||
#[serde(rename = "layerPath")]
|
||||
layer_path: Vec<LayerId>,
|
||||
#[serde(rename = "nodePath")]
|
||||
node_path: Vec<NodeId>,
|
||||
hostname: String,
|
||||
},
|
||||
TriggerImport,
|
||||
@@ -102,6 +107,8 @@ pub enum FrontendMessage {
|
||||
layer_path: Vec<LayerId>,
|
||||
svg: String,
|
||||
size: glam::DVec2,
|
||||
#[serde(rename = "imaginateNode")]
|
||||
imaginate_node: Option<Vec<NodeId>>,
|
||||
},
|
||||
TriggerOpenDocument,
|
||||
TriggerPaste,
|
||||
|
||||
Reference in New Issue
Block a user