Rename gradient type to gradient form (#4405)

* Rename gradient type to gradient form

* Update the demo art for the gradient form rename

* Say form not type in the Gradient Form node's doc comment
This commit is contained in:
Keavon Chambers
2026-08-04 05:51:10 -07:00
committed by GitHub
parent ca44dbaf55
commit 788fe227c6
28 changed files with 173 additions and 164 deletions

View File

@@ -9,7 +9,7 @@ use rand::SeedableRng;
use rand::seq::SliceRandom;
use raster_types::{CPU, GPU, Raster};
use std::cmp::Ordering;
use vector_types::gradient::{GradientSpread, GradientType};
use vector_types::gradient::{GradientForm, GradientSpread};
use vector_types::{Gradient, ReferencePoint};
/// Returns the list with the item at the specified index removed.
@@ -567,7 +567,7 @@ async fn write_attribute<T: AnyHash + Clone + Send + Sync + CacheHash>(
List<Gradient>,
List<Artboard>,
List<BlendMode>,
List<GradientType>,
List<GradientForm>,
List<GradientSpread>,
)]
content: List<T>,
@@ -713,18 +713,18 @@ fn read_attribute_blend_mode(
result
}
/// Reads a named `GradientType` attribute from the input list, outputting each value as an element of a new `GradientType[]`.
/// Reads a named `GradientForm` attribute from the input list, outputting each value as an element of a new `GradientForm[]`.
#[node_macro::node(category("Attributes: Read"))]
fn read_attribute_gradient_type(
fn read_attribute_gradient_form(
_: impl Ctx,
content: ListDyn,
/// The attribute name (key) to read.
name: Item<String>,
) -> List<GradientType> {
) -> List<GradientForm> {
let name = name.into_element();
let mut result = List::with_capacity(content.len());
for index in 0..content.len() {
let Some(value) = content.attribute::<GradientType>(&name, index) else { continue };
let Some(value) = content.attribute::<GradientForm>(&name, index) else { continue };
result.push(Item::new_from_element(*value));
}
result