mirror of
https://github.com/Relintai/material-maker.git
synced 2024-11-13 06:27:18 +01:00
Merge pull request #51 from Calinou/remove-trailing-whitespace
Remove trailing whitespace, add newlines at end of files
This commit is contained in:
commit
95d0d2860a
@ -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/).
|
More details in the [user manual](https://rodzill4.github.io/godot-procedural-textures/doc/).
|
||||||
|
|
||||||
![Screenshot](addons/material_maker/doc/images/screenshot.png)
|
![Screenshot](addons/material_maker/doc/images/screenshot.png)
|
||||||
|
|
||||||
|
@ -17,4 +17,4 @@ help:
|
|||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
%: Makefile
|
%: Makefile
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
@ -154,4 +154,4 @@ texinfo_documents = [
|
|||||||
(master_doc, 'MaterialMaker', 'Material Maker Documentation',
|
(master_doc, 'MaterialMaker', 'Material Maker Documentation',
|
||||||
author, 'MaterialMaker', 'One line description of project.',
|
author, 'MaterialMaker', 'One line description of project.',
|
||||||
'Miscellaneous'),
|
'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
@ -8,7 +8,7 @@ Welcome to Material Maker's documentation!
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
intro
|
intro
|
||||||
user_interface
|
user_interface
|
||||||
nodes
|
nodes
|
||||||
|
@ -20,4 +20,3 @@ as the image generator and convolution filters (blur, emboss, normal map generat
|
|||||||
the resolution of their output.
|
the resolution of their output.
|
||||||
|
|
||||||
.. image:: images/screenshot.png
|
.. image:: images/screenshot.png
|
||||||
|
|
||||||
|
@ -37,4 +37,4 @@ The blend node has two parameters:
|
|||||||
Notes
|
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.
|
||||||
|
@ -20,7 +20,7 @@ Parameters
|
|||||||
|
|
||||||
The blur node has three 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.
|
* The direction specifies if the blur algorithm is applied horizontally, vertically or both.
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ The blur node has three parameters:
|
|||||||
Notes
|
Notes
|
||||||
+++++
|
+++++
|
||||||
|
|
||||||
This node outputs an image that has a fixed size.
|
This node outputs an image that has a fixed size.
|
||||||
|
@ -27,4 +27,4 @@ The colorize node has a single parameter that defines the gradient to be applied
|
|||||||
Notes
|
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.
|
||||||
|
@ -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.
|
it. Simply double-click on the contents to edit it.
|
||||||
|
|
||||||
.. image:: images/node_comment.png
|
.. image:: images/node_comment.png
|
||||||
|
|
||||||
|
@ -13,4 +13,4 @@ The decompose node has a single color input.
|
|||||||
Outputs
|
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.
|
||||||
|
@ -21,4 +21,3 @@ Parameters
|
|||||||
|
|
||||||
The Export node has a single parameter that defines the suffix PNG file
|
The Export node has a single parameter that defines the suffix PNG file
|
||||||
that will be created.
|
that will be created.
|
||||||
|
|
||||||
|
@ -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 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.
|
* The value of the depth property of the material. The input depth map is multiplied by this value.
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@ The Pattern node accepts the following parameters:
|
|||||||
* the *X* and *Y* parameters define the pattern and their number of repetitions
|
* the *X* and *Y* parameters define the pattern and their number of repetitions
|
||||||
that will be propagated along the X axis and Y.
|
that will be propagated along the X axis and Y.
|
||||||
The following patterns are available:
|
The following patterns are available:
|
||||||
|
|
||||||
* Sine: the value follows a sinus waveform
|
* 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)
|
* 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)
|
* 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)
|
* Sawtooth: the value follows a sawtooth waveform (changes linearly from 0 to 1, then jumps back to 0)
|
||||||
|
@ -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
|
The drop-down list can be used to select a configuration, create new ones and
|
||||||
update or delete the current configuration.
|
update or delete the current configuration.
|
||||||
|
|
||||||
|
@ -23,4 +23,3 @@ Parameters
|
|||||||
The Switch node has a single parameter whose value can be 1 or 2.
|
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 1, A forwards A1 and B forwards B1.
|
||||||
When the parameter is set to 2, A forwards A2 and B forwards B2.
|
When the parameter is set to 2, A forwards A2 and B forwards B2.
|
||||||
|
|
||||||
|
@ -14,4 +14,4 @@ The generator nodes are nodes that do not accept any input and generate one or s
|
|||||||
node_emboss
|
node_emboss
|
||||||
node_normal_map
|
node_normal_map
|
||||||
node_transform
|
node_transform
|
||||||
node_warp
|
node_warp
|
||||||
|
@ -11,4 +11,4 @@ The generator nodes are nodes that do not accept any input and generate one or s
|
|||||||
node_bricks
|
node_bricks
|
||||||
node_noise
|
node_noise
|
||||||
node_perlin
|
node_perlin
|
||||||
node_voronoi
|
node_voronoi
|
||||||
|
@ -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
|
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
|
tab contains an empty material (about material that only consists of a Material node), the
|
||||||
material will be loaded into this tab.
|
material will be loaded into this tab.
|
||||||
|
|
||||||
* *Save material* saves the current material. If it was not previously saved, a file dialog
|
* *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.
|
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.
|
do not hesitate to use it to suggest improvements for Material Maker.
|
||||||
|
|
||||||
* *About* Shows the about dialog.
|
* *About* Shows the about dialog.
|
||||||
|
|
||||||
|
|
||||||
|
@ -229,4 +229,3 @@ func deserialize(data : Dictionary) -> void:
|
|||||||
else:
|
else:
|
||||||
seed_locked = false
|
seed_locked = false
|
||||||
_post_load()
|
_post_load()
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ func swap_ports(i1 : int, i2 : int) -> void:
|
|||||||
input_gen.get_parent().reconnect_inputs(input_gen, port_reconnects)
|
input_gen.get_parent().reconnect_inputs(input_gen, port_reconnects)
|
||||||
output_gen.get_parent().reconnect_outputs(output_gen, port_reconnects)
|
output_gen.get_parent().reconnect_outputs(output_gen, port_reconnects)
|
||||||
emit_signal("parameter_changed", "__update_all__", null)
|
emit_signal("parameter_changed", "__update_all__", null)
|
||||||
|
|
||||||
func source_changed(input_index : int) -> void:
|
func source_changed(input_index : int) -> void:
|
||||||
if name == "gen_outputs":
|
if name == "gen_outputs":
|
||||||
if get_parent() != null:
|
if get_parent() != null:
|
||||||
|
@ -163,6 +163,7 @@ func update_spatial_material(m, file_prefix = null) -> void:
|
|||||||
if m is SpatialMaterial:
|
if m is SpatialMaterial:
|
||||||
# Make the material double-sided for better visiblity in the preview
|
# Make the material double-sided for better visiblity in the preview
|
||||||
m.params_cull_mode = SpatialMaterial.CULL_DISABLED
|
m.params_cull_mode = SpatialMaterial.CULL_DISABLED
|
||||||
|
# Albedo
|
||||||
m.albedo_color = parameters.albedo_color
|
m.albedo_color = parameters.albedo_color
|
||||||
m.albedo_texture = get_generated_texture("albedo", file_prefix)
|
m.albedo_texture = get_generated_texture("albedo", file_prefix)
|
||||||
m.metallic = parameters.metallic
|
m.metallic = parameters.metallic
|
||||||
|
@ -27,4 +27,4 @@ func _get_shader_code_lod(uv : String, output_index : int, context : MMGenContex
|
|||||||
return rv
|
return rv
|
||||||
|
|
||||||
func _get_shader_code(uv : String, output_index : int, context : MMGenContext) -> Dictionary:
|
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)
|
||||||
|
@ -25,14 +25,14 @@ const MENU = [
|
|||||||
{ menu="File" },
|
{ menu="File" },
|
||||||
{ menu="File", command="close_material", description="Close material" },
|
{ menu="File", command="close_material", description="Close material" },
|
||||||
{ menu="File", command="quit", shortcut="Control+Q", description="Quit" },
|
{ menu="File", command="quit", shortcut="Control+Q", description="Quit" },
|
||||||
|
|
||||||
{ menu="Edit", command="edit_cut", shortcut="Control+X", description="Cut" },
|
{ menu="Edit", command="edit_cut", shortcut="Control+X", description="Cut" },
|
||||||
{ menu="Edit", command="edit_copy", shortcut="Control+C", description="Copy" },
|
{ menu="Edit", command="edit_copy", shortcut="Control+C", description="Copy" },
|
||||||
{ menu="Edit", command="edit_paste", shortcut="Control+V", description="Paste" },
|
{ menu="Edit", command="edit_paste", shortcut="Control+V", description="Paste" },
|
||||||
|
|
||||||
{ menu="View", command="view_center", shortcut="C", description="Center view" },
|
{ menu="View", command="view_center", shortcut="C", description="Center view" },
|
||||||
{ menu="View", command="view_reset_zoom", shortcut="Control+0", description="Reset zoom" },
|
{ menu="View", command="view_reset_zoom", shortcut="Control+0", description="Reset zoom" },
|
||||||
|
|
||||||
{ menu="Tools", submenu="create", description="Create" },
|
{ menu="Tools", submenu="create", description="Create" },
|
||||||
{ menu="Tools", command="create_subgraph", shortcut="Control+G", description="Create group" },
|
{ 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", command="make_selected_nodes_editable", shortcut="Control+E", description="Make selected nodes editable" },
|
||||||
|
@ -27,4 +27,3 @@ func _on_TextEdit_focus_exited() -> void:
|
|||||||
generator.text = editor.text
|
generator.text = editor.text
|
||||||
label.visible = true
|
label.visible = true
|
||||||
editor.visible = false
|
editor.visible = false
|
||||||
|
|
||||||
|
@ -2,4 +2,4 @@ extends Popup
|
|||||||
|
|
||||||
func show_code(text : String) -> void:
|
func show_code(text : String) -> void:
|
||||||
$TextEdit.text = text
|
$TextEdit.text = text
|
||||||
popup_centered()
|
popup_centered()
|
||||||
|
@ -38,4 +38,4 @@ func update_node() -> void:
|
|||||||
add_button.connect("pressed", generator, "add_port")
|
add_button.connect("pressed", generator, "add_port")
|
||||||
set_slot(get_child_count()-1, false, 0, color, false, 0, color)
|
set_slot(get_child_count()-1, false, 0, color, false, 0, color)
|
||||||
update_up_down_buttons()
|
update_up_down_buttons()
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ class_name MMGradientEditor
|
|||||||
|
|
||||||
class GradientCursor:
|
class GradientCursor:
|
||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
var color : Color
|
var color : Color
|
||||||
|
|
||||||
const WIDTH : int = 10
|
const WIDTH : int = 10
|
||||||
@ -12,7 +12,7 @@ class GradientCursor:
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
rect_position = Vector2(0, 15)
|
rect_position = Vector2(0, 15)
|
||||||
rect_size = Vector2(WIDTH, 15)
|
rect_size = Vector2(WIDTH, 15)
|
||||||
|
|
||||||
func _draw() -> void:
|
func _draw() -> void:
|
||||||
var polygon : PoolVector2Array = PoolVector2Array([Vector2(0, 5), Vector2(WIDTH/2, 0), Vector2(WIDTH, 5), Vector2(WIDTH, 15), Vector2(0, 15)])
|
var polygon : PoolVector2Array = PoolVector2Array([Vector2(0, 5), Vector2(WIDTH/2, 0), Vector2(WIDTH, 5), Vector2(WIDTH, 15), Vector2(0, 15)])
|
||||||
var c = color
|
var c = color
|
||||||
|
@ -183,5 +183,3 @@ caret_blink = false
|
|||||||
caret_blink_speed = 0.65
|
caret_blink_speed = 0.65
|
||||||
caret_moving_by_right_click = true
|
caret_moving_by_right_click = true
|
||||||
_sections_unfolded = [ "Size Flags" ]
|
_sections_unfolded = [ "Size Flags" ]
|
||||||
|
|
||||||
|
|
||||||
|
@ -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/OK" to="." method="_on_OK_pressed"]
|
||||||
|
|
||||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="queue_free"]
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="queue_free"]
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,4 +56,3 @@ func _on_Type_item_selected(ID) -> void:
|
|||||||
t.visible = true
|
t.visible = true
|
||||||
else:
|
else:
|
||||||
print(ID)
|
print(ID)
|
||||||
|
|
||||||
|
@ -44,5 +44,3 @@ align = 1
|
|||||||
color = Color( 1, 1, 1, 1 )
|
color = Color( 1, 1, 1, 1 )
|
||||||
edit_alpha = true
|
edit_alpha = true
|
||||||
_sections_unfolded = [ "Rect" ]
|
_sections_unfolded = [ "Rect" ]
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,5 +45,3 @@ items = [ ]
|
|||||||
selected = -1
|
selected = -1
|
||||||
|
|
||||||
[connection signal="item_selected" from="EnumValues" to="." method="_on_EnumValues_item_selected"]
|
[connection signal="item_selected" from="EnumValues" to="." method="_on_EnumValues_item_selected"]
|
||||||
|
|
||||||
|
|
||||||
|
@ -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/OK" to="." method="_on_OK_pressed"]
|
||||||
|
|
||||||
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="queue_free"]
|
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="queue_free"]
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user