1
+ use super :: node_properties:: choice:: enum_choice;
1
2
use super :: node_properties:: { self , ParameterWidgetsInfo } ;
2
3
use super :: utility_types:: FrontendNodeType ;
3
4
use crate :: messages:: layout:: utility_types:: widget_prelude:: * ;
@@ -3212,7 +3213,9 @@ fn static_input_properties() -> InputProperties {
3212
3213
"noise_properties_noise_type" . to_string ( ) ,
3213
3214
Box :: new ( |node_id, index, context| {
3214
3215
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 ( ) ;
3216
3219
Ok ( vec ! [ noise_type_row, LayoutGroup :: Row { widgets: Vec :: new( ) } ] )
3217
3220
} ) ,
3218
3221
) ;
@@ -3221,7 +3224,10 @@ fn static_input_properties() -> InputProperties {
3221
3224
Box :: new ( |node_id, index, context| {
3222
3225
let ( document_node, input_name, input_description) = node_properties:: query_node_and_input_info ( node_id, index, context) ?;
3223
3226
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 ( ) ;
3225
3231
Ok ( vec ! [ domain_warp_type] )
3226
3232
} ) ,
3227
3233
) ;
@@ -3242,7 +3248,10 @@ fn static_input_properties() -> InputProperties {
3242
3248
Box :: new ( |node_id, index, context| {
3243
3249
let ( document_node, input_name, input_description) = node_properties:: query_node_and_input_info ( node_id, index, context) ?;
3244
3250
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 ( ) ;
3246
3255
Ok ( vec ! [ fractal_type_row] )
3247
3256
} ) ,
3248
3257
) ;
@@ -3333,10 +3342,10 @@ fn static_input_properties() -> InputProperties {
3333
3342
Box :: new ( |node_id, index, context| {
3334
3343
let ( document_node, input_name, input_description) = node_properties:: query_node_and_input_info ( node_id, index, context) ?;
3335
3344
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 ( ) ;
3340
3349
Ok ( vec ! [ cellular_distance_function_row] )
3341
3350
} ) ,
3342
3351
) ;
@@ -3345,10 +3354,10 @@ fn static_input_properties() -> InputProperties {
3345
3354
Box :: new ( |node_id, index, context| {
3346
3355
let ( document_node, input_name, input_description) = node_properties:: query_node_and_input_info ( node_id, index, context) ?;
3347
3356
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 ( ) ;
3352
3361
Ok ( vec ! [ cellular_return_type] )
3353
3362
} ) ,
3354
3363
) ;
0 commit comments