1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Compare commits

..

6 commits

Author SHA1 Message Date
Emmanouil Papadeas 8b3b5083dc
Merge 5d059126dd into 5a17117d59 2024-12-17 17:39:39 +00:00
Emmanouil Papadeas 5d059126dd New translations translations.pot (Portuguese, Brazilian) 2024-12-17 19:39:37 +02:00
Emmanouil Papadeas 0fe1eb5dda New translations translations.pot (German) 2024-12-17 19:39:36 +02:00
Emmanouil Papadeas 5a17117d59 Improve support for visual shader loading
ShaderLoader now gets the VisualShaderNodeTextures of the VisualShader into account, allowing for visual shaders that are being loaded to have default textures.
2024-12-17 18:11:36 +02:00
Emmanouil Papadeas e3fc230994 New translations translations.pot (Japanese) 2024-12-17 13:57:16 +02:00
Emmanouil Papadeas 3edb37168c Fix issues with the noise generator node
Its nodes now get updated when changing the noise texture, and it waits for `noise_texture.changed` to emit before emitting the `value_changed` signal. See https://docs.godotengine.org/en/stable/classes/class_noisetexture2d.html for the explanation.
2024-12-17 13:38:18 +02:00
8 changed files with 379 additions and 325 deletions

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: German\n" "Language-Team: German\n"
"Language: de_DE\n" "Language: de_DE\n"
"PO-Revision-Date: 2024-12-16 23:11\n" "PO-Revision-Date: 2024-12-17 17:39\n"
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@ -226,7 +226,7 @@ msgstr "Anfangswinkel:"
#. Found under the Select menu, It's a checkbox that, if enabled, wraps around brush strokes if some part of them goes out of selection bounds. #. Found under the Select menu, It's a checkbox that, if enabled, wraps around brush strokes if some part of them goes out of selection bounds.
msgid "Wrap Strokes" msgid "Wrap Strokes"
msgstr "" msgstr "Pinselstriche umwickeln"
msgid "Clear" msgid "Clear"
msgstr "Leeren" msgstr "Leeren"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Japanese\n" "Language-Team: Japanese\n"
"Language: ja_JP\n" "Language: ja_JP\n"
"PO-Revision-Date: 2024-12-16 23:11\n" "PO-Revision-Date: 2024-12-17 11:57\n"
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@ -226,7 +226,7 @@ msgstr "初期角度:"
#. Found under the Select menu, It's a checkbox that, if enabled, wraps around brush strokes if some part of them goes out of selection bounds. #. Found under the Select menu, It's a checkbox that, if enabled, wraps around brush strokes if some part of them goes out of selection bounds.
msgid "Wrap Strokes" msgid "Wrap Strokes"
msgstr "" msgstr "ラップストローク"
msgid "Clear" msgid "Clear"
msgstr "削除" msgstr "削除"

View file

@ -10,7 +10,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Language-Team: Portuguese, Brazilian\n" "Language-Team: Portuguese, Brazilian\n"
"Language: pt_BR\n" "Language: pt_BR\n"
"PO-Revision-Date: 2024-12-16 23:11\n" "PO-Revision-Date: 2024-12-17 17:39\n"
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
@ -171,15 +171,15 @@ msgstr "Porcentagem"
#. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode. #. Found in the create new image dialog. Allows users to change the color mode of the new project, such as RGBA or indexed mode.
msgid "Color mode:" msgid "Color mode:"
msgstr "" msgstr "Modo de cor:"
#. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode. #. Found in the image menu. A submenu that allows users to change the color mode of the project, such as RGBA or indexed mode.
msgid "Color Mode" msgid "Color Mode"
msgstr "" msgstr "Modo de Cor"
#. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color #. Found in the image menu, under the "Color Mode" submenu. Refers to the indexed color mode. See this wikipedia page for more information: https://en.wikipedia.org/wiki/Indexed_color
msgid "Indexed" msgid "Indexed"
msgstr "" msgstr "Indexada"
#. Found in the image menu. Sets the size of the project to be the same as the size of the active selection. #. Found in the image menu. Sets the size of the project to be the same as the size of the active selection.
msgid "Crop to Selection" msgid "Crop to Selection"
@ -235,41 +235,41 @@ msgid "Invert"
msgstr "Inverter" msgstr "Inverter"
msgid "Modify" msgid "Modify"
msgstr "" msgstr "Modificar"
#. Found under the Select menu, in the Modify submenu. When selected, it shows a window that lets users expand the active selection. #. Found under the Select menu, in the Modify submenu. When selected, it shows a window that lets users expand the active selection.
msgid "Expand" msgid "Expand"
msgstr "" msgstr "Expandir"
#. Title of a window that lets users expand the active selection. #. Title of a window that lets users expand the active selection.
msgid "Expand Selection" msgid "Expand Selection"
msgstr "" msgstr "Expandir Seleção"
#. Found under the Select menu, in the Modify submenu. When selected, it shows a window that lets users shrink the active selection. #. Found under the Select menu, in the Modify submenu. When selected, it shows a window that lets users shrink the active selection.
msgid "Shrink" msgid "Shrink"
msgstr "" msgstr "Encolher"
#. Title of a window that lets users shrink the active selection. #. Title of a window that lets users shrink the active selection.
msgid "Shrink Selection" msgid "Shrink Selection"
msgstr "" msgstr "Encolher Seleção"
#. Found under the Select menu, in the Modify submenu. When selected, it shows a window that lets users create a border of the active selection. #. Found under the Select menu, in the Modify submenu. When selected, it shows a window that lets users create a border of the active selection.
msgid "Border" msgid "Border"
msgstr "" msgstr "Borda"
#. Title of a window that lets users create a border of the active selection. #. Title of a window that lets users create a border of the active selection.
msgid "Border Selection" msgid "Border Selection"
msgstr "" msgstr "Seleção de Borda"
#. Refers to a diamond-like shape. #. Refers to a diamond-like shape.
msgid "Diamond" msgid "Diamond"
msgstr "" msgstr "Losango"
msgid "Circle" msgid "Circle"
msgstr "" msgstr "Círculo"
msgid "Square" msgid "Square"
msgstr "" msgstr "Quadrado"
msgid "Grayscale View" msgid "Grayscale View"
msgstr "Visualização em tons de cinza" msgstr "Visualização em tons de cinza"
@ -306,7 +306,7 @@ msgstr ""
#. Found under "Tile Mode Offsets". It's a button that when pressed, enables masking for tile mode. Masking essentially limits drawing to the visible pixels of the image, thus preventing from drawing on transparent pixels. #. Found under "Tile Mode Offsets". It's a button that when pressed, enables masking for tile mode. Masking essentially limits drawing to the visible pixels of the image, thus preventing from drawing on transparent pixels.
msgid "Masking:" msgid "Masking:"
msgstr "" msgstr "Máscara:"
msgid "Reset" msgid "Reset"
msgstr "Redefinir" msgstr "Redefinir"
@ -1181,24 +1181,24 @@ msgstr "Fator de efeito de matiz:"
#. An image effect that adjusts the colors of the image by using curves. #. An image effect that adjusts the colors of the image by using curves.
msgid "Color Curves" msgid "Color Curves"
msgstr "" msgstr "Curvas de Cor"
#. Refers to a color channel, such as the red, green, blue or alpha channels. #. Refers to a color channel, such as the red, green, blue or alpha channels.
msgid "Channel:" msgid "Channel:"
msgstr "" msgstr "Canal:"
msgid "Red" msgid "Red"
msgstr "" msgstr "Vermelho"
msgid "Green" msgid "Green"
msgstr "" msgstr "Verde"
#. Refers to the value (as in HSV) of the colors of an image. #. Refers to the value (as in HSV) of the colors of an image.
msgid "Value" msgid "Value"
msgstr "" msgstr "Valor"
msgid "Presets" msgid "Presets"
msgstr "" msgstr "Predefinições"
msgid "Apply" msgid "Apply"
msgstr "Aplique" msgstr "Aplique"
@ -1605,7 +1605,9 @@ msgstr "Ferramenta de Elipse\n\n"
msgid "Text\n\n" msgid "Text\n\n"
"%s for left mouse button\n" "%s for left mouse button\n"
"%s for right mouse button" "%s for right mouse button"
msgstr "" msgstr "Texto\n\n"
"%s para o botão esquerdo do mouse\n"
"%s para o botão direito do mouse"
msgid "Rectangle" msgid "Rectangle"
msgstr "Retângulo" msgstr "Retângulo"
@ -1873,7 +1875,7 @@ msgstr "Se essa opção estiver ativada, a janela do aplicativo pode ficar trans
#. An option found in the preferences, under the Performance section. A dummy driver is basically a driver that doesn't do anything. When this option is enabled, audio does not play, but it can help save some performance. #. An option found in the preferences, under the Performance section. A dummy driver is basically a driver that doesn't do anything. When this option is enabled, audio does not play, but it can help save some performance.
msgid "Use dummy audio driver" msgid "Use dummy audio driver"
msgstr "" msgstr "Usar driver de áudio fictício"
#. Found in the Preferences, under Drivers. Specifies the renderer/video driver being used. #. Found in the Preferences, under Drivers. Specifies the renderer/video driver being used.
msgid "Renderer:" msgid "Renderer:"
@ -2021,7 +2023,7 @@ msgstr "Preenche a forma desenhada com cor, em vez de desenhar uma forma oca"
#. Found in the tool options of the Pencil, Eraser and Shading tools. It is a percentage of how dense the brush is. 100% density means that the brush gets completely drawn, anything less leaves gaps inside the brush, acting like a spray tool. #. Found in the tool options of the Pencil, Eraser and Shading tools. It is a percentage of how dense the brush is. 100% density means that the brush gets completely drawn, anything less leaves gaps inside the brush, acting like a spray tool.
msgid "Density:" msgid "Density:"
msgstr "" msgstr "Densidade:"
msgid "Brush color from" msgid "Brush color from"
msgstr "Cor de pincel do" msgstr "Cor de pincel do"
@ -2125,30 +2127,30 @@ msgstr "Interseção de seleções"
#. Refers to the style of something, such as the style of a text, meaning whether it's regular, bold, italic, etc. #. Refers to the style of something, such as the style of a text, meaning whether it's regular, bold, italic, etc.
msgid "Style:" msgid "Style:"
msgstr "" msgstr "Estilo:"
#. Refers to the text. Regular means that the text is not bold or italic. #. Refers to the text. Regular means that the text is not bold or italic.
msgid "Regular" msgid "Regular"
msgstr "" msgstr "Regular"
#. Refers to text that is bold. #. Refers to text that is bold.
msgid "Bold" msgid "Bold"
msgstr "" msgstr "Negrito"
#. Refers to text that is italic. #. Refers to text that is italic.
msgid "Italic" msgid "Italic"
msgstr "" msgstr "Itálico"
#. Refers to text that is bold and italic. #. Refers to text that is bold and italic.
msgid "Bold Italic" msgid "Bold Italic"
msgstr "" msgstr "Negrito itálico"
#. https://en.wikipedia.org/wiki/Anti-aliasing #. https://en.wikipedia.org/wiki/Anti-aliasing
msgid "Antialiasing" msgid "Antialiasing"
msgstr "" msgstr "Anti-aliasing"
msgid "Grayscale" msgid "Grayscale"
msgstr "" msgstr "Escala de cinza"
msgid "Mirroring" msgid "Mirroring"
msgstr "Espelhamento" msgstr "Espelhamento"
@ -2310,7 +2312,7 @@ msgstr "Desvincular Cels"
#. An option found in the right click menu of an audio cel. If selected, the audio of the audio layer will start playing from this frame. #. An option found in the right click menu of an audio cel. If selected, the audio of the audio layer will start playing from this frame.
msgid "Play audio here" msgid "Play audio here"
msgstr "" msgstr "Reproduzir áudio aqui"
msgid "Properties" msgid "Properties"
msgstr "Propriedades" msgstr "Propriedades"
@ -2350,10 +2352,10 @@ msgstr "Grupo"
#. A tilemap is a type of layer, which is divided by grid cells, the size of which is determined by the tileset it uses. Each grid cell is mapped to a tile in the tileset. Tilemaps can be used to create game levels and layouts. #. A tilemap is a type of layer, which is divided by grid cells, the size of which is determined by the tileset it uses. Each grid cell is mapped to a tile in the tileset. Tilemaps can be used to create game levels and layouts.
msgid "Tilemap" msgid "Tilemap"
msgstr "" msgstr "Tilemap"
msgid "Audio" msgid "Audio"
msgstr "" msgstr "Áudio"
msgid "Layers" msgid "Layers"
msgstr "Camadas" msgstr "Camadas"
@ -2385,12 +2387,12 @@ msgstr "Adicionar Camada 3D"
#. One of the options of the create new layer button. #. One of the options of the create new layer button.
#: src/UI/Timeline/AnimationTimeline.tscn #: src/UI/Timeline/AnimationTimeline.tscn
msgid "Add Tilemap Layer" msgid "Add Tilemap Layer"
msgstr "" msgstr "Adicionar Camada de Tilemap"
#. One of the options of the create new layer button. #. One of the options of the create new layer button.
#: src/UI/Timeline/AnimationTimeline.tscn #: src/UI/Timeline/AnimationTimeline.tscn
msgid "Add Audio Layer" msgid "Add Audio Layer"
msgstr "" msgstr "Adicionar Camada de Áudio"
#: src/UI/Timeline/AnimationTimeline.tscn #: src/UI/Timeline/AnimationTimeline.tscn
msgid "Remove current layer" msgid "Remove current layer"
@ -2525,14 +2527,14 @@ msgstr "Expandir/recolher grupo"
#. Refers to the audio file of an audio layer. #. Refers to the audio file of an audio layer.
msgid "Audio file:" msgid "Audio file:"
msgstr "" msgstr "Arquivo de áudio:"
msgid "Load file" msgid "Load file"
msgstr "" msgstr "Carregar arquivo"
#. An option in the audio layer properties, allows users to play the audio starting from a specific frame. #. An option in the audio layer properties, allows users to play the audio starting from a specific frame.
msgid "Play at frame:" msgid "Play at frame:"
msgstr "" msgstr "Reproduzir a partir do frame:"
msgid "Palette" msgid "Palette"
msgstr "Paleta" msgstr "Paleta"
@ -3040,7 +3042,7 @@ msgstr "Ordenar por valor"
#. An option of the Sort palette button found in the palette panel. When selected, the colors of the palette are being sorted based on their OKHSL Lightness. #. An option of the Sort palette button found in the palette panel. When selected, the colors of the palette are being sorted based on their OKHSL Lightness.
msgid "Sort by lightness" msgid "Sort by lightness"
msgstr "" msgstr "Ordenar por claridade"
#. An option of the Sort palette button found in the palette panel. When selected, the colors of the palette are being sorted based on their red channel value. #. An option of the Sort palette button found in the palette panel. When selected, the colors of the palette are being sorted based on their red channel value.
msgid "Sort by red" msgid "Sort by red"
@ -3110,7 +3112,7 @@ msgstr "Gravador"
#. Tiles are images of a specific shape, usually rectangular, that are laid out in a grid. They are used in tile-based video games. https://en.wikipedia.org/wiki/Tile-based_video_game #. Tiles are images of a specific shape, usually rectangular, that are laid out in a grid. They are used in tile-based video games. https://en.wikipedia.org/wiki/Tile-based_video_game
msgid "Tiles" msgid "Tiles"
msgstr "" msgstr "Tiles"
msgid "Crop" msgid "Crop"
msgstr "Cortar" msgstr "Cortar"
@ -3521,47 +3523,47 @@ msgstr "Você deseja baixar a imagem de %s?"
#: src/Classes/TileSetCustom.gd #: src/Classes/TileSetCustom.gd
#: src/UI/Dialogs/ImportPreviewDialog.gd #: src/UI/Dialogs/ImportPreviewDialog.gd
msgid "Tileset" msgid "Tileset"
msgstr "" msgstr "Tileset"
#. A tileset is a collection of tiles. #. A tileset is a collection of tiles.
#: src/UI/Timeline/NewTileMapLayerDialog.tscn #: src/UI/Timeline/NewTileMapLayerDialog.tscn
msgid "Tileset:" msgid "Tileset:"
msgstr "" msgstr "Tileset:"
#. A tileset is a collection of tiles. #. A tileset is a collection of tiles.
#: src/UI/Dialogs/ProjectProperties.tscn #: src/UI/Dialogs/ProjectProperties.tscn
msgid "Tilesets" msgid "Tilesets"
msgstr "" msgstr "Tilesets"
#: src/UI/Timeline/NewTileMapLayerDialog.tscn #: src/UI/Timeline/NewTileMapLayerDialog.tscn
msgid "New tileset" msgid "New tileset"
msgstr "" msgstr "Novo tileset"
#: src/UI/Timeline/NewTileMapLayerDialog.tscn #: src/UI/Timeline/NewTileMapLayerDialog.tscn
msgid "Tileset name:" msgid "Tileset name:"
msgstr "" msgstr "Nome do tileset:"
#: src/UI/Timeline/NewTileMapLayerDialog.tscn #: src/UI/Timeline/NewTileMapLayerDialog.tscn
msgid "Tile size:" msgid "Tile size:"
msgstr "" msgstr "Tamanho do tile:"
#: src/UI/TilesPanel.tscn #: src/UI/TilesPanel.tscn
msgid "Draw tiles" msgid "Draw tiles"
msgstr "" msgstr "Desenhar tiles"
#: src/UI/TilesPanel.tscn #: src/UI/TilesPanel.tscn
msgid "Rotate tile left (counterclockwise)" msgid "Rotate tile left (counterclockwise)"
msgstr "" msgstr "Girar tile para a esquerda (anti-horário)"
#: src/UI/TilesPanel.tscn #: src/UI/TilesPanel.tscn
msgid "Rotate tile right (clockwise)" msgid "Rotate tile right (clockwise)"
msgstr "" msgstr "Girar tile para a direita (horário)"
#: src/UI/TilesPanel.tscn #: src/UI/TilesPanel.tscn
msgid "Flip tile horizontally" msgid "Flip tile horizontally"
msgstr "" msgstr "Inverter tile horizontalmente"
#: src/UI/TilesPanel.tscn #: src/UI/TilesPanel.tscn
msgid "Flip tile vertically" msgid "Flip tile vertically"
msgstr "" msgstr "Inverter tile verticalmente"

View file

@ -32,7 +32,11 @@ func handle_loading_file(file: String) -> void:
open_pxo_file(file) open_pxo_file(file)
elif file_ext == "tres": # Godot resource file elif file_ext == "tres": # Godot resource file
return 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)
elif file_ext == "tscn": # Godot scene file elif file_ext == "tscn": # Godot scene file
return return

View file

@ -241,78 +241,34 @@ static func create_ui_for_shader_uniforms(
label.size_flags_horizontal = Control.SIZE_EXPAND_FILL label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
var hbox := HBoxContainer.new() var hbox := HBoxContainer.new()
hbox.add_child(label) hbox.add_child(label)
if u_name.begins_with("gradient_"): if shader is VisualShader and u_name.begins_with("tex_frg_"):
var gradient_edit := GRADIENT_EDIT_TSCN.instantiate() as GradientEditNode var node_id := int(u_name.replace("tex_frg_", ""))
gradient_edit.size_flags_horizontal = Control.SIZE_EXPAND_FILL var shader_node := (shader as VisualShader).get_node(
if params.has(u_name) and params[u_name] is GradientTexture2D: VisualShader.TYPE_FRAGMENT, node_id
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)
) )
hbox.add_child(gradient_edit) 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)
elif u_name.begins_with("curve_"): elif u_name.begins_with("curve_"):
var curve_edit := CurveEdit.new() _create_curve_texture_ui(params, u_name, hbox, value_changed)
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_"): elif u_name.begins_with("noise_"):
var noise_generator_dialog := NOISE_GENERATOR.instantiate() as AcceptDialog _create_noise_texture_ui(params, u_name, hbox, value_changed, parent_node)
noise_generator_dialog.always_on_top = true else: # Simple texture
var noise_generator := noise_generator_dialog.get_child(0) as NoiseGenerator _create_simple_texture_ui(
if params.has(u_name) and params[u_name] is NoiseTexture2D: params, u_name, hbox, value_changed, parent_node, file_selected
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) parent_node.add_child(hbox)
elif u_type == "bool": elif u_type == "bool":
@ -408,6 +364,106 @@ static func _mat3str_to_basis(mat3: String) -> Basis:
return 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: static func _shader_change_palette(value_changed: Callable, parameter_name: String) -> void:
var palette := Palettes.current_palette var palette := Palettes.current_palette
_shader_update_palette_texture(palette, value_changed, parameter_name) _shader_update_palette_texture(palette, value_changed, parameter_name)

View file

@ -169,6 +169,13 @@ func get_gradient_color(x: float) -> Color:
return gradient.sample(x / x_offset) 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: func set_gradient_texture(new_texture: GradientTexture2D) -> void:
$TextureRect.texture = new_texture $TextureRect.texture = new_texture
texture = new_texture texture = new_texture

View file

@ -11,131 +11,113 @@ var noise_texture: NoiseTexture2D:
if not is_instance_valid(preview): if not is_instance_valid(preview):
await ready await ready
preview.texture = noise_texture preview.texture = noise_texture
_set_node_values()
@onready var preview := %Preview as TextureRect @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: func _init() -> void:
noise_texture = NoiseTexture2D.new() 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: func _on_size_slider_value_changed(value: Vector2) -> void:
noise_texture.width = value.x noise_texture.width = value.x
noise_texture.height = value.y noise_texture.height = value.y
value_changed.emit(noise_texture) await noise_texture.changed
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) value_changed.emit(noise_texture)

View file

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