Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
568e56e
First draft of factoring out the dropdown boilerplate
kythyria Apr 17, 2025
389ef10
Add proc macro for enum boilerplate
kythyria Apr 18, 2025
d14efbf
Merge remote-tracking branch 'upstream/master' into rfc-dropdowns-ref…
kythyria Apr 18, 2025
5f97a77
Detect whether to say `crate` or the name
kythyria Apr 18, 2025
e8750b0
Clean up the input and naming of the enum macro
kythyria Apr 19, 2025
99318d5
Rename a file
kythyria Apr 19, 2025
f1c8706
Do the rename of code too
kythyria Apr 19, 2025
eb010ee
Use the attribute-driven selection of radio vs dropdown
kythyria Apr 19, 2025
0aa0f71
Add a metadata struct and tooltips
kythyria Apr 19, 2025
672e6c8
Move the new traits to a better place.
kythyria Apr 20, 2025
d571abf
Merge branch 'master' into rfc-dropdowns-refactor
Keavon Apr 20, 2025
2a8a837
Use ChoiceType, part 1
kythyria Apr 21, 2025
fbe60cb
Use ChoiceType, part 2
kythyria Apr 23, 2025
d737a4d
Introduce a builder API for choice widgets
kythyria Apr 26, 2025
9e7bd11
Start using the new new API
kythyria Apr 27, 2025
449ed3a
Merge remote-tracking branch 'upstream/master' into rfc-dropdowns-ref…
kythyria Apr 27, 2025
ed10862
DomainWarpType should be a dropdown still
kythyria Apr 27, 2025
d64362f
Handle the case where a node property can never have a socket
kythyria Apr 30, 2025
d51d7fb
Rustfmt
kythyria Apr 30, 2025
61a6be1
Merge branch 'master' into rfc-dropdowns-refactor
Keavon Apr 30, 2025
cc65a57
Merge branch 'master' into rfc-dropdowns-refactor
Keavon May 1, 2025
be83c19
Code review
Keavon May 1, 2025
7ddb683
Update stable node IDs in test
Keavon May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

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
@@ -1,3 +1,4 @@
use super::node_properties::choice::enum_choice;
use super::node_properties::{self, ParameterWidgetsInfo};
use super::utility_types::FrontendNodeType;
use crate::messages::layout::utility_types::widget_prelude::*;
Expand Down Expand Up @@ -3212,7 +3213,9 @@ fn static_input_properties() -> InputProperties {
"noise_properties_noise_type".to_string(),
Box::new(|node_id, index, context| {
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
let noise_type_row = node_properties::noise_type_widget(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true));
let noise_type_row = enum_choice::<NoiseType>()
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
.property_row();
Ok(vec![noise_type_row, LayoutGroup::Row { widgets: Vec::new() }])
}),
);
Expand All @@ -3221,7 +3224,10 @@ fn static_input_properties() -> InputProperties {
Box::new(|node_id, index, context| {
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
let (_, coherent_noise_active, _, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
let domain_warp_type = node_properties::domain_warp_type_widget(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true), !coherent_noise_active);
let domain_warp_type = enum_choice::<DomainWarpType>()
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
.disabled(!coherent_noise_active)
.property_row();
Ok(vec![domain_warp_type])
}),
);
Expand All @@ -3242,7 +3248,10 @@ fn static_input_properties() -> InputProperties {
Box::new(|node_id, index, context| {
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
let (_, coherent_noise_active, _, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
let fractal_type_row = node_properties::fractal_type_widget(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true), !coherent_noise_active);
let fractal_type_row = enum_choice::<FractalType>()
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
.disabled(!coherent_noise_active)
.property_row();
Ok(vec![fractal_type_row])
}),
);
Expand Down Expand Up @@ -3333,10 +3342,10 @@ fn static_input_properties() -> InputProperties {
Box::new(|node_id, index, context| {
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
let (_, coherent_noise_active, cellular_noise_active, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
let cellular_distance_function_row = node_properties::cellular_distance_function_widget(
ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true),
!coherent_noise_active || !cellular_noise_active,
);
let cellular_distance_function_row = enum_choice::<CellularDistanceFunction>()
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
.disabled(!coherent_noise_active || !cellular_noise_active)
.property_row();
Ok(vec![cellular_distance_function_row])
}),
);
Expand All @@ -3345,10 +3354,10 @@ fn static_input_properties() -> InputProperties {
Box::new(|node_id, index, context| {
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
let (_, coherent_noise_active, cellular_noise_active, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
let cellular_return_type = node_properties::cellular_return_type_widget(
ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true),
!coherent_noise_active || !cellular_noise_active,
);
let cellular_return_type = enum_choice::<CellularReturnType>()
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
.disabled(!coherent_noise_active || !cellular_noise_active)
.property_row();
Ok(vec![cellular_return_type])
}),
);
Expand Down
Loading
Loading