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.
This commit is contained in:
Hugo Locurcio 2019-11-10 01:19:52 +01:00
parent d37fc835f9
commit fc3173b9b4
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
33 changed files with 25 additions and 47 deletions

View File

@ -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)

View File

@ -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)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View File

@ -154,4 +154,4 @@ texinfo_documents = [
(master_doc, 'MaterialMaker', 'Material Maker Documentation',
author, 'MaterialMaker', 'One line description of project.',
'Miscellaneous'),
]
]

View File

@ -8,7 +8,7 @@ Welcome to Material Maker's documentation!
.. toctree::
:maxdepth: 2
intro
user_interface
nodes

View File

@ -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

View File

@ -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.
The *opacity* input will be considered (and implicitly converted to) greyscale if it is a color texture.

View File

@ -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.
This node outputs an image that has a fixed size.

View File

@ -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.
The input will be considered (and implicitly converted to) greyscale if it is a color texture.

View File

@ -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

View File

@ -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.
The decompose node outputs 3 greyscale images, one for each (red, green and blue) channel.

View File

@ -21,4 +21,3 @@ Parameters
The Export node has a single parameter that defines the suffix PNG file
that will be created.

View File

@ -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.

View File

@ -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)

View File

@ -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.

View File

@ -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.

View File

@ -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
node_warp

View File

@ -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
node_voronoi

View File

@ -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.

View File

@ -229,4 +229,3 @@ func deserialize(data : Dictionary) -> void:
else:
seed_locked = false
_post_load()

View File

@ -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:

View File

@ -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

View File

@ -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)
return _get_shader_code_lod(uv, output_index, context)

View File

@ -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" },

View File

@ -27,4 +27,3 @@ func _on_TextEdit_focus_exited() -> void:
generator.text = editor.text
label.visible = true
editor.visible = false

View File

@ -2,4 +2,4 @@ extends Popup
func show_code(text : String) -> void:
$TextEdit.text = text
popup_centered()
popup_centered()

View File

@ -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()

View File

@ -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

View File

@ -183,5 +183,3 @@ caret_blink = false
caret_blink_speed = 0.65
caret_moving_by_right_click = true
_sections_unfolded = [ "Size Flags" ]

View File

@ -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"]

View File

@ -56,4 +56,3 @@ func _on_Type_item_selected(ID) -> void:
t.visible = true
else:
print(ID)

View File

@ -44,5 +44,3 @@ align = 1
color = Color( 1, 1, 1, 1 )
edit_alpha = true
_sections_unfolded = [ "Rect" ]

View File

@ -45,5 +45,3 @@ items = [ ]
selected = -1
[connection signal="item_selected" from="EnumValues" to="." method="_on_EnumValues_item_selected"]

View File

@ -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"]