From fc3173b9b435ee8c1bfefca0dd7c8618dcd8f57d Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 10 Nov 2019 01:19:52 +0100 Subject: [PATCH] Remove trailing whitespace, add newlines at end of files This results in less merge conflicts when using the Text Editor > Files > Trim Trailing Whitespace editor setting. .ptex, .mmg and .json files generated weren't modified as these are saved by Material Maker. These files could be made to end with a newline automatically on save in a future commit. --- README.md | 1 - addons/material_maker/doc/Makefile | 2 +- addons/material_maker/doc/conf.py | 2 +- addons/material_maker/doc/index.rst | 2 +- addons/material_maker/doc/intro.rst | 1 - addons/material_maker/doc/node_blend.rst | 2 +- addons/material_maker/doc/node_blur.rst | 4 ++-- addons/material_maker/doc/node_colorize.rst | 2 +- addons/material_maker/doc/node_comment.rst | 1 - addons/material_maker/doc/node_decompose.rst | 2 +- addons/material_maker/doc/node_export.rst | 1 - addons/material_maker/doc/node_material.rst | 1 - addons/material_maker/doc/node_pattern.rst | 6 +++--- addons/material_maker/doc/node_remote.rst | 1 - addons/material_maker/doc/node_switch.rst | 1 - addons/material_maker/doc/nodes_filters.rst | 2 +- addons/material_maker/doc/nodes_generators.rst | 2 +- addons/material_maker/doc/user_interface.rst | 4 +--- addons/material_maker/engine/gen_base.gd | 1 - addons/material_maker/engine/gen_ios.gd | 2 +- addons/material_maker/engine/gen_material.gd | 2 +- addons/material_maker/engine/gen_texture.gd | 2 +- addons/material_maker/main_window.gd | 8 ++++---- addons/material_maker/nodes/comment.gd | 1 - addons/material_maker/nodes/debug/debug_popup.gd | 2 +- addons/material_maker/nodes/ios.gd | 2 +- addons/material_maker/widgets/gradient_editor.gd | 4 ++-- addons/material_maker/widgets/node_editor.tscn | 2 -- .../material_maker/widgets/node_editor/enum_editor.tscn | 2 -- addons/material_maker/widgets/node_editor/parameter.gd | 1 - .../widgets/node_editor/parameter_color.tscn | 2 -- .../widgets/node_editor/parameter_enum.tscn | 2 -- addons/material_maker/widgets/text_dialog.tscn | 2 -- 33 files changed, 25 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 4dd1049..eb918a4 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,3 @@ Its user interface is based on Godot's GraphEditor: textures are described as in More details in the [user manual](https://rodzill4.github.io/godot-procedural-textures/doc/). ![Screenshot](addons/material_maker/doc/images/screenshot.png) - diff --git a/addons/material_maker/doc/Makefile b/addons/material_maker/doc/Makefile index b6bd2b2..34ad496 100644 --- a/addons/material_maker/doc/Makefile +++ b/addons/material_maker/doc/Makefile @@ -17,4 +17,4 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/addons/material_maker/doc/conf.py b/addons/material_maker/doc/conf.py index df5e3f1..5cd693c 100644 --- a/addons/material_maker/doc/conf.py +++ b/addons/material_maker/doc/conf.py @@ -154,4 +154,4 @@ texinfo_documents = [ (master_doc, 'MaterialMaker', 'Material Maker Documentation', author, 'MaterialMaker', 'One line description of project.', 'Miscellaneous'), -] \ No newline at end of file +] diff --git a/addons/material_maker/doc/index.rst b/addons/material_maker/doc/index.rst index 6a4b4e0..f6071fa 100644 --- a/addons/material_maker/doc/index.rst +++ b/addons/material_maker/doc/index.rst @@ -8,7 +8,7 @@ Welcome to Material Maker's documentation! .. toctree:: :maxdepth: 2 - + intro user_interface nodes diff --git a/addons/material_maker/doc/intro.rst b/addons/material_maker/doc/intro.rst index 5d14ab3..8a2a7f0 100644 --- a/addons/material_maker/doc/intro.rst +++ b/addons/material_maker/doc/intro.rst @@ -20,4 +20,3 @@ as the image generator and convolution filters (blur, emboss, normal map generat the resolution of their output. .. image:: images/screenshot.png - diff --git a/addons/material_maker/doc/node_blend.rst b/addons/material_maker/doc/node_blend.rst index 5c6efdb..0fd7a3d 100644 --- a/addons/material_maker/doc/node_blend.rst +++ b/addons/material_maker/doc/node_blend.rst @@ -37,4 +37,4 @@ The blend node has two parameters: Notes +++++ -The *opacity* input will be considered (and implicitly converted to) greyscale if it is a color texture. \ No newline at end of file +The *opacity* input will be considered (and implicitly converted to) greyscale if it is a color texture. diff --git a/addons/material_maker/doc/node_blur.rst b/addons/material_maker/doc/node_blur.rst index ddcf1e9..4f5196b 100644 --- a/addons/material_maker/doc/node_blur.rst +++ b/addons/material_maker/doc/node_blur.rst @@ -20,7 +20,7 @@ Parameters The blur node has three parameters: -* The grid size defines the size of the output image. +* The grid size defines the size of the output image. * The direction specifies if the blur algorithm is applied horizontally, vertically or both. @@ -29,4 +29,4 @@ The blur node has three parameters: Notes +++++ -This node outputs an image that has a fixed size. \ No newline at end of file +This node outputs an image that has a fixed size. diff --git a/addons/material_maker/doc/node_colorize.rst b/addons/material_maker/doc/node_colorize.rst index bb41005..4f584d7 100644 --- a/addons/material_maker/doc/node_colorize.rst +++ b/addons/material_maker/doc/node_colorize.rst @@ -27,4 +27,4 @@ The colorize node has a single parameter that defines the gradient to be applied Notes +++++ -The input will be considered (and implicitly converted to) greyscale if it is a color texture. \ No newline at end of file +The input will be considered (and implicitly converted to) greyscale if it is a color texture. diff --git a/addons/material_maker/doc/node_comment.rst b/addons/material_maker/doc/node_comment.rst index 6a37b6b..4f305f3 100644 --- a/addons/material_maker/doc/node_comment.rst +++ b/addons/material_maker/doc/node_comment.rst @@ -5,4 +5,3 @@ The Comment node has no effect on the material and can be used to document it. Simply double-click on the contents to edit it. .. image:: images/node_comment.png - diff --git a/addons/material_maker/doc/node_decompose.rst b/addons/material_maker/doc/node_decompose.rst index 486856a..2b3d20d 100644 --- a/addons/material_maker/doc/node_decompose.rst +++ b/addons/material_maker/doc/node_decompose.rst @@ -13,4 +13,4 @@ The decompose node has a single color input. Outputs +++++++ -The decompose node outputs 3 greyscale images, one for each (red, green and blue) channel. \ No newline at end of file +The decompose node outputs 3 greyscale images, one for each (red, green and blue) channel. diff --git a/addons/material_maker/doc/node_export.rst b/addons/material_maker/doc/node_export.rst index 414a26f..da3a956 100644 --- a/addons/material_maker/doc/node_export.rst +++ b/addons/material_maker/doc/node_export.rst @@ -21,4 +21,3 @@ Parameters The Export node has a single parameter that defines the suffix PNG file that will be created. - diff --git a/addons/material_maker/doc/node_material.rst b/addons/material_maker/doc/node_material.rst index a6c044f..11621c3 100644 --- a/addons/material_maker/doc/node_material.rst +++ b/addons/material_maker/doc/node_material.rst @@ -49,4 +49,3 @@ The Material node has parameters: * The value of the ambient occlusion property of the material. The texture used for the ambient occlusion input is multiplied by this value. * The value of the depth property of the material. The input depth map is multiplied by this value. - diff --git a/addons/material_maker/doc/node_pattern.rst b/addons/material_maker/doc/node_pattern.rst index 5c9619c..904c792 100644 --- a/addons/material_maker/doc/node_pattern.rst +++ b/addons/material_maker/doc/node_pattern.rst @@ -27,11 +27,11 @@ The Pattern node accepts the following parameters: * the *X* and *Y* parameters define the pattern and their number of repetitions that will be propagated along the X axis and Y. The following patterns are available: - + * Sine: the value follows a sinus waveform - + * Triangle: the value follows a triangle waveform (changes linearly from 0 to 1 and from 1 to 0) - + * Square: the value follows a square waveform (stays constant at 0, then 1) * Sawtooth: the value follows a sawtooth waveform (changes linearly from 0 to 1, then jumps back to 0) diff --git a/addons/material_maker/doc/node_remote.rst b/addons/material_maker/doc/node_remote.rst index 4b57b81..ba54b1c 100644 --- a/addons/material_maker/doc/node_remote.rst +++ b/addons/material_maker/doc/node_remote.rst @@ -49,4 +49,3 @@ name for this configuration, and it will be added to the list. The drop-down list can be used to select a configuration, create new ones and update or delete the current configuration. - diff --git a/addons/material_maker/doc/node_switch.rst b/addons/material_maker/doc/node_switch.rst index 93bcc63..a2da1c8 100644 --- a/addons/material_maker/doc/node_switch.rst +++ b/addons/material_maker/doc/node_switch.rst @@ -23,4 +23,3 @@ Parameters The Switch node has a single parameter whose value can be 1 or 2. When the parameter is set to 1, A forwards A1 and B forwards B1. When the parameter is set to 2, A forwards A2 and B forwards B2. - diff --git a/addons/material_maker/doc/nodes_filters.rst b/addons/material_maker/doc/nodes_filters.rst index 0199643..7cfc9be 100644 --- a/addons/material_maker/doc/nodes_filters.rst +++ b/addons/material_maker/doc/nodes_filters.rst @@ -14,4 +14,4 @@ The generator nodes are nodes that do not accept any input and generate one or s node_emboss node_normal_map node_transform - node_warp \ No newline at end of file + node_warp diff --git a/addons/material_maker/doc/nodes_generators.rst b/addons/material_maker/doc/nodes_generators.rst index 22e51a8..bbb3b8d 100644 --- a/addons/material_maker/doc/nodes_generators.rst +++ b/addons/material_maker/doc/nodes_generators.rst @@ -11,4 +11,4 @@ The generator nodes are nodes that do not accept any input and generate one or s node_bricks node_noise node_perlin - node_voronoi \ No newline at end of file + node_voronoi diff --git a/addons/material_maker/doc/user_interface.rst b/addons/material_maker/doc/user_interface.rst index 604dcb9..346e3b6 100644 --- a/addons/material_maker/doc/user_interface.rst +++ b/addons/material_maker/doc/user_interface.rst @@ -66,7 +66,7 @@ File menu a material file is selected, it will be open in a new tab in the right pane. If the current tab contains an empty material (about material that only consists of a Material node), the material will be loaded into this tab. - + * *Save material* saves the current material. If it was not previously saved, a file dialog will be displayed to select a location and file name. @@ -111,5 +111,3 @@ Help menu do not hesitate to use it to suggest improvements for Material Maker. * *About* Shows the about dialog. - - diff --git a/addons/material_maker/engine/gen_base.gd b/addons/material_maker/engine/gen_base.gd index ac077d6..5798d52 100644 --- a/addons/material_maker/engine/gen_base.gd +++ b/addons/material_maker/engine/gen_base.gd @@ -229,4 +229,3 @@ func deserialize(data : Dictionary) -> void: else: seed_locked = false _post_load() - diff --git a/addons/material_maker/engine/gen_ios.gd b/addons/material_maker/engine/gen_ios.gd index 4f9f1e6..4222bff 100644 --- a/addons/material_maker/engine/gen_ios.gd +++ b/addons/material_maker/engine/gen_ios.gd @@ -76,7 +76,7 @@ func swap_ports(i1 : int, i2 : int) -> void: input_gen.get_parent().reconnect_inputs(input_gen, port_reconnects) output_gen.get_parent().reconnect_outputs(output_gen, port_reconnects) emit_signal("parameter_changed", "__update_all__", null) - + func source_changed(input_index : int) -> void: if name == "gen_outputs": if get_parent() != null: diff --git a/addons/material_maker/engine/gen_material.gd b/addons/material_maker/engine/gen_material.gd index bd59ae1..ddb38c2 100644 --- a/addons/material_maker/engine/gen_material.gd +++ b/addons/material_maker/engine/gen_material.gd @@ -162,7 +162,7 @@ func update_spatial_material(m, file_prefix = null) -> void: if m is SpatialMaterial: # Make the material double-sided for better visiblity in the preview m.params_cull_mode = SpatialMaterial.CULL_DISABLED - + m.albedo_color = parameters.albedo_color m.albedo_texture = get_generated_texture("albedo", file_prefix) m.metallic = parameters.metallic diff --git a/addons/material_maker/engine/gen_texture.gd b/addons/material_maker/engine/gen_texture.gd index 0803ad2..0b90b33 100644 --- a/addons/material_maker/engine/gen_texture.gd +++ b/addons/material_maker/engine/gen_texture.gd @@ -27,4 +27,4 @@ func _get_shader_code_lod(uv : String, output_index : int, context : MMGenContex return rv func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary: - return _get_shader_code_lod(uv, output_index, context) \ No newline at end of file + return _get_shader_code_lod(uv, output_index, context) diff --git a/addons/material_maker/main_window.gd b/addons/material_maker/main_window.gd index bfac63f..3271a3c 100644 --- a/addons/material_maker/main_window.gd +++ b/addons/material_maker/main_window.gd @@ -25,21 +25,21 @@ const MENU = [ { menu="File" }, { menu="File", command="close_material", description="Close material" }, { menu="File", command="quit", shortcut="Control+Q", description="Quit" }, - + { menu="Edit", command="edit_cut", shortcut="Control+X", description="Cut" }, { menu="Edit", command="edit_copy", shortcut="Control+C", description="Copy" }, { menu="Edit", command="edit_paste", shortcut="Control+V", description="Paste" }, - + { menu="View", command="view_center", shortcut="C", description="Center view" }, { menu="View", command="view_reset_zoom", shortcut="Control+0", description="Reset zoom" }, - + { menu="Tools", submenu="create", description="Create" }, { menu="Tools", command="create_subgraph", shortcut="Control+G", description="Create group" }, { menu="Tools", command="make_selected_nodes_editable", shortcut="Control+E", description="Make selected nodes editable" }, { menu="Tools" }, { menu="Tools", command="add_to_user_library", description="Add selected node to user library" }, { menu="Tools", command="export_library", description="Export the nodes library" }, - + { menu="Help", command="show_doc", description="User manual" }, { menu="Help", command="bug_report", description="Report a bug" }, { menu="Help" }, diff --git a/addons/material_maker/nodes/comment.gd b/addons/material_maker/nodes/comment.gd index a321467..e1d4d6a 100644 --- a/addons/material_maker/nodes/comment.gd +++ b/addons/material_maker/nodes/comment.gd @@ -27,4 +27,3 @@ func _on_TextEdit_focus_exited() -> void: generator.text = editor.text label.visible = true editor.visible = false - diff --git a/addons/material_maker/nodes/debug/debug_popup.gd b/addons/material_maker/nodes/debug/debug_popup.gd index 82447eb..046e3ec 100644 --- a/addons/material_maker/nodes/debug/debug_popup.gd +++ b/addons/material_maker/nodes/debug/debug_popup.gd @@ -2,4 +2,4 @@ extends Popup func show_code(text : String) -> void: $TextEdit.text = text - popup_centered() \ No newline at end of file + popup_centered() diff --git a/addons/material_maker/nodes/ios.gd b/addons/material_maker/nodes/ios.gd index e567a37..99ee5cb 100644 --- a/addons/material_maker/nodes/ios.gd +++ b/addons/material_maker/nodes/ios.gd @@ -38,4 +38,4 @@ func update_node() -> void: add_button.connect("pressed", generator, "add_port") set_slot(get_child_count()-1, false, 0, color, false, 0, color) update_up_down_buttons() - + diff --git a/addons/material_maker/widgets/gradient_editor.gd b/addons/material_maker/widgets/gradient_editor.gd index 1dafe06..bfea271 100644 --- a/addons/material_maker/widgets/gradient_editor.gd +++ b/addons/material_maker/widgets/gradient_editor.gd @@ -4,7 +4,7 @@ class_name MMGradientEditor class GradientCursor: extends Control - + var color : Color const WIDTH : int = 10 @@ -12,7 +12,7 @@ class GradientCursor: func _ready() -> void: rect_position = Vector2(0, 15) rect_size = Vector2(WIDTH, 15) - + func _draw() -> void: var polygon : PoolVector2Array = PoolVector2Array([Vector2(0, 5), Vector2(WIDTH/2, 0), Vector2(WIDTH, 5), Vector2(WIDTH, 15), Vector2(0, 15)]) var c = color diff --git a/addons/material_maker/widgets/node_editor.tscn b/addons/material_maker/widgets/node_editor.tscn index c54ec64..85507cf 100644 --- a/addons/material_maker/widgets/node_editor.tscn +++ b/addons/material_maker/widgets/node_editor.tscn @@ -183,5 +183,3 @@ caret_blink = false caret_blink_speed = 0.65 caret_moving_by_right_click = true _sections_unfolded = [ "Size Flags" ] - - diff --git a/addons/material_maker/widgets/node_editor/enum_editor.tscn b/addons/material_maker/widgets/node_editor/enum_editor.tscn index 615c370..efc844f 100644 --- a/addons/material_maker/widgets/node_editor/enum_editor.tscn +++ b/addons/material_maker/widgets/node_editor/enum_editor.tscn @@ -216,5 +216,3 @@ _sections_unfolded = [ "Rect" ] [connection signal="pressed" from="VBoxContainer/HBoxContainer/OK" to="." method="_on_OK_pressed"] [connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="queue_free"] - - diff --git a/addons/material_maker/widgets/node_editor/parameter.gd b/addons/material_maker/widgets/node_editor/parameter.gd index f6aab20..19e45db 100644 --- a/addons/material_maker/widgets/node_editor/parameter.gd +++ b/addons/material_maker/widgets/node_editor/parameter.gd @@ -56,4 +56,3 @@ func _on_Type_item_selected(ID) -> void: t.visible = true else: print(ID) - diff --git a/addons/material_maker/widgets/node_editor/parameter_color.tscn b/addons/material_maker/widgets/node_editor/parameter_color.tscn index fa59424..d843c4b 100644 --- a/addons/material_maker/widgets/node_editor/parameter_color.tscn +++ b/addons/material_maker/widgets/node_editor/parameter_color.tscn @@ -44,5 +44,3 @@ align = 1 color = Color( 1, 1, 1, 1 ) edit_alpha = true _sections_unfolded = [ "Rect" ] - - diff --git a/addons/material_maker/widgets/node_editor/parameter_enum.tscn b/addons/material_maker/widgets/node_editor/parameter_enum.tscn index a01748b..f5faee2 100644 --- a/addons/material_maker/widgets/node_editor/parameter_enum.tscn +++ b/addons/material_maker/widgets/node_editor/parameter_enum.tscn @@ -45,5 +45,3 @@ items = [ ] selected = -1 [connection signal="item_selected" from="EnumValues" to="." method="_on_EnumValues_item_selected"] - - diff --git a/addons/material_maker/widgets/text_dialog.tscn b/addons/material_maker/widgets/text_dialog.tscn index 3e4d070..ed7080c 100644 --- a/addons/material_maker/widgets/text_dialog.tscn +++ b/addons/material_maker/widgets/text_dialog.tscn @@ -143,5 +143,3 @@ _sections_unfolded = [ "Rect" ] [connection signal="pressed" from="VBoxContainer/HBoxContainer/OK" to="." method="_on_OK_pressed"] [connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="queue_free"] - -