Add blit caching and blend modes to Brush tool (#1268)

Added blit caching.

Added bulk memory target feature.

Added brush texture caching.

Removed dead format call.

Fix brush_texture_cache crashing on serialization.
This commit is contained in:
Orson Peters
2023-06-07 12:24:21 +02:00
committed by GitHub
parent f933ece04d
commit 3ff20ae3e4
9 changed files with 336 additions and 61 deletions

View File

@@ -8,6 +8,7 @@ use graph_craft::document::value::*;
use graph_craft::document::*;
use graph_craft::imaginate_input::ImaginateSamplingMethod;
use graph_craft::NodeIdentifier;
use graphene_core::raster::brush_cache::BrushCache;
use graphene_core::raster::{BlendMode, Color, Image, ImageFrame, LuminanceCalculation, RedGreenBlue, RelativeAbsolute, SelectiveColorChoice};
use graphene_core::text::Font;
use graphene_core::vector::VectorData;
@@ -677,11 +678,12 @@ fn static_nodes() -> Vec<DocumentNodeType> {
DocumentNodeType {
name: "Brush",
category: "Brush",
identifier: NodeImplementation::proto("graphene_std::brush::BrushNode<_, _>"),
identifier: NodeImplementation::proto("graphene_std::brush::BrushNode<_, _, _>"),
inputs: vec![
DocumentInputType::value("Background", TaggedValue::ImageFrame(ImageFrame::empty()), true),
DocumentInputType::value("Bounds", TaggedValue::ImageFrame(ImageFrame::empty()), true),
DocumentInputType::value("Trace", TaggedValue::BrushStrokes(Vec::new()), false),
DocumentInputType::value("Cache", TaggedValue::BrushCache(BrushCache::new_proto()), false),
],
outputs: vec![DocumentOutputType {
name: "Image",