Repository navigation
Raster Spike #4777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Raster Spike #4777
Changes from all commits
b25babb
7672ce9
cc10c0a
5978f14
f6ad51b
9fb070c
70a41ec
3599e7c
353885e
4f93759
2ad0ce4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -759,20 +759,26 @@ impl<'a> ModifyInputsContext<'a> { | |||||
| self.responses.add(NodeGraphMessage::RunDocumentGraph); | ||||||
| } | ||||||
|
|
||||||
| /// Write the Gradient Form to the last 'Gradient Form' node in the chain, inserting one only when the value differs | ||||||
| /// Write the Gradient Form's curvatures to the last 'Gradient Curvature' node in the chain, inserting one only when the form differs | ||||||
| /// from the default (`Linear`). | ||||||
| pub fn gradient_form_set(&mut self, gradient_form: GradientForm) { | ||||||
| use graphene_std::math_nodes::gradient_curvature::{EndCurvatureInput, IDENTIFIER, StartCurvatureInput}; | ||||||
| use graphene_std::renderer::dial_gradient::{LINEAR_DIALS, RADIAL_DIALS}; | ||||||
|
|
||||||
| let Some(output_layer) = self.get_output_layer() else { return }; | ||||||
|
|
||||||
| let target_input = gradient_chain_target_input(output_layer, self.network_interface); | ||||||
| let identifier = graphene_std::math_nodes::gradient_form::IDENTIFIER; | ||||||
| let create_if_nonexistent = gradient_form != GradientForm::default(); | ||||||
| let Some(node_id) = self.existing_proto_node_id_at(&target_input, identifier, create_if_nonexistent) else { | ||||||
| let Some(node_id) = self.existing_proto_node_id_at(&target_input, IDENTIFIER, create_if_nonexistent) else { | ||||||
| return; | ||||||
| }; | ||||||
|
|
||||||
| let input_connector = InputConnector::node(node_id, graphene_std::math_nodes::gradient_form::GradientFormInput); | ||||||
| self.set_input_with_refresh(input_connector, NodeInput::value(TaggedValue::GradientForm(gradient_form), false), false); | ||||||
| let [start, end] = match gradient_form { | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Use the existing Prompt for AI agents |
||||||
| GradientForm::Linear => LINEAR_DIALS, | ||||||
| GradientForm::Radial => RADIAL_DIALS, | ||||||
| }; | ||||||
| self.set_input_with_refresh(InputConnector::node(node_id, StartCurvatureInput), NodeInput::value(TaggedValue::Number(start), false), false); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The first curvature write should skip the rerender, since the second write queues the graph run. Passing Prompt for AI agents
Suggested change
|
||||||
| self.set_input_with_refresh(InputConnector::node(node_id, EndCurvatureInput), NodeInput::value(TaggedValue::Number(end), false), false); | ||||||
| } | ||||||
|
|
||||||
| /// Set the spread on the chain's gradient value, which is where the ramp carries it. | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3:
UpdateEffectsReachis internal like its neighbours, but it lacks the#[serde(skip)]they carry, so it stays deserializable from JS input. Add#[serde(skip)]to matchUpdateVectorDataandUpdateAppearanceAttributes, and list it in the comment above them.Prompt for AI agents