Skip to content

Commit 15b2918

Browse files
authored
Merge branch 'master' into sample-points
2 parents f94431e + 9ef9b20 commit 15b2918

30 files changed

+972
-1036
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use super::node_properties::choice::enum_choice;
12
use super::node_properties::{self, ParameterWidgetsInfo};
23
use super::utility_types::FrontendNodeType;
34
use crate::messages::layout::utility_types::widget_prelude::*;
@@ -3212,7 +3213,9 @@ fn static_input_properties() -> InputProperties {
32123213
"noise_properties_noise_type".to_string(),
32133214
Box::new(|node_id, index, context| {
32143215
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
3215-
let noise_type_row = node_properties::noise_type_widget(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true));
3216+
let noise_type_row = enum_choice::<NoiseType>()
3217+
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
3218+
.property_row();
32163219
Ok(vec![noise_type_row, LayoutGroup::Row { widgets: Vec::new() }])
32173220
}),
32183221
);
@@ -3221,7 +3224,10 @@ fn static_input_properties() -> InputProperties {
32213224
Box::new(|node_id, index, context| {
32223225
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
32233226
let (_, coherent_noise_active, _, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
3224-
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);
3227+
let domain_warp_type = enum_choice::<DomainWarpType>()
3228+
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
3229+
.disabled(!coherent_noise_active)
3230+
.property_row();
32253231
Ok(vec![domain_warp_type])
32263232
}),
32273233
);
@@ -3242,7 +3248,10 @@ fn static_input_properties() -> InputProperties {
32423248
Box::new(|node_id, index, context| {
32433249
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
32443250
let (_, coherent_noise_active, _, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
3245-
let fractal_type_row = node_properties::fractal_type_widget(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true), !coherent_noise_active);
3251+
let fractal_type_row = enum_choice::<FractalType>()
3252+
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
3253+
.disabled(!coherent_noise_active)
3254+
.property_row();
32463255
Ok(vec![fractal_type_row])
32473256
}),
32483257
);
@@ -3333,10 +3342,10 @@ fn static_input_properties() -> InputProperties {
33333342
Box::new(|node_id, index, context| {
33343343
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
33353344
let (_, coherent_noise_active, cellular_noise_active, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
3336-
let cellular_distance_function_row = node_properties::cellular_distance_function_widget(
3337-
ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true),
3338-
!coherent_noise_active || !cellular_noise_active,
3339-
);
3345+
let cellular_distance_function_row = enum_choice::<CellularDistanceFunction>()
3346+
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
3347+
.disabled(!coherent_noise_active || !cellular_noise_active)
3348+
.property_row();
33403349
Ok(vec![cellular_distance_function_row])
33413350
}),
33423351
);
@@ -3345,10 +3354,10 @@ fn static_input_properties() -> InputProperties {
33453354
Box::new(|node_id, index, context| {
33463355
let (document_node, input_name, input_description) = node_properties::query_node_and_input_info(node_id, index, context)?;
33473356
let (_, coherent_noise_active, cellular_noise_active, _, _, _) = node_properties::query_noise_pattern_state(node_id, context)?;
3348-
let cellular_return_type = node_properties::cellular_return_type_widget(
3349-
ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true),
3350-
!coherent_noise_active || !cellular_noise_active,
3351-
);
3357+
let cellular_return_type = enum_choice::<CellularReturnType>()
3358+
.for_socket(ParameterWidgetsInfo::new(document_node, node_id, index, input_name, input_description, true))
3359+
.disabled(!coherent_noise_active || !cellular_noise_active)
3360+
.property_row();
33523361
Ok(vec![cellular_return_type])
33533362
}),
33543363
);

0 commit comments

Comments
 (0)