1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Compare commits

..

No commits in common. "5a17117d5913755c52f2c586874fbf586d419fcb" and "0f53fc32fe064141ddaf283e31b7a937320f381e" have entirely different histories.

5 changed files with 269 additions and 321 deletions

View file

@ -32,11 +32,7 @@ func handle_loading_file(file: String) -> void:
open_pxo_file(file)
elif file_ext == "tres": # Godot resource file
var resource := load(file)
if resource is VisualShader:
var new_path := SHADERS_DIRECTORY.path_join(file.get_file())
DirAccess.copy_absolute(file, new_path)
shader_copied.emit(new_path)
return
elif file_ext == "tscn": # Godot scene file
return

View file

@ -241,34 +241,78 @@ static func create_ui_for_shader_uniforms(
label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
var hbox := HBoxContainer.new()
hbox.add_child(label)
if shader is VisualShader and u_name.begins_with("tex_frg_"):
var node_id := int(u_name.replace("tex_frg_", ""))
var shader_node := (shader as VisualShader).get_node(
VisualShader.TYPE_FRAGMENT, node_id
if u_name.begins_with("gradient_"):
var gradient_edit := GRADIENT_EDIT_TSCN.instantiate() as GradientEditNode
gradient_edit.size_flags_horizontal = Control.SIZE_EXPAND_FILL
if params.has(u_name) and params[u_name] is GradientTexture2D:
gradient_edit.set_gradient_texture(params[u_name])
else:
params[u_name] = gradient_edit.texture
# This needs to be call_deferred because GradientTexture2D gets updated next frame.
# Without this, the texture is purple.
value_changed.call_deferred(gradient_edit.texture, u_name)
gradient_edit.updated.connect(
func(_gradient, _cc): value_changed.call(gradient_edit.texture, u_name)
)
if shader_node is VisualShaderNodeTexture:
var texture := (shader_node as VisualShaderNodeTexture).texture
params[u_name] = texture
if texture is GradientTexture1D or texture is GradientTexture2D:
_create_gradient_texture_ui(params, u_name, hbox, value_changed)
elif texture is CurveTexture:
_create_curve_texture_ui(params, u_name, hbox, value_changed)
elif texture is NoiseTexture2D:
_create_noise_texture_ui(params, u_name, hbox, value_changed, parent_node)
else: # Simple texture
_create_simple_texture_ui(
params, u_name, hbox, value_changed, parent_node, file_selected
)
elif u_name.begins_with("gradient_"):
_create_gradient_texture_ui(params, u_name, hbox, value_changed)
hbox.add_child(gradient_edit)
elif u_name.begins_with("curve_"):
_create_curve_texture_ui(params, u_name, hbox, value_changed)
elif u_name.begins_with("noise_"):
_create_noise_texture_ui(params, u_name, hbox, value_changed, parent_node)
else: # Simple texture
_create_simple_texture_ui(
params, u_name, hbox, value_changed, parent_node, file_selected
var curve_edit := CurveEdit.new()
curve_edit.size_flags_horizontal = Control.SIZE_EXPAND_FILL
if params.has(u_name) and params[u_name] is CurveTexture:
curve_edit.curve = params[u_name].curve
else:
curve_edit.set_default_curve()
params[u_name] = CurveEdit.to_texture(curve_edit.curve)
curve_edit.value_changed.connect(
func(curve: Curve): value_changed.call(CurveEdit.to_texture(curve), u_name)
)
hbox.add_child(curve_edit)
elif u_name.begins_with("noise_"):
var noise_generator_dialog := NOISE_GENERATOR.instantiate() as AcceptDialog
noise_generator_dialog.always_on_top = true
var noise_generator := noise_generator_dialog.get_child(0) as NoiseGenerator
if params.has(u_name) and params[u_name] is NoiseTexture2D:
noise_generator.noise_texture = params[u_name]
else:
params[u_name] = noise_generator.noise_texture
noise_generator.value_changed.connect(
func(noise_texture: NoiseTexture2D): value_changed.call(noise_texture, u_name)
)
parent_node.add_child(noise_generator_dialog)
var button := Button.new()
button.text = "Generate noise"
button.pressed.connect(noise_generator_dialog.popup_centered)
button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
hbox.add_child(button)
else: ## Simple texture
var file_dialog := FileDialog.new()
file_dialog.always_on_top = true
file_dialog.file_mode = FileDialog.FILE_MODE_OPEN_FILE
file_dialog.access = FileDialog.ACCESS_FILESYSTEM
file_dialog.size = Vector2(384, 281)
file_dialog.file_selected.connect(file_selected.bind(u_name))
file_dialog.use_native_dialog = Global.use_native_file_dialogs
var button := Button.new()
button.text = "Load texture"
button.pressed.connect(file_dialog.popup_centered)
button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
var mod_button := Button.new()
mod_button.text = "Modify"
mod_button.pressed.connect(
func():
_modify_texture_resource(
_get_loaded_texture(params, u_name),
u_name,
_shader_update_texture.bind(value_changed, u_name)
)
)
mod_button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
mod_button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
hbox.add_child(button)
hbox.add_child(mod_button)
parent_node.add_child(file_dialog)
parent_node.add_child(hbox)
elif u_type == "bool":
@ -364,106 +408,6 @@ static func _mat3str_to_basis(mat3: String) -> Basis:
return basis
static func _create_simple_texture_ui(
params: Dictionary,
u_name: String,
hbox: BoxContainer,
value_changed: Callable,
parent_node: Control,
file_selected: Callable
) -> void:
var file_dialog := FileDialog.new()
file_dialog.always_on_top = true
file_dialog.file_mode = FileDialog.FILE_MODE_OPEN_FILE
file_dialog.access = FileDialog.ACCESS_FILESYSTEM
file_dialog.size = Vector2(384, 281)
file_dialog.file_selected.connect(file_selected.bind(u_name))
file_dialog.use_native_dialog = Global.use_native_file_dialogs
var button := Button.new()
button.text = "Load texture"
button.pressed.connect(file_dialog.popup_centered)
button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
var mod_button := Button.new()
mod_button.text = "Modify"
mod_button.pressed.connect(
func():
_modify_texture_resource(
_get_loaded_texture(params, u_name),
u_name,
_shader_update_texture.bind(value_changed, u_name)
)
)
mod_button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
mod_button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
hbox.add_child(button)
hbox.add_child(mod_button)
parent_node.add_child(file_dialog)
static func _create_gradient_texture_ui(
params: Dictionary, u_name: String, hbox: BoxContainer, value_changed: Callable
) -> void:
var gradient_edit := GRADIENT_EDIT_TSCN.instantiate() as GradientEditNode
gradient_edit.size_flags_horizontal = Control.SIZE_EXPAND_FILL
if params.has(u_name):
var texture = params[u_name]
if texture is GradientTexture2D:
gradient_edit.set_gradient_texture(texture)
elif texture is GradientTexture1D:
gradient_edit.set_gradient_texture_1d(texture)
else:
params[u_name] = gradient_edit.texture
# This needs to be call_deferred because GradientTexture2D gets updated next frame.
# Without this, the texture is purple.
value_changed.call_deferred(gradient_edit.texture, u_name)
gradient_edit.updated.connect(
func(_gradient, _cc): value_changed.call(gradient_edit.texture, u_name)
)
hbox.add_child(gradient_edit)
static func _create_curve_texture_ui(
params: Dictionary, u_name: String, hbox: BoxContainer, value_changed: Callable
) -> void:
var curve_edit := CurveEdit.new()
curve_edit.size_flags_horizontal = Control.SIZE_EXPAND_FILL
if params.has(u_name) and params[u_name] is CurveTexture:
curve_edit.curve = params[u_name].curve
else:
curve_edit.set_default_curve()
params[u_name] = CurveEdit.to_texture(curve_edit.curve)
curve_edit.value_changed.connect(
func(curve: Curve): value_changed.call(CurveEdit.to_texture(curve), u_name)
)
hbox.add_child(curve_edit)
static func _create_noise_texture_ui(
params: Dictionary,
u_name: String,
hbox: BoxContainer,
value_changed: Callable,
parent_node: Control
) -> void:
var noise_generator_dialog := NOISE_GENERATOR.instantiate() as AcceptDialog
var noise_generator := noise_generator_dialog.get_child(0) as NoiseGenerator
if params.has(u_name) and params[u_name] is NoiseTexture2D:
noise_generator.noise_texture = params[u_name]
else:
params[u_name] = noise_generator.noise_texture
noise_generator.value_changed.connect(
func(noise_texture: NoiseTexture2D): value_changed.call(noise_texture, u_name)
)
parent_node.add_child(noise_generator_dialog)
var button := Button.new()
button.text = "Generate noise"
button.pressed.connect(noise_generator_dialog.popup_centered)
button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
hbox.add_child(button)
static func _shader_change_palette(value_changed: Callable, parameter_name: String) -> void:
var palette := Palettes.current_palette
_shader_update_palette_texture(palette, value_changed, parameter_name)

View file

@ -169,13 +169,6 @@ func get_gradient_color(x: float) -> Color:
return gradient.sample(x / x_offset)
func set_gradient_texture_1d(new_texture: GradientTexture1D) -> void:
texture = GradientTexture2D.new()
texture.gradient = new_texture.gradient
$TextureRect.texture = texture
gradient = texture.gradient
func set_gradient_texture(new_texture: GradientTexture2D) -> void:
$TextureRect.texture = new_texture
texture = new_texture

View file

@ -11,113 +11,131 @@ var noise_texture: NoiseTexture2D:
if not is_instance_valid(preview):
await ready
preview.texture = noise_texture
_set_node_values()
@onready var preview := %Preview as TextureRect
@onready var size_slider := %SizeSlider as ValueSliderV2
@onready var properties := {
"invert": %InvertCheckBox,
"in_3d_space": %In3DSpaceCheckBox,
"seamless": %SeamlessCheckBox,
"as_normal_map": %NormalMapCheckBox,
"normalize": %NormalizeCheckBox,
"color_ramp": %ColorRampEdit,
"noise:noise_type": %NoiseTypeOptionButton,
"noise:seed": %SeedSlider,
"noise:frequency": %FrequencySlider,
"noise:offset": %OffsetSlider,
"noise:fractal_type": %FractalTypeOptionButton,
"noise:fractal_octaves": %FractalOctavesSlider,
"noise:fractal_lacunarity": %FractalLacunaritySlider,
"noise:fractal_gain": %FractalGainSlider,
"noise:fractal_weighted_strength": %FractalWeightedStrengthSlider,
"noise:domain_warp_enabled": %DomainWarpEnabledCheckBox,
"noise:domain_warp_type": %DomainWarpTypeOptionButton,
"noise:domain_warp_amplitude": %DomainWarpAmplitudeSlider,
"noise:domain_warp_frequency": %DomainWarpFrequencySlider,
"noise:domain_warp_fractal_type": %DomainWarpFractalTypeOptionButton,
"noise:domain_warp_fractal_octaves": %DomainWarpFractalOctavesSlider,
"noise:domain_warp_fractal_lacunarity": %DomainWarpFractalLacunaritySlider,
"noise:domain_warp_fractal_gain": %DomainWarpFractalGainSlider
}
func _init() -> void:
noise_texture = NoiseTexture2D.new()
func _ready() -> void:
# Connect the signals of the object property nodes
for prop in properties:
var node: Control = properties[prop]
if node is ValueSliderV3:
node.value_changed.connect(_property_vector3_changed.bind(prop))
elif node is ValueSliderV2:
var property_path: String = prop
node.value_changed.connect(_property_vector2_changed.bind(property_path))
elif node is Range:
node.value_changed.connect(_property_value_changed.bind(prop))
elif node is OptionButton:
node.item_selected.connect(_property_item_selected.bind(prop))
elif node is CheckBox:
node.toggled.connect(_property_toggled.bind(prop))
elif node is GradientEditNode:
node.updated.connect(_property_gradient_changed.bind(prop))
func _set_node_values() -> void:
size_slider.value.x = noise_texture.width
size_slider.value.y = noise_texture.height
for prop in properties:
var property_path: String = prop
var value = noise_texture.get_indexed(property_path)
if value == null:
continue
var node: Control = properties[prop]
if node is Range or node is ValueSliderV3 or node is ValueSliderV2:
if typeof(node.value) != typeof(value) and typeof(value) != TYPE_INT:
continue
node.value = value
elif node is OptionButton:
node.selected = value
elif node is CheckBox:
node.button_pressed = value
elif node is GradientEditNode:
node.gradient = value
func _set_value_from_node(value, prop: String) -> void:
noise_texture.set_indexed(prop, value)
await noise_texture.changed
value_changed.emit(noise_texture)
func _property_vector3_changed(value: Vector3, prop: String) -> void:
_set_value_from_node(value, prop)
func _property_vector2_changed(value: Vector2, prop: String) -> void:
_set_value_from_node(value, prop)
func _property_value_changed(value: float, prop: String) -> void:
_set_value_from_node(value, prop)
func _property_item_selected(value: int, prop: String) -> void:
_set_value_from_node(value, prop)
func _property_gradient_changed(value: Gradient, _cc: bool, prop: String) -> void:
_set_value_from_node(value, prop)
func _property_toggled(value: bool, prop: String) -> void:
_set_value_from_node(value, prop)
func _on_size_slider_value_changed(value: Vector2) -> void:
noise_texture.width = value.x
noise_texture.height = value.y
await noise_texture.changed
value_changed.emit(noise_texture)
func _on_invert_check_box_toggled(toggled_on: bool) -> void:
noise_texture.invert = toggled_on
value_changed.emit(noise_texture)
func _on_in_3d_space_check_box_toggled(toggled_on: bool) -> void:
noise_texture.in_3d_space = toggled_on
value_changed.emit(noise_texture)
func _on_seamless_check_box_toggled(toggled_on: bool) -> void:
noise_texture.seamless = toggled_on
value_changed.emit(noise_texture)
func _on_normal_map_check_box_toggled(toggled_on: bool) -> void:
noise_texture.as_normal_map = toggled_on
value_changed.emit(noise_texture)
func _on_normalize_check_box_toggled(toggled_on: bool) -> void:
noise_texture.normalize = toggled_on
value_changed.emit(noise_texture)
func _on_gradient_edit_updated(gradient: Gradient, _cc: bool) -> void:
noise_texture.color_ramp = gradient
value_changed.emit(noise_texture)
func _on_noise_type_option_button_item_selected(index: FastNoiseLite.NoiseType) -> void:
(noise_texture.noise as FastNoiseLite).noise_type = index
value_changed.emit(noise_texture)
func _on_seed_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).seed = value
value_changed.emit(noise_texture)
func _on_frequency_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).frequency = value
value_changed.emit(noise_texture)
func _on_offset_slider_value_changed(value: Vector3) -> void:
(noise_texture.noise as FastNoiseLite).offset = value
value_changed.emit(noise_texture)
func _on_fractal_type_option_button_item_selected(index: FastNoiseLite.FractalType) -> void:
(noise_texture.noise as FastNoiseLite).fractal_type = index
value_changed.emit(noise_texture)
func _on_fractal_octaves_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).fractal_octaves = value
value_changed.emit(noise_texture)
func _on_fractal_lacunarity_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).fractal_lacunarity = value
value_changed.emit(noise_texture)
func _on_fractal_gain_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).fractal_gain = value
value_changed.emit(noise_texture)
func _on_fractal_weighted_strength_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).fractal_weighted_strength = value
value_changed.emit(noise_texture)
func _on_domain_warp_enabled_check_box_toggled(toggled_on: bool) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_enabled = toggled_on
value_changed.emit(noise_texture)
func _on_domain_warp_type_option_button_item_selected(index: FastNoiseLite.DomainWarpType) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_type = index
value_changed.emit(noise_texture)
func _on_domain_warp_amplitude_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_amplitude = value
value_changed.emit(noise_texture)
func _on_domain_warp_frequency_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_frequency = value
value_changed.emit(noise_texture)
func _on_domain_warp_fractal_type_option_button_item_selected(
index: FastNoiseLite.DomainWarpFractalType
) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_fractal_type = index
value_changed.emit(noise_texture)
func _on_domain_warp_fractal_octaves_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_fractal_octaves = value
value_changed.emit(noise_texture)
func _on_domain_warp_fractal_lacunarity_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_fractal_lacunarity = value
value_changed.emit(noise_texture)
func _on_domain_warp_fractal_gain_slider_value_changed(value: float) -> void:
(noise_texture.noise as FastNoiseLite).domain_warp_fractal_gain = value
value_changed.emit(noise_texture)

View file

@ -15,12 +15,14 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_uxdt4")
[node name="VSplitContainer" type="VSplitContainer" parent="."]
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Preview" type="TextureRect" parent="VSplitContainer"]
[node name="VSplitContainer" type="VSplitContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="Preview" type="TextureRect" parent="VBoxContainer/VSplitContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(64, 64)
layout_mode = 2
@ -28,21 +30,16 @@ size_flags_vertical = 3
expand_mode = 1
stretch_mode = 5
[node name="VBoxContainer" type="VBoxContainer" parent="VSplitContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="GridContainer" type="GridContainer" parent="VSplitContainer/VBoxContainer"]
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/VSplitContainer"]
layout_mode = 2
columns = 2
[node name="SizeLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="SizeLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Size:"
[node name="SizeSlider" parent="VSplitContainer/VBoxContainer/GridContainer" instance=ExtResource("1_evt0j")]
unique_name_in_owner = true
[node name="SizeSlider" parent="VBoxContainer/VSplitContainer/GridContainer" instance=ExtResource("1_evt0j")]
layout_mode = 2
value = Vector2(512, 512)
min_value = Vector2(1, 1)
@ -53,78 +50,71 @@ grid_columns = 2
suffix_x = "px"
suffix_y = "px"
[node name="InvertLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="InvertLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Invert:"
[node name="InvertCheckBox" type="CheckBox" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="InvertCheckBox" type="CheckBox" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
text = "On"
[node name="In3DSpaceLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="In3DSpaceLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "In 3D space:"
[node name="In3DSpaceCheckBox" type="CheckBox" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="In3DSpaceCheckBox" type="CheckBox" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
text = "On"
[node name="SeamlessLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="SeamlessLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Seamless:"
[node name="SeamlessCheckBox" type="CheckBox" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="SeamlessCheckBox" type="CheckBox" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
text = "On"
[node name="NormalMapLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="NormalMapLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Normal map:"
[node name="NormalMapCheckBox" type="CheckBox" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="NormalMapCheckBox" type="CheckBox" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
text = "On"
[node name="NormalizeLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="NormalizeLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Normalize:"
[node name="NormalizeCheckBox" type="CheckBox" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="NormalizeCheckBox" type="CheckBox" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
button_pressed = true
text = "On"
[node name="ColorRampLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="ColorRampLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Color ramp:"
[node name="ColorRampEdit" parent="VSplitContainer/VBoxContainer/GridContainer" instance=ExtResource("2_nxkb0")]
unique_name_in_owner = true
[node name="GradientEdit" parent="VBoxContainer/VSplitContainer/GridContainer" instance=ExtResource("2_nxkb0")]
layout_mode = 2
[node name="NoiseTypeLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="NoiseTypeLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Noise type:"
[node name="NoiseTypeOptionButton" type="OptionButton" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="NoiseTypeOptionButton" type="OptionButton" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
@ -142,13 +132,12 @@ popup/item_4/id = 4
popup/item_5/text = "Value"
popup/item_5/id = 5
[node name="SeedLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="SeedLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Seed:"
[node name="SeedSlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="SeedSlider" type="TextureProgressBar" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -164,13 +153,12 @@ stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
[node name="FrequencyLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="FrequencyLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Frequency:"
[node name="FrequencySlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/GridContainer"]
unique_name_in_owner = true
[node name="FrequencySlider" type="TextureProgressBar" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -190,36 +178,34 @@ stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
snap_step = 0.1
[node name="OffsetLabel" type="Label" parent="VSplitContainer/VBoxContainer/GridContainer"]
[node name="OffsetLabel" type="Label" parent="VBoxContainer/VSplitContainer/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Offset:"
[node name="OffsetSlider" parent="VSplitContainer/VBoxContainer/GridContainer" instance=ExtResource("3_ffklk")]
unique_name_in_owner = true
[node name="OffsetSlider" parent="VBoxContainer/VSplitContainer/GridContainer" instance=ExtResource("3_ffklk")]
layout_mode = 2
min_value = Vector3(-1000, -1000, -1000)
max_value = Vector3(1000, 1000, 1000)
grid_columns = 3
[node name="FractalOptions" type="VBoxContainer" parent="VSplitContainer/VBoxContainer"]
[node name="FractalOptions" type="VBoxContainer" parent="VBoxContainer"]
layout_mode = 2
theme_type_variation = &"CollapsibleContainer"
script = ExtResource("4_r1f12")
text = "Fractal"
[node name="GridContainer" type="GridContainer" parent="VSplitContainer/VBoxContainer/FractalOptions"]
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/FractalOptions"]
visible = false
layout_mode = 2
columns = 2
[node name="FractalTypeLabel" type="Label" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
[node name="FractalTypeLabel" type="Label" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Type:"
[node name="FractalTypeOptionButton" type="OptionButton" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
unique_name_in_owner = true
[node name="FractalTypeOptionButton" type="OptionButton" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
@ -233,13 +219,12 @@ popup/item_2/id = 2
popup/item_3/text = "Ping-Pong"
popup/item_3/id = 3
[node name="FractalOctavesLabel" type="Label" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
[node name="FractalOctavesLabel" type="Label" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Octaves:"
[node name="FractalOctavesSlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
unique_name_in_owner = true
[node name="FractalOctavesSlider" type="TextureProgressBar" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -255,13 +240,12 @@ stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
[node name="FractalLacunarityLabel" type="Label" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
[node name="FractalLacunarityLabel" type="Label" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Lacunarity:"
[node name="FractalLacunaritySlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
unique_name_in_owner = true
[node name="FractalLacunaritySlider" type="TextureProgressBar" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -279,13 +263,12 @@ stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
[node name="FractalGainLabel" type="Label" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
[node name="FractalGainLabel" type="Label" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Gain:"
[node name="FractalGainSlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
unique_name_in_owner = true
[node name="FractalGainSlider" type="TextureProgressBar" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -305,13 +288,12 @@ stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
snap_step = 0.01
[node name="FractalWeightedStrengthLabel" type="Label" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
[node name="FractalWeightedStrengthLabel" type="Label" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Weighted Strength:"
[node name="FractalWeightedStrengthSlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/FractalOptions/GridContainer"]
unique_name_in_owner = true
[node name="FractalWeightedStrengthSlider" type="TextureProgressBar" parent="VBoxContainer/FractalOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -327,35 +309,33 @@ stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
snap_step = 0.1
[node name="DomainWarpOptions" type="VBoxContainer" parent="VSplitContainer/VBoxContainer"]
[node name="DomainWarpOptions" type="VBoxContainer" parent="VBoxContainer"]
layout_mode = 2
theme_type_variation = &"CollapsibleContainer"
script = ExtResource("4_r1f12")
text = "Domain Warp"
[node name="GridContainer" type="GridContainer" parent="VSplitContainer/VBoxContainer/DomainWarpOptions"]
[node name="GridContainer" type="GridContainer" parent="VBoxContainer/DomainWarpOptions"]
visible = false
layout_mode = 2
columns = 2
[node name="DomainWarpEnabledLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpEnabledLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Enabled:"
[node name="DomainWarpEnabledCheckBox" type="CheckBox" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpEnabledCheckBox" type="CheckBox" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
mouse_default_cursor_shape = 2
text = "On"
[node name="DomainWarpTypeLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpTypeLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Type:"
[node name="DomainWarpTypeOptionButton" type="OptionButton" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpTypeOptionButton" type="OptionButton" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
@ -367,13 +347,12 @@ popup/item_1/id = 1
popup/item_2/text = "Basic Grid"
popup/item_2/id = 2
[node name="DomainWarpAmplitudeLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpAmplitudeLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Amplitude:"
[node name="DomainWarpAmplitudeSlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpAmplitudeSlider" type="TextureProgressBar" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -389,13 +368,12 @@ stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
[node name="DomainWarpFrequencyLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpFrequencyLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Frequency:"
[node name="DomainWarpFrequencySlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpFrequencySlider" type="TextureProgressBar" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -415,13 +393,12 @@ stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
snap_step = 0.01
[node name="DomainWarpFractalTypeLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpFractalTypeLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Fractal type:"
[node name="DomainWarpFractalTypeOptionButton" type="OptionButton" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpFractalTypeOptionButton" type="OptionButton" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
mouse_default_cursor_shape = 2
@ -433,13 +410,12 @@ popup/item_1/id = 1
popup/item_2/text = "Independent"
popup/item_2/id = 2
[node name="DomainWarpFractalOctavesLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpFractalOctavesLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Fractal octaves:"
[node name="DomainWarpFractalOctavesSlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpFractalOctavesSlider" type="TextureProgressBar" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -455,13 +431,12 @@ stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
[node name="DomainWarpFractalLacunarityLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpFractalLacunarityLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Fractal lacunarity:"
[node name="DomainWarpFractalLacunaritySlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpFractalLacunaritySlider" type="TextureProgressBar" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -479,13 +454,12 @@ stretch_margin_right = 3
stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
[node name="DomainWarpFractalGainLabel" type="Label" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
[node name="DomainWarpFractalGainLabel" type="Label" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
text = "Fractal gain:"
[node name="DomainWarpFractalGainSlider" type="TextureProgressBar" parent="VSplitContainer/VBoxContainer/DomainWarpOptions/GridContainer"]
unique_name_in_owner = true
[node name="DomainWarpFractalGainSlider" type="TextureProgressBar" parent="VBoxContainer/DomainWarpOptions/GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
@ -505,4 +479,27 @@ stretch_margin_bottom = 3
script = ExtResource("1_pm12o")
snap_step = 0.01
[connection signal="value_changed" from="VSplitContainer/VBoxContainer/GridContainer/SizeSlider" to="." method="_on_size_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/VSplitContainer/GridContainer/SizeSlider" to="." method="_on_size_slider_value_changed"]
[connection signal="toggled" from="VBoxContainer/VSplitContainer/GridContainer/InvertCheckBox" to="." method="_on_invert_check_box_toggled"]
[connection signal="toggled" from="VBoxContainer/VSplitContainer/GridContainer/In3DSpaceCheckBox" to="." method="_on_in_3d_space_check_box_toggled"]
[connection signal="toggled" from="VBoxContainer/VSplitContainer/GridContainer/SeamlessCheckBox" to="." method="_on_seamless_check_box_toggled"]
[connection signal="toggled" from="VBoxContainer/VSplitContainer/GridContainer/NormalMapCheckBox" to="." method="_on_normal_map_check_box_toggled"]
[connection signal="toggled" from="VBoxContainer/VSplitContainer/GridContainer/NormalizeCheckBox" to="." method="_on_normalize_check_box_toggled"]
[connection signal="updated" from="VBoxContainer/VSplitContainer/GridContainer/GradientEdit" to="." method="_on_gradient_edit_updated"]
[connection signal="item_selected" from="VBoxContainer/VSplitContainer/GridContainer/NoiseTypeOptionButton" to="." method="_on_noise_type_option_button_item_selected"]
[connection signal="value_changed" from="VBoxContainer/VSplitContainer/GridContainer/SeedSlider" to="." method="_on_seed_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/VSplitContainer/GridContainer/FrequencySlider" to="." method="_on_frequency_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/VSplitContainer/GridContainer/OffsetSlider" to="." method="_on_offset_slider_value_changed"]
[connection signal="item_selected" from="VBoxContainer/FractalOptions/GridContainer/FractalTypeOptionButton" to="." method="_on_fractal_type_option_button_item_selected"]
[connection signal="value_changed" from="VBoxContainer/FractalOptions/GridContainer/FractalOctavesSlider" to="." method="_on_fractal_octaves_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/FractalOptions/GridContainer/FractalLacunaritySlider" to="." method="_on_fractal_lacunarity_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/FractalOptions/GridContainer/FractalGainSlider" to="." method="_on_fractal_gain_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/FractalOptions/GridContainer/FractalWeightedStrengthSlider" to="." method="_on_fractal_weighted_strength_slider_value_changed"]
[connection signal="toggled" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpEnabledCheckBox" to="." method="_on_domain_warp_enabled_check_box_toggled"]
[connection signal="item_selected" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpTypeOptionButton" to="." method="_on_domain_warp_type_option_button_item_selected"]
[connection signal="value_changed" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpAmplitudeSlider" to="." method="_on_domain_warp_amplitude_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpFrequencySlider" to="." method="_on_domain_warp_frequency_slider_value_changed"]
[connection signal="item_selected" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpFractalTypeOptionButton" to="." method="_on_domain_warp_fractal_type_option_button_item_selected"]
[connection signal="value_changed" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpFractalOctavesSlider" to="." method="_on_domain_warp_fractal_octaves_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpFractalLacunaritySlider" to="." method="_on_domain_warp_fractal_lacunarity_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/DomainWarpOptions/GridContainer/DomainWarpFractalGainSlider" to="." method="_on_domain_warp_fractal_gain_slider_value_changed"]