Updated the engine. Now MMMaterial, MMNode, and MMNodeUniversalProperty is on the engine side. The resources still need to be updated (except for one).

This commit is contained in:
Relintai 2022-06-07 12:38:35 +02:00
parent c8cfc8a929
commit f9e062e867
102 changed files with 867 additions and 1022 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "c4864a0e5f73a375259503ea1485794a6aad6df7"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "65485930a20f65844d496b4ba47dec5b6ed70b91"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "983090d21a08ebed30a5ce06681269819ab12e48"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "terraman": {"master": "c72d8fc03295588fc18c5168ce351bd0c321ec5f"}, "pandemonium_engine": {"master": "df9099e0edaccc247899a69c125cbcda671b9145"}}
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "c4864a0e5f73a375259503ea1485794a6aad6df7"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "65485930a20f65844d496b4ba47dec5b6ed70b91"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "983090d21a08ebed30a5ce06681269819ab12e48"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "terraman": {"master": "c72d8fc03295588fc18c5168ce351bd0c321ec5f"}, "pandemonium_engine": {"master": "0abb68c016ed33960ce31f27bd3fe89a2cbd0bed"}}

View File

@ -8,7 +8,7 @@ export(NodePath) var add_popup_path : NodePath = "Popups/AddPopup"
var _graph_edit : GraphEdit = null
var _material : MMMateial
var _material : MMMaterial
var _ignore_material_change_event : int = 0
var _recreation_in_progress : bool = false
@ -29,28 +29,28 @@ func ensure_objs() -> void:
if !_graph_edit:
_graph_edit = get_node(graph_edit_path)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_INT, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR3, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_COLOR, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_IMAGE, MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_INT, MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_FLOAT, MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_VECTOR2, MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_VECTOR3, MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_COLOR, MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_INT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR3)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_COLOR)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SLOT_TYPE_IMAGE)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SLOT_TYPE_INT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SLOT_TYPE_FLOAT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SLOT_TYPE_VECTOR2)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SLOT_TYPE_VECTOR3)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SLOT_TYPE_COLOR)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL, MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_INT, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_INT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR3, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR3)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_COLOR, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_COLOR)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_IMAGE, MMNodeUniversalProperty.SLOT_TYPE_IMAGE)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_INT, MMNodeUniversalProperty.SLOT_TYPE_INT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_FLOAT, MMNodeUniversalProperty.SLOT_TYPE_FLOAT)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_VECTOR2, MMNodeUniversalProperty.SLOT_TYPE_VECTOR2)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_VECTOR3, MMNodeUniversalProperty.SLOT_TYPE_VECTOR3)
_graph_edit.add_valid_connection_type(MMNodeUniversalProperty.SLOT_TYPE_COLOR, MMNodeUniversalProperty.SLOT_TYPE_COLOR)
_graph_edit.connect("connection_request", self, "on_graph_edit_connection_request")
_graph_edit.connect("disconnection_request", self, "on_graph_edit_disconnection_request")
@ -113,7 +113,7 @@ func find_graph_node_for(nnode) -> Node:
return null
func set_mmmaterial(object : MMMateial):
func set_mmmaterial(object : MMMaterial):
if _material:
_material.disconnect("changed", self, "on_material_changed")

View File

@ -5,7 +5,7 @@ var gradient_editor_scene : PackedScene = preload("res://addons/mat_maker_gd/wid
var polygon_edit_scene : PackedScene = preload("res://addons/mat_maker_gd/widgets/polygon_edit/polygon_edit.tscn")
var curve_edit_scene : PackedScene = preload("res://addons/mat_maker_gd/widgets/curve_edit/curve_edit.tscn")
var _material : MMMateial = null
var _material : MMMaterial = null
var _node : MMNode = null
var properties : Array = Array()
@ -33,7 +33,7 @@ func add_slot_texture(getter : String, setter : String) -> int:
t.expand = true
t.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, t)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, t)
t.texture = _node.call(getter, _material, slot_idx)
properties[slot_idx].append(t.texture)
@ -86,7 +86,7 @@ func add_slot_gradient() -> int:
ge.graph_node = self
ge.set_undo_redo(_undo_redo)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, "", "", ge)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, "", "", ge)
ge.set_value(_node)
#ge.texture = _node.call(getter, _material, slot_idx)
@ -97,7 +97,7 @@ func add_slot_gradient() -> int:
func add_slot_polygon() -> int:
var ge : Control = polygon_edit_scene.instance()
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, "", "", ge)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, "", "", ge)
ge.set_value(_node)
#ge.texture = _node.call(getter, _material, slot_idx)
@ -108,7 +108,7 @@ func add_slot_polygon() -> int:
func add_slot_curve() -> int:
var ge : Control = curve_edit_scene.instance()
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, "", "", ge)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, "", "", ge)
ge.set_value(_node)
#ge.texture = _node.call(getter, _material, slot_idx)
@ -119,7 +119,7 @@ func add_slot_curve() -> int:
func add_slot_color(getter : String, setter : String) -> int:
var cp : ColorPickerButton = ColorPickerButton.new()
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, cp)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, cp)
cp.color = _node.call(getter)
@ -145,7 +145,7 @@ func add_slot_label(getter : String, setter : String, slot_name : String) -> int
l.text = slot_name
return add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, l)
return add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, l)
func add_slot_line_edit(getter : String, setter : String, slot_name : String, placeholder : String = "") -> int:
var bc : VBoxContainer = VBoxContainer.new()
@ -158,7 +158,7 @@ func add_slot_line_edit(getter : String, setter : String, slot_name : String, pl
le.placeholder_text = placeholder
bc.add_child(le)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, bc)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, bc)
le.text = _node.call(getter)
@ -181,7 +181,7 @@ func add_slot_enum(getter : String, setter : String, slot_name : String, values
bc.add_child(mb)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, bc)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, bc)
mb.selected = _node.call(getter)
@ -202,7 +202,7 @@ func add_slot_int(getter : String, setter : String, slot_name : String, prange :
sb.max_value = prange.y
bc.add_child(sb)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, bc)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, bc)
sb.value = _node.call(getter)
@ -214,7 +214,7 @@ func add_slot_bool(getter : String, setter : String, slot_name : String) -> int:
var cb : CheckBox = CheckBox.new()
cb.text = slot_name
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, cb)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, cb)
cb.pressed = _node.call(getter)
@ -265,7 +265,7 @@ func add_slot_float(getter : String, setter : String, slot_name : String, step :
var sb : SpinBox = SpinBox.new()
bc.add_child(sb)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, bc)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, bc)
sb.rounded = false
sb.step = step
sb.min_value = prange.x
@ -312,7 +312,7 @@ func add_slot_vector2(getter : String, setter : String, slot_name : String, step
var sby : SpinBox = SpinBox.new()
bc.add_child(sby)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, bc)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, bc)
sbx.rounded = false
sby.rounded = false
sbx.step = step
@ -348,7 +348,7 @@ func add_slot_vector3(getter : String, setter : String, slot_name : String, step
var sbz : SpinBox = SpinBox.new()
bc.add_child(sbz)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_NONE, getter, setter, bc)
var slot_idx : int = add_slot(MMNodeUniversalProperty.SLOT_TYPE_NONE, MMNodeUniversalProperty.SLOT_TYPE_NONE, getter, setter, bc)
sbx.rounded = false
sby.rounded = false
sbz.rounded = false
@ -522,7 +522,7 @@ func get_output_property_graph_node_slot_index(property) -> int:
func get_property_control(slot_idx : int) -> Node:
return properties[slot_idx][5]
func set_node(material : MMMateial, node : MMNode) -> void:
func set_node(material : MMMaterial, node : MMNode) -> void:
_node = node
_material = material

View File

@ -1,10 +1,8 @@
[gd_resource type="Resource" load_steps=89 format=2]
[gd_resource type="MMMaterial" load_steps=91 format=2]
[ext_resource path="res://addons/mat_maker_gd/nodes/mm_material.gd" type="Script" id=1]
[ext_resource path="res://addons/mat_maker_gd/nodes/filter/adjust_hsv.gd" type="Script" id=2]
[ext_resource path="res://addons/mat_maker_gd/nodes/filter/colorize.gd" type="Script" id=1]
[ext_resource path="res://addons/mat_maker_gd/nodes/noise/voronoi.gd" type="Script" id=3]
[ext_resource path="res://addons/mat_maker_gd/nodes/filter/invert.gd" type="Script" id=4]
[ext_resource path="res://addons/mat_maker_gd/nodes/mm_node_universal_property.gd" type="Script" id=5]
[ext_resource path="res://addons/mat_maker_gd/nodes/filter/combine.gd" type="Script" id=6]
[ext_resource path="res://addons/mat_maker_gd/nodes/transform/scale.gd" type="Script" id=7]
[ext_resource path="res://addons/mat_maker_gd/nodes/transform/repeat.gd" type="Script" id=8]
@ -21,72 +19,26 @@
[ext_resource path="res://addons/mat_maker_gd/nodes/filter/math.gd" type="Script" id=19]
[ext_resource path="res://addons/mat_maker_gd/nodes/transform/color_tiler.gd" type="Script" id=20]
[sub_resource type="Resource" id=1]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=5]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=3]
script = ExtResource( 5 )
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
[sub_resource type="Resource" id=4]
script = ExtResource( 2 )
graph_position = Vector2( 140, 0 )
image = SubResource( 1 )
input = SubResource( 3 )
hue = 0.0
saturation = 1.0
value = 1.0
[sub_resource type="Resource" id=5]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=6]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=6]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=7]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=7]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=2]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=2]
script = ExtResource( 5 )
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
[sub_resource type="Resource" id=8]
script = ExtResource( 3 )
[sub_resource type="MMNode" id=8]
graph_position = Vector2( -160, 40 )
output_properties = [ SubResource( 7 ), SubResource( 5 ), SubResource( 2 ), SubResource( 6 ) ]
script = ExtResource( 3 )
out_nodes = SubResource( 7 )
out_borders = SubResource( 5 )
out_random_color = SubResource( 2 )
@ -96,305 +48,223 @@ stretch = Vector2( 2.13, 2.13 )
intensity = 1.07
randomness = 0.89
[sub_resource type="Resource" id=9]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=9]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=10]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=10]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input1 "
[sub_resource type="Resource" id=11]
script = ExtResource( 4 )
[sub_resource type="MMNode" id=11]
graph_position = Vector2( 380, 80 )
input_properties = [ SubResource( 10 ) ]
output_properties = [ SubResource( 9 ) ]
script = ExtResource( 4 )
image = SubResource( 9 )
input = SubResource( 10 )
[sub_resource type="Resource" id=12]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=12]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=13]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=13]
default_type = 1
default_int = 0
default_float = 1.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> A "
[sub_resource type="Resource" id=14]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=14]
default_type = 1
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> B "
input_property = SubResource( 7 )
[sub_resource type="Resource" id=15]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=15]
default_type = 1
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> G "
input_property = SubResource( 2 )
[sub_resource type="Resource" id=16]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=16]
default_type = 1
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> R "
input_property = SubResource( 5 )
[sub_resource type="Resource" id=17]
script = ExtResource( 6 )
[sub_resource type="MMNode" id=17]
graph_position = Vector2( 380, 380 )
input_properties = [ SubResource( 16 ), SubResource( 15 ), SubResource( 14 ), SubResource( 13 ) ]
output_properties = [ SubResource( 12 ) ]
script = ExtResource( 6 )
image = SubResource( 12 )
input_r = SubResource( 16 )
input_g = SubResource( 15 )
input_b = SubResource( 14 )
input_a = SubResource( 13 )
[sub_resource type="Resource" id=18]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=18]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=19]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=19]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input1 "
input_property = SubResource( 12 )
[sub_resource type="Resource" id=20]
script = ExtResource( 7 )
[sub_resource type="MMNode" id=20]
graph_position = Vector2( 1080, 180 )
input_properties = [ SubResource( 19 ) ]
output_properties = [ SubResource( 18 ) ]
script = ExtResource( 7 )
image = SubResource( 18 )
input = SubResource( 19 )
center = Vector2( 1, 1 )
scale = Vector2( 1.3, 1.3 )
[sub_resource type="Resource" id=21]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=21]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
get_value_from_owner = true
input_slot_type = 6
output_slot_type = 6
slot_name = ">>> Apply >>>"
input_property = SubResource( 12 )
[sub_resource type="Resource" id=22]
script = ExtResource( 8 )
[sub_resource type="MMNode" id=22]
graph_position = Vector2( 560, 300 )
input_properties = [ SubResource( 21 ) ]
output_properties = [ SubResource( 21 ) ]
script = ExtResource( 8 )
input = SubResource( 21 )
[sub_resource type="Resource" id=23]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=23]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=24]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=24]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
input_property = SubResource( 21 )
[sub_resource type="Resource" id=25]
script = ExtResource( 9 )
[sub_resource type="MMNode" id=25]
graph_position = Vector2( 860, 200 )
input_properties = [ SubResource( 24 ) ]
output_properties = [ SubResource( 23 ) ]
script = ExtResource( 9 )
image = SubResource( 23 )
input = SubResource( 24 )
direction = 0
amount = 1.06
center = 0.0
[sub_resource type="Resource" id=26]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=26]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=27]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=27]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
input_property = SubResource( 21 )
[sub_resource type="Resource" id=28]
script = ExtResource( 10 )
[sub_resource type="MMNode" id=28]
graph_position = Vector2( 620, 460 )
input_properties = [ SubResource( 27 ) ]
output_properties = [ SubResource( 26 ) ]
script = ExtResource( 10 )
image = SubResource( 26 )
input = SubResource( 27 )
direction = 0
offset = 0.32
[sub_resource type="Resource" id=32]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=32]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=33]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=33]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
input_property = SubResource( 21 )
[sub_resource type="Resource" id=34]
script = ExtResource( 12 )
[sub_resource type="MMNode" id=34]
graph_position = Vector2( 820, 580 )
input_properties = [ SubResource( 33 ) ]
output_properties = [ SubResource( 32 ) ]
script = ExtResource( 12 )
image = SubResource( 32 )
input = SubResource( 33 )
radius = 1.0
repeat = 4
[sub_resource type="Resource" id=35]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=35]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=36]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=36]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input1 "
[sub_resource type="Resource" id=37]
script = ExtResource( 13 )
[sub_resource type="MMNode" id=37]
graph_position = Vector2( 1040, 560 )
input_properties = [ SubResource( 36 ) ]
output_properties = [ SubResource( 35 ) ]
script = ExtResource( 13 )
image = SubResource( 35 )
input = SubResource( 36 )
center = Vector2( 0.13, 0 )
rotate = 150.0
[sub_resource type="Resource" id=38]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=38]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=39]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=39]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
input_property = SubResource( 21 )
[sub_resource type="Resource" id=40]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=43]
default_type = 1
default_float = 4.1
input_slot_type = 6
slot_name = "Translate X"
[sub_resource type="MMNodeUniversalProperty" id=44]
default_type = 1
default_float = 2.2
input_slot_type = 6
slot_name = "Translate Y"
[sub_resource type="MMNodeUniversalProperty" id=40]
default_type = 1
default_int = 0
default_float = 14.5
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = "Rotate"
input_property = SubResource( 32 )
[sub_resource type="Resource" id=41]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=41]
default_type = 1
default_int = 0
default_float = 1.6
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = "Scale X"
[sub_resource type="Resource" id=42]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=42]
default_type = 1
default_int = 0
default_float = 1.1
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = "Scale Y"
[sub_resource type="Resource" id=43]
script = ExtResource( 5 )
default_type = 1
default_int = 0
default_float = 4.1
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
[sub_resource type="Resource" id=44]
script = ExtResource( 5 )
default_type = 1
default_int = 0
default_float = 2.2
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
[sub_resource type="Resource" id=45]
script = ExtResource( 11 )
[sub_resource type="MMNode" id=45]
graph_position = Vector2( 1280, 560 )
input_properties = [ SubResource( 39 ), SubResource( 43 ), SubResource( 44 ), SubResource( 40 ), SubResource( 41 ), SubResource( 42 ) ]
output_properties = [ SubResource( 38 ) ]
script = ExtResource( 11 )
image = SubResource( 38 )
input = SubResource( 39 )
translate_x = SubResource( 43 )
@ -404,187 +274,142 @@ scale_x = SubResource( 41 )
scale_y = SubResource( 42 )
mode = 1
[sub_resource type="Resource" id=46]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=46]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=47]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=47]
default_type = 1
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
input_property = SubResource( 23 )
[sub_resource type="Resource" id=48]
script = ExtResource( 14 )
[sub_resource type="MMNode" id=48]
graph_position = Vector2( 620, 0 )
input_properties = [ SubResource( 47 ) ]
output_properties = [ SubResource( 46 ) ]
script = ExtResource( 14 )
points = [ 0.0, 0.0, 0.0, 1.0, 0.284455, 0.780757, 0.0, 0.0, 0.735577, 0.159306, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0 ]
image = SubResource( 46 )
input = SubResource( 47 )
[sub_resource type="Resource" id=49]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=49]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=50]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=50]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
[sub_resource type="Resource" id=51]
script = ExtResource( 15 )
[sub_resource type="MMNode" id=51]
graph_position = Vector2( 120, 440 )
input_properties = [ SubResource( 50 ) ]
output_properties = [ SubResource( 49 ) ]
script = ExtResource( 15 )
image = SubResource( 49 )
input = SubResource( 50 )
axis = 2
[sub_resource type="Resource" id=52]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=52]
default_type = 1
default_int = 0
default_float = 0.1
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = "edge"
value_step = 0.05
[sub_resource type="Resource" id=53]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=53]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=54]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=54]
default_type = 1
default_int = 0
default_float = 1.3
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = "radius"
value_step = 0.05
input_property = SubResource( 2 )
[sub_resource type="Resource" id=55]
script = ExtResource( 16 )
[sub_resource type="MMNode" id=55]
graph_position = Vector2( -440, 200 )
input_properties = [ SubResource( 54 ), SubResource( 52 ) ]
output_properties = [ SubResource( 53 ) ]
script = ExtResource( 16 )
image = SubResource( 53 )
shape_type = 3
shape_type = 2
sides = 7
radius = SubResource( 54 )
edge = SubResource( 52 )
[sub_resource type="Resource" id=56]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=56]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=59]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=59]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=57]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=57]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
input_property = SubResource( 59 )
[sub_resource type="Resource" id=58]
script = ExtResource( 17 )
[sub_resource type="MMNode" id=58]
graph_position = Vector2( 580, 800 )
input_properties = [ SubResource( 57 ) ]
output_properties = [ SubResource( 56 ) ]
script = ExtResource( 17 )
image = SubResource( 56 )
input = SubResource( 57 )
mode = 0
[sub_resource type="Resource" id=60]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=60]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
input_property = SubResource( 12 )
[sub_resource type="Resource" id=61]
script = ExtResource( 18 )
[sub_resource type="MMNode" id=61]
graph_position = Vector2( 320, 700 )
input_properties = [ SubResource( 60 ) ]
output_properties = [ SubResource( 59 ) ]
script = ExtResource( 18 )
image = SubResource( 59 )
input = SubResource( 60 )
edge_color = 0.9
[sub_resource type="Resource" id=63]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=63]
default_type = 1
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> A "
value_step = 0.01
value_range = Vector2( 0, 1 )
input_property = SubResource( 5 )
[sub_resource type="Resource" id=64]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=64]
default_type = 1
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> B "
value_step = 0.01
value_range = Vector2( 0, 1 )
input_property = SubResource( 53 )
[sub_resource type="Resource" id=65]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=65]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=62]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=62]
default_type = 1
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
get_value_from_owner = true
output_slot_type = 6
slot_name = " Output >>>"
[sub_resource type="Resource" id=66]
script = ExtResource( 19 )
[sub_resource type="MMNode" id=66]
graph_position = Vector2( -720, 280 )
input_properties = [ SubResource( 63 ), SubResource( 64 ) ]
output_properties = [ SubResource( 62 ), SubResource( 65 ) ]
script = ExtResource( 19 )
image = SubResource( 65 )
a = SubResource( 63 )
b = SubResource( 64 )
@ -592,45 +417,30 @@ output = SubResource( 62 )
operation = 3
clamp_result = true
[sub_resource type="Resource" id=67]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=67]
default_type = 1
default_int = 0
default_float = 1.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Mask "
[sub_resource type="Resource" id=68]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=68]
default_type = 4
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
input_slot_type = 6
slot_name = ">>> Input "
[sub_resource type="Resource" id=69]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=69]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=70]
script = ExtResource( 5 )
[sub_resource type="MMNodeUniversalProperty" id=70]
default_type = 5
default_int = 0
default_float = 0.0
default_vector2 = Vector2( 0, 0 )
default_vector3 = Vector3( 0, 0, 0 )
default_color = Color( 0, 0, 0, 1 )
output_slot_type = 0
[sub_resource type="Resource" id=71]
script = ExtResource( 20 )
[sub_resource type="MMNode" id=71]
graph_position = Vector2( -1060, 280 )
input_properties = [ SubResource( 68 ), SubResource( 67 ) ]
output_properties = [ SubResource( 70 ), SubResource( 69 ) ]
script = ExtResource( 20 )
input = SubResource( 68 )
in_mask = SubResource( 67 )
output = SubResource( 70 )
@ -646,7 +456,54 @@ rnd_scale = 0.2
rnd_opacity = 0.0
variations = false
[resource]
[sub_resource type="MMNodeUniversalProperty" id=74]
default_type = 1
default_float = 0.65
input_slot_type = 6
slot_name = "edge"
value_step = 0.05
[sub_resource type="MMNodeUniversalProperty" id=72]
output_slot_type = 0
[sub_resource type="MMNodeUniversalProperty" id=75]
default_type = 1
default_float = 0.3
input_slot_type = 6
slot_name = "radius"
value_step = 0.05
[sub_resource type="MMNode" id=73]
graph_position = Vector2( -340, -420 )
input_properties = [ SubResource( 75 ), SubResource( 74 ) ]
output_properties = [ SubResource( 72 ) ]
script = ExtResource( 16 )
image = SubResource( 72 )
shape_type = 1
sides = 12
radius = SubResource( 75 )
edge = SubResource( 74 )
[sub_resource type="MMNodeUniversalProperty" id=76]
default_type = 5
output_slot_type = 0
[sub_resource type="MMNodeUniversalProperty" id=77]
default_type = 1
default_float = 1.0
input_slot_type = 6
slot_name = ">>> Input1 "
input_property = SubResource( 72 )
[sub_resource type="MMNode" id=78]
graph_position = Vector2( -80, -520 )
input_properties = [ SubResource( 77 ) ]
output_properties = [ SubResource( 76 ) ]
script = ExtResource( 1 )
image_size = Vector2( 128, 128 )
nodes = [ SubResource( 4 ), SubResource( 8 ), SubResource( 11 ), SubResource( 17 ), SubResource( 20 ), SubResource( 22 ), SubResource( 25 ), SubResource( 28 ), SubResource( 34 ), SubResource( 37 ), SubResource( 45 ), SubResource( 48 ), SubResource( 51 ), SubResource( 55 ), SubResource( 58 ), SubResource( 61 ), SubResource( 66 ), SubResource( 71 ) ]
interpolation_type = 2
points = PoolRealArray( 0, 0, 0, 0, 1, 0.458472, 0.921875, 0.860657, 0.860657, 1, 1, 1, 0, 0, 1 )
image = SubResource( 76 )
input = SubResource( 77 )
[resource]
nodes = [ SubResource( 8 ), SubResource( 11 ), SubResource( 17 ), SubResource( 20 ), SubResource( 22 ), SubResource( 25 ), SubResource( 28 ), SubResource( 34 ), SubResource( 37 ), SubResource( 45 ), SubResource( 48 ), SubResource( 51 ), SubResource( 55 ), SubResource( 58 ), SubResource( 61 ), SubResource( 66 ), SubResource( 71 ), SubResource( 73 ), SubResource( 78 ) ]

View File

@ -10,18 +10,18 @@ export(float) var value : float = 1
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -39,7 +39,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : Color = input.get_value(uv)
return MMAlgos.adjust_hsv(c, hue, saturation, value)

View File

@ -25,34 +25,34 @@ export(Resource) var opacity : Resource
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !input1:
input1 = MMNodeUniversalProperty.new()
input1.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input1.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input1.set_default_value(Color(1, 1, 1, 1))
input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input1.slot_name = ">>> Input1 "
if !input2:
input2 = MMNodeUniversalProperty.new()
input2.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input2.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input2.set_default_value(Color(1, 1, 1, 1))
input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input2.slot_name = ">>> Input2 "
if !opacity:
opacity = MMNodeUniversalProperty.new()
opacity.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
opacity.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
opacity.set_default_value(0.5)
opacity.value_range = Vector2(0, 1)
opacity.value_step = 0.01
opacity.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
opacity.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
opacity.slot_name = "opacity"
register_input_property(input1)
@ -74,7 +74,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var b : Vector3 = Vector3()
#vec4 $(name_uv)_s1 = $s1($uv);

View File

@ -11,24 +11,24 @@ var size : int = 0
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color())
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !sigma:
sigma = MMNodeUniversalProperty.new()
sigma.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
sigma.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
sigma.set_default_value(50)
sigma.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
sigma.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
sigma.slot_name = "Sigma"
register_input_property(input)
@ -50,7 +50,7 @@ func _render(material) -> void:
image.set_value(img)
func render_image(material) -> Image:
func _render_image(material) -> Image:
var img : Image = Image.new()
img.create(material.image_size.x, material.image_size.y, false, Image.FORMAT_RGBA8)

View File

@ -9,18 +9,18 @@ export(float) var contrast : float = 1
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -37,7 +37,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : Color = input.get_value(uv)
return MMAlgos.brightness_contrast(c, brightness, contrast)

View File

@ -7,18 +7,18 @@ export(Resource) var input : Resource
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input.set_default_value(1)
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -34,7 +34,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = input.get_value(uv)
return get_gradient_color(f)

View File

@ -10,42 +10,42 @@ export(Resource) var input_a : Resource
func _init_properties():
if !input_r:
input_r = MMNodeUniversalProperty.new()
input_r.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input_r.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input_r.set_default_value(0)
input_r.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input_r.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input_r.slot_name = ">>> R "
if !input_g:
input_g = MMNodeUniversalProperty.new()
input_g.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input_g.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input_g.set_default_value(0)
input_g.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input_g.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input_g.slot_name = ">>> G "
if !input_b:
input_b = MMNodeUniversalProperty.new()
input_b.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input_b.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input_b.set_default_value(0)
input_b.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input_b.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input_b.slot_name = ">>> B "
if !input_a:
input_a = MMNodeUniversalProperty.new()
input_a.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input_a.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input_a.set_default_value(1)
input_a.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input_a.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input_a.slot_name = ">>> A "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input_r)
@ -66,7 +66,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var r : float = input_r.get_value(uv)
var g : float = input_g.get_value(uv)
var b : float = input_b.get_value(uv)

View File

@ -10,35 +10,35 @@ export(Resource) var out_a : Resource
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !out_r:
out_r = MMNodeUniversalProperty.new()
out_r.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_r.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_r.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_r.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_g:
out_g = MMNodeUniversalProperty.new()
out_g.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_g.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_g.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_g.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_b:
out_b = MMNodeUniversalProperty.new()
out_b.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_b.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_b.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_b.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_a:
out_a = MMNodeUniversalProperty.new()
out_a.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_a.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_a.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_a.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_input_property(input)
register_output_property(out_r)
@ -97,5 +97,5 @@ func _render(material) -> void:
out_b.set_value(img_b)
out_a.set_value(img_a)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()

View File

@ -12,16 +12,16 @@ var size : int = 0
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input.set_default_value(1)
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
register_input_property(input)
@ -43,7 +43,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = 0
f = emboss(uv, size, angle, amount, width)

View File

@ -9,24 +9,24 @@ export(int, "R,G,B,A") var channel : int = 3
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color())
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !value:
value = MMNodeUniversalProperty.new()
value.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
value.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
value.set_default_value(1)
value.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
value.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
value.value_step = 0.01
value.value_range = Vector2(0, 1)
@ -46,7 +46,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var col : Color = input.get_value(uv)
if channel == 0:

View File

@ -9,26 +9,26 @@ export(Color) var edge_color : Color = Color(1, 1, 1, 1)
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !color_map:
color_map = MMNodeUniversalProperty.new()
color_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
color_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
color_map.set_default_value(Color(1, 1, 1, 1))
color_map.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
color_map.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
color_map.slot_name = ">>> Color Map "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -46,7 +46,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#vec4 $(name_uv)_bb = $in($uv);
var c : Color = input.get_value(uv)

View File

@ -8,18 +8,18 @@ export(int, "X,Y,Radial") var axis : int = 2
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : Color = input.get_value(uv)
#vec2 $(name_uv)_c = fract($in($uv).xy+0.5*$in($uv).zw);
var cnv : Vector2 = MMAlgos.fractv2(Vector2(c.r, c.g) + 0.5 * Vector2(c.b, c.a))

View File

@ -8,18 +8,18 @@ export(Color) var edge_color : Color = Color(1, 1, 1, 1)
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#vec4 $(name_uv)_bb = $in($uv);
var c : Color = input.get_value(uv)

View File

@ -8,18 +8,18 @@ export(float) var edge_color : float = 1
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#vec4 $(name_uv)_bb = $in($uv);
var c : Color = input.get_value(uv)

View File

@ -8,18 +8,18 @@ export(int, "Area,Width,Height,Max(W,H)") var formula : int = 0
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#vec4 $(name_uv)_bb = $in($uv);
var c : Color = input.get_value(uv)

View File

@ -8,18 +8,18 @@ export(int, "Stretch,Square") var mode : int = 0
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#vec4 $(name_uv)_bb = $in($uv);
var c : Color = input.get_value(uv)

View File

@ -8,18 +8,18 @@ export(int, "Lightness,Average,Luminosity,Min,Max") var type : int = 2
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : Color = input.get_value(uv)
var f : float = 0

View File

@ -7,18 +7,18 @@ export(Resource) var input : Resource
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -33,7 +33,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : Color = input.get_value(uv)
return MMAlgos.invert(c)

View File

@ -10,16 +10,16 @@ var size : int = 0
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color())
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
register_input_property(input)
@ -39,7 +39,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#make_tileable_$(name)($uv, 0.5*$w)
return make_tileable(uv, 0.5 * width)

View File

@ -12,20 +12,20 @@ export(bool) var clamp_result : bool = false
func _init_properties():
if !a:
a = MMNodeUniversalProperty.new()
a.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
a.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
a.set_default_value(0)
a.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
a.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
a.slot_name = ">>> A "
a.value_step = 0.01
a.value_range = Vector2(0, 1)
if !b:
b = MMNodeUniversalProperty.new()
b.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
b.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
b.set_default_value(0)
b.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
b.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
b.slot_name = ">>> B "
b.value_step = 0.01
b.value_range = Vector2(0, 1)
@ -33,18 +33,18 @@ func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.set_default_value(0)
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.slot_name = " Output >>>"
output.get_value_from_owner = true
@ -61,7 +61,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_enum("get_operation", "set_operation", "Operation", [ "A+B", "A-B", "A*B", "A/B", "log(A)", "log2(A)", "pow(A, B)", "abs(A)", "round(A)", "floor(A)", "ceil(A)", "trunc(A)", "fract(A)", "min(A, B)", "max(A, B)", "A<B", "cos(A*B)", "sin(A*B)", "tan(A*B)", "sqrt(1-A*A)" ])
mm_graph_node.add_slot_bool("get_clamp_result", "set_clamp_result", "Clamp result")
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
var af : float = a.get_value(uv)
var bf : float = b.get_value(uv)
@ -122,7 +122,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = get_property_value(uv)
return Color(f, f, f, 1)

View File

@ -8,18 +8,18 @@ export(int) var steps : int = 4
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : Color = input.get_value(uv)
#vec4(floor($in($uv).rgb*$steps)/$steps, $in($uv).a)

View File

@ -11,18 +11,18 @@ export(int, "0,1,R,-R,G,-G,B,-B,A,-A") var op_a : int = 8
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -66,7 +66,7 @@ func apply(op : int, val : Color) -> float:
return 0.0
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : Color = input.get_value(uv)
return Color(apply(op_r, c), apply(op_g, c), apply(op_b, c), apply(op_a, c))

View File

@ -10,18 +10,18 @@ func _init():
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input.set_default_value(0)
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -37,7 +37,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = input.get_value(uv)
var cf : float = MMAlgos.curve(f, points)

View File

@ -7,9 +7,9 @@ export(float) var repeat : float = 1
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -23,7 +23,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
if interpolation_type == 0:
return MMAlgos.circular_gradient_type_1(uv, repeat, points)
elif interpolation_type == 1:

View File

@ -8,9 +8,9 @@ export(float) var rotate : float = 0
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -25,7 +25,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
if interpolation_type == 0:
return MMAlgos.normal_gradient_type_1(uv, repeat, rotate, points)
elif interpolation_type == 1:

View File

@ -7,9 +7,9 @@ export(float) var repeat : float = 1
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -23,7 +23,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
if interpolation_type == 0:
return MMAlgos.radial_gradient_type_1(uv, repeat, points)
elif interpolation_type == 1:

View File

@ -1,5 +1,5 @@
tool
class_name MMMateial
#class_name MMMaterial
extends Resource
#threads are implemented using my thread pool engine module.

View File

@ -1,5 +1,5 @@
tool
class_name MMNode
#class_name MMNode
extends Resource
export(Vector2) var graph_position : Vector2 = Vector2()
@ -11,7 +11,7 @@ var properties_initialized : bool = false
var dirty : bool = true
#MMMateial
#MMMaterial
func render(material) -> bool:
if !dirty:
return false
@ -26,11 +26,11 @@ func render(material) -> bool:
return true
#MMMateial
#MMMaterial
func _render(material) -> void:
pass
func render_image(material) -> Image:
func _render_image(material) -> Image:
var image : Image = Image.new()
image.create(material.image_size.x, material.image_size.y, false, Image.FORMAT_RGBA8)
@ -41,19 +41,19 @@ func render_image(material) -> Image:
var pseed : float = randf() + randi()
for x in range(image.get_width()):
for y in range(image.get_height()):
var v : Vector2 = Vector2(x / w, y / h)
var col : Color = get_value_for(v, pseed)
image.set_pixel(x, y, col)
# for x in range(image.get_width()):
# for y in range(image.get_height()):
# var v : Vector2 = Vector2(x / w, y / h)
#
# var col : Color = get_value_for(v, pseed)
#
# image.set_pixel(x, y, col)
image.unlock()
return image
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
func init_properties() -> void:
@ -81,7 +81,7 @@ func set_graph_position(pos : Vector2) -> void:
emit_changed()
func register_input_property(prop : MMNodeUniversalProperty) -> void:
prop.owner = self
#prop.owner = self
if !prop.is_connected("changed", self, "on_input_property_changed"):
prop.connect("changed", self, "on_input_property_changed")
@ -89,8 +89,8 @@ func register_input_property(prop : MMNodeUniversalProperty) -> void:
input_properties.append(prop)
func unregister_input_property(prop : MMNodeUniversalProperty) -> void:
if prop.owner == self:
prop.owner = null
#if prop.owner == self:
# prop.owner = null
if prop.is_connected("changed", self, "on_input_property_changed"):
prop.disconnect("changed", self, "on_input_property_changed")
@ -98,7 +98,7 @@ func unregister_input_property(prop : MMNodeUniversalProperty) -> void:
input_properties.erase(prop)
func register_output_property(prop : MMNodeUniversalProperty) -> void:
prop.owner = self
#prop.owner = self
output_properties.append(prop)

View File

@ -1,5 +1,5 @@
tool
class_name MMNodeUniversalProperty
#class_name MMNodeUniversalProperty
extends Resource
enum SlotTypes {

View File

@ -10,9 +10,9 @@ export(float) var interpolation : float = 1
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -22,7 +22,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_smoothness", "set_smoothness", "Smoothness", 0.01)#, Vector2(0, 1))
mm_graph_node.add_slot_float("get_interpolation", "set_interpolation", "Interpolation", 0.01)#, Vector2(0, 1))
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var ps : float = 1.0 / float(pseed)
#anisotropic($(uv), vec2($(scale_x), $(scale_y)), $(seed), $(smoothness), $(interpolation))

View File

@ -20,9 +20,9 @@ export(int) var size : int = 8
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -30,7 +30,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_texture_universal(image)
mm_graph_node.add_slot_int("get_size", "set_size", "Size")#, Vector2(1, 10))
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var ps : float = 1.0 / float(pseed)
#color_dots($(uv), 1.0/$(size), $(seed))

View File

@ -10,9 +10,9 @@ export(float) var persistence : float = 0.5
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -22,7 +22,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_int("get_iterations", "set_iterations", "Iterations")#, Vector2(0, 1))
mm_graph_node.add_slot_float("get_persistence", "set_persistence", "Persistence", 0.01)#, Vector2(0, 1))
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var ps : float = 1.0 / float(pseed)
#perlin_color($(uv), vec2($(scale_x), $(scale_y)), int($(iterations)), $(persistence), $(seed))

View File

@ -12,9 +12,9 @@ export(float) var persistence : float = 0.5
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -26,7 +26,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_int("get_iterations", "set_iterations", "Iterations")#, Vector2(0, 1))
mm_graph_node.add_slot_float("get_persistence", "set_persistence", "Persistence", 0.01)#, Vector2(0, 1))
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var ps : float = 1.0 / float(pseed)
#"Value,Perlin,Simplex,Cellular1,Cellular2,Cellular3,Cellular4,Cellular5,Cellular6"

View File

@ -9,9 +9,9 @@ export(float) var density : float = 0.5
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -20,7 +20,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_int("get_grid_size", "set_grid_size", "Grid Size")#, Vector2(1, 10))
mm_graph_node.add_slot_float("get_density", "set_density", "Density", 0.01)#, Vector2(0, 1))
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var ps : float = 1.0 / float(pseed)
#return dots(uv, 1.0/$(size), $(density), $(seed));

View File

@ -14,27 +14,27 @@ export(float) var randomness : float = 0.85
func _init_properties():
if !out_nodes:
out_nodes = MMNodeUniversalProperty.new()
out_nodes.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_nodes.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_nodes.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_nodes.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_borders:
out_borders = MMNodeUniversalProperty.new()
out_borders.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_borders.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_borders.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_borders.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_random_color:
out_random_color = MMNodeUniversalProperty.new()
out_random_color.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_random_color.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_random_color.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_random_color.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_fill:
out_fill = MMNodeUniversalProperty.new()
out_fill.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_fill.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_fill.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_fill.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(out_nodes)
register_output_property(out_borders)
@ -120,7 +120,7 @@ func _render(material) -> void:
out_random_color.set_value(random_color)
out_fill.set_value(fill)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
#scale

View File

@ -7,8 +7,8 @@ export(String) var postfix : String = ""
func _init_properties():
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
image.slot_name = "image"
register_input_property(image)

View File

@ -10,21 +10,21 @@ export(Vector2) var size : Vector2 = Vector2(4, 4)
func _init_properties():
if !out_main:
out_main = MMNodeUniversalProperty.new()
out_main.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_main.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_main.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_main.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_random_color:
out_random_color = MMNodeUniversalProperty.new()
out_random_color.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_random_color.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_random_color.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_random_color.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_uv_map:
out_uv_map = MMNodeUniversalProperty.new()
out_uv_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_uv_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_uv_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_uv_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(out_main)
register_output_property(out_random_color)
@ -97,7 +97,7 @@ func _render(material) -> void:
out_random_color.set_value(random_color)
out_uv_map.set_value(uv_map)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
#size

View File

@ -21,72 +21,72 @@ export(float) var corner : float = 0.3
func _init_properties():
if !out_bricks_pattern:
out_bricks_pattern = MMNodeUniversalProperty.new()
out_bricks_pattern.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_bricks_pattern.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_bricks_pattern.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_bricks_pattern.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_random_color:
out_random_color = MMNodeUniversalProperty.new()
out_random_color.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_random_color.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_random_color.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_random_color.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_position_x:
out_position_x = MMNodeUniversalProperty.new()
out_position_x.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_position_x.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_position_x.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_position_x.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_position_y:
out_position_y = MMNodeUniversalProperty.new()
out_position_y.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_position_y.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_position_y.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_position_y.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_brick_uv:
out_brick_uv = MMNodeUniversalProperty.new()
out_brick_uv.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_brick_uv.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_brick_uv.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_brick_uv.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_corner_uv:
out_corner_uv = MMNodeUniversalProperty.new()
out_corner_uv.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_corner_uv.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_corner_uv.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_corner_uv.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_direction:
out_direction = MMNodeUniversalProperty.new()
out_direction.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_direction.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_direction.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_direction.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !mortar:
mortar = MMNodeUniversalProperty.new()
mortar.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
mortar.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
mortar.set_default_value(0.1)
mortar.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
mortar.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
mortar.slot_name = "Mortar"
mortar.value_step = 0.01
mortar.value_range = Vector2(0, 0.5)
if !bevel:
bevel = MMNodeUniversalProperty.new()
bevel.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
bevel.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
bevel.set_default_value(0.1)
bevel.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
bevel.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
bevel.slot_name = "Bevel"
bevel.value_step = 0.01
bevel.value_range = Vector2(0, 0.5)
if !roundness:
roundness = MMNodeUniversalProperty.new()
roundness.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
roundness.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
roundness.set_default_value(0.1)
roundness.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
roundness.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
roundness.slot_name = "Roundness"
roundness.value_step = 0.01
roundness.value_range = Vector2(0, 0.5)
@ -235,7 +235,7 @@ func _render(material) -> void:
out_corner_uv.set_value(corner_uv)
out_direction.set_value(direction)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
#type

View File

@ -7,9 +7,9 @@ export(Vector2) var size : Vector2 = Vector2(4, 4)
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -22,7 +22,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var ps : float = 1.0 / float(pseed)
#IChing(vec2($columns, $rows)*$uv, float($seed))

View File

@ -10,9 +10,9 @@ export(Vector2) var repeat : Vector2 = Vector2(4, 4)
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -28,7 +28,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = MMAlgos.pattern(uv, repeat.x, repeat.y, combiner_type, combiner_axis_type_x, combiner_axis_type_y)
return Color(f, f, f, 1)

View File

@ -7,9 +7,9 @@ export(Vector2) var size : Vector2 = Vector2(4, 4)
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -22,7 +22,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var ps : float = 1.0 / float(pseed)
#Rune(vec2($columns, $rows)*$uv, float($seed))

View File

@ -11,9 +11,9 @@ export(float) var randomness : float = 0.44
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -30,7 +30,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#scratches($uv, int($layers), vec2($length, $width), $waviness, $angle, $randomness, vec2(float($seed), 0.0))
return MMAlgos.scratchesc(uv, layers, size, waviness, angle, randomness, Vector2(pseed, 0.0))

View File

@ -9,9 +9,9 @@ export(float) var phase : float = 0
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -26,7 +26,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = 1.0 - abs(2.0 * (uv.y - 0.5) - amplitude *sin((frequency * uv.x + phase)*6.28318530718))
return Color(f, f, f, 1)

View File

@ -8,9 +8,9 @@ export(float) var size : float = 4
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -24,7 +24,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
if shape == 0:
return MMAlgos.truchet1c(uv, size, pseed)
elif shape == 1:

View File

@ -12,28 +12,28 @@ export(int) var stitch : int = 1
func _init_properties():
if !out_main:
out_main = MMNodeUniversalProperty.new()
out_main.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_main.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_main.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_main.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_horizontal_map:
out_horizontal_map = MMNodeUniversalProperty.new()
out_horizontal_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_horizontal_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_horizontal_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_horizontal_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_vertical_map:
out_vertical_map = MMNodeUniversalProperty.new()
out_vertical_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_vertical_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_vertical_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_vertical_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !width:
width = MMNodeUniversalProperty.new()
width.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
width.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
width.set_default_value(Vector2(0.9, 0.9))
width.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
width.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
width.slot_name = "Width"
width.value_step = 0.01
width.value_range = Vector2(0, 1)
@ -109,7 +109,7 @@ func _render(material) -> void:
out_horizontal_map.set_value(horizontal_map)
out_vertical_map.set_value(vertical_map)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
#size

View File

@ -8,11 +8,11 @@ export(int) var ripples : int = 1
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Apply >>>"
output.get_value_from_owner = true
@ -25,7 +25,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_width", "set_width", "Width", 0.01)
mm_graph_node.add_slot_int("get_ripples", "set_ripples", "Ripples")
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
var val : float = output.get_value(uv, true)
return MMAlgos.sdRipples(val, width, ripples)

View File

@ -9,20 +9,20 @@ export(int, "Union,Substraction,Intersection") var operation : int = 0
func _init_properties():
if !input1:
input1 = MMNodeUniversalProperty.new()
input1.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input1.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input1.slot_name = ">>> Input 1 "
if !input1.is_connected("changed", self, "on_input_changed"):
input1.connect("changed", self, "on_input_changed")
if !input2:
input2 = MMNodeUniversalProperty.new()
input2.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input2.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input2.slot_name = ">>> Input 2 "
if !input2.is_connected("changed", self, "on_input_changed"):
@ -30,10 +30,10 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = " Output >>>"
output.get_value_from_owner = true
@ -48,7 +48,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_enum("get_operation", "set_operation", "Operation", [ "Union", "Substraction", "Intersection" ])
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
if operation == 0:
return MMAlgos.sdf_boolean_union(input1.get_value(uv), input2.get_value(uv))
elif operation == 1:

View File

@ -7,11 +7,11 @@ export(int) var count : int = 6
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Apply >>>"
output.get_value_from_owner = true
@ -23,7 +23,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_int("get_count", "set_count", "Count")
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
#$in(circle_repeat_transform_2d($uv-vec2(0.5), $c)+vec2(0.5))
var new_uv : Vector2 = MMAlgos.circle_repeat_transform_2d(uv - Vector2(0.5, 0.5), count) + Vector2(0.5, 0.5)

View File

@ -9,20 +9,20 @@ export(float) var amount : float = 0.5
func _init_properties():
if !input1:
input1 = MMNodeUniversalProperty.new()
input1.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input1.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input1.slot_name = ">>> Input 1 "
if !input1.is_connected("changed", self, "on_input_changed"):
input1.connect("changed", self, "on_input_changed")
if !input2:
input2 = MMNodeUniversalProperty.new()
input2.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input2.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input2.slot_name = ">>> Input 2 "
if !input2.is_connected("changed", self, "on_input_changed"):
@ -30,10 +30,10 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = " Output >>>"
output.get_value_from_owner = true
@ -48,7 +48,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_amount", "set_amount", "Amount", 0.01)
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
return MMAlgos.sdf_morph(input1.get_value(uv), input2.get_value(uv), amount)
#amount

View File

@ -9,11 +9,11 @@ export(float) var random_rotation : float = 0.5
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Apply >>>"
output.get_value_from_owner = true
@ -27,7 +27,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_int("get_y", "set_y", "Y")
mm_graph_node.add_slot_float("get_random_rotation", "set_random_rotation", "Random rotation", 0.01)
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
#todo add this as a parameter
var pseed : int = 123123

View File

@ -7,11 +7,11 @@ export(float) var radius : float = 0
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Apply >>>"
output.get_value_from_owner = true
@ -23,7 +23,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
var val : float = output.get_value(uv, true)
return MMAlgos.sdf_rounded_shape(val, radius)

View File

@ -10,20 +10,20 @@ export(float) var smoothness : float = 0.15
func _init_properties():
if !input1:
input1 = MMNodeUniversalProperty.new()
input1.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input1.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input1.slot_name = ">>> Input 1 "
if !input1.is_connected("changed", self, "on_input_changed"):
input1.connect("changed", self, "on_input_changed")
if !input2:
input2 = MMNodeUniversalProperty.new()
input2.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input2.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input2.slot_name = ">>> Input 2 "
if !input2.is_connected("changed", self, "on_input_changed"):
@ -31,10 +31,10 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = " Output >>>"
output.get_value_from_owner = true
@ -50,7 +50,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_enum("get_operation", "set_operation", "Operation", [ "Union", "Substraction", "Intersection" ])
mm_graph_node.add_slot_float("get_smoothness", "set_smoothness", "Smoothness", 0.01)
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
if operation == 0:
return MMAlgos.sdf_smooth_boolean_union(input1.get_value(uv), input2.get_value(uv), smoothness)
elif operation == 1:

View File

@ -9,9 +9,9 @@ export(float) var width : float = 0.1
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -24,7 +24,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
mm_graph_node.add_slot_float("get_width", "set_width", "Width", 0.01)
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
return MMAlgos.sdf_arc(uv, angle, Vector2(radius, width))
#angle

View File

@ -8,9 +8,9 @@ export(Vector2) var size : Vector2 = Vector2(0.3, 0.2)
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -22,7 +22,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector2("get_center", "set_center", "Center", 0.01)
mm_graph_node.add_slot_vector2("get_size", "set_size", "Size", 0.01)
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
return MMAlgos.sdf_box(uv, center, size)
#center

View File

@ -8,9 +8,9 @@ export(float) var radius : float = 0.4
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -22,7 +22,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector2("get_center", "set_center", "Center", 0.01)
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
return MMAlgos.sdf_circle(uv, center, radius)
#center

View File

@ -12,9 +12,9 @@ func _init():
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -28,7 +28,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_width", "set_width", "Width", 0.01)
mm_graph_node.add_slot_curve()
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
var line : Vector2 = MMAlgos.sdf_line(uv, A, B, width)
#$(name_uv)_sdl.x - $r * $profile($(name_uv)_sdl.y)

View File

@ -6,9 +6,9 @@ export(Resource) var output : Resource
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -18,7 +18,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_label_universal(output)
mm_graph_node.add_slot_polygon()
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
return MMAlgos.sdPolygon(uv, points)
func _polygon_changed() -> void:

View File

@ -8,9 +8,9 @@ export(Vector2) var size : Vector2 = Vector2(0.3, 0.2)
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -22,7 +22,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector2("get_center", "set_center", "Center", 0.01)
mm_graph_node.add_slot_vector2("get_size", "set_size", "Size", 0.01)
func get_property_value(uv : Vector2) -> float:
func _get_property_value(uv : Vector2) -> float:
return MMAlgos.sdf_rhombus(uv, center, size)
#center

View File

@ -9,17 +9,17 @@ export(float) var base : float = 0
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
#for some reason this doesn't work, todo check
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = "Input"
register_output_property(image)
@ -37,7 +37,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = input.get_value(uv)
#clamp($base-$in($uv)/max($bevel, 0.00001), 0.0, 1.0)

View File

@ -7,11 +7,11 @@ export(float) var angle : float = 0
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Apply >>>"
output.get_value_from_owner = true
@ -23,7 +23,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_angle", "set_angle", "Angle", 1)
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
#$in(sdf2d_rotate($uv, $a*0.01745329251))",
return output.get_value(MMAlgos.sdf2d_rotate(uv, angle * 0.01745329251), true)

View File

@ -7,11 +7,11 @@ export(float) var scale : float = 1
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Apply >>>"
output.get_value_from_owner = true
@ -23,7 +23,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_scale", "set_scale", "Scale", 0.01)
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
#$in(($uv-vec2(0.5))/$s+vec2(0.5))*$s
return output.get_value(((uv - Vector2(0.5, 0.5)) / scale + Vector2(0.5, 0.5)), true)

View File

@ -7,11 +7,11 @@ export(Vector2) var translation : Vector2 = Vector2(0, 0)
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
#output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Apply >>>"
output.get_value_from_owner = true
@ -23,7 +23,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector2("get_translation", "set_translation", "Translation", 0.01)
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
return output.get_value(uv - translation, true)
#a

View File

@ -8,19 +8,19 @@ export(float) var color : float = 0.5
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
input.connect("changed", self, "on_input_changed")
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -33,7 +33,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_color", "set_color", "Color", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
var v : Vector2 = input.get_value_sdf3d(uv3)
v.y = color

View File

@ -9,10 +9,10 @@ export(int, "Union,Substraction,Intersection") var operation : int = 0
func _init_properties():
if !input1:
input1 = MMNodeUniversalProperty.new()
input1.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input1.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input1.slot_name = ">>> Input 1 "
if !input1.is_connected("changed", self, "on_input_changed"):
@ -20,10 +20,10 @@ func _init_properties():
if !input2:
input2 = MMNodeUniversalProperty.new()
input2.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input2.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input2.slot_name = ">>> Input 2 "
if !input2.is_connected("changed", self, "on_input_changed"):
@ -31,9 +31,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -48,7 +48,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_enum("get_operation", "set_operation", "Operation", [ "Union", "Substraction", "Intersection" ])
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
var s1 : Vector2 = input1.get_value_sdf3d(uv3)
var s2 : Vector2 = input2.get_value_sdf3d(uv3)

View File

@ -8,10 +8,10 @@ export(int) var count : int = 5
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
@ -19,9 +19,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -34,7 +34,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_int("get_count", "set_count", "Count")
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#todo make seed a class variable probably into MMNode
var new_uv : Vector3 = MMAlgos.circle_repeat_transform(uv3, count)

View File

@ -8,19 +8,19 @@ export(Vector3) var length : Vector3 = Vector3(0.2, 0, 0)
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
input.connect("changed", self, "on_input_changed")
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -33,7 +33,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector3("get_length", "set_length", "Length", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#$in($uv - clamp($uv, -abs(vec3($x, $y, $z)), abs(vec3($x, $y, $z))))
var new_uv : Vector3 = uv3 - MMAlgos.clampv3(uv3, -MMAlgos.absv3(length), MMAlgos.absv3(length))

View File

@ -8,10 +8,10 @@ export(float) var length : float = 0.25
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
@ -19,9 +19,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -34,7 +34,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_length", "set_length", "Length", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#vec2 $(name_uv)_w = vec2($in($uv.xz+vec2(0.5)),abs($uv.y)-$d);
#ret min(max($(name_uv)_w.x,$(name_uv)_w.y),0.0)+length(max($(name_uv)_w,0.0))

View File

@ -9,10 +9,10 @@ export(float) var amount : float = 0.5
func _init_properties():
if !input1:
input1 = MMNodeUniversalProperty.new()
input1.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input1.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input1.slot_name = ">>> Input 1 "
if !input1.is_connected("changed", self, "on_input_changed"):
@ -20,10 +20,10 @@ func _init_properties():
if !input2:
input2 = MMNodeUniversalProperty.new()
input2.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input2.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input2.slot_name = ">>> Input 2 "
if !input2.is_connected("changed", self, "on_input_changed"):
@ -31,9 +31,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -48,7 +48,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_amount", "set_amount", "Amount", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
var s1 : Vector2 = input1.get_value_sdf3d(uv3)
var s2 : Vector2 = input2.get_value_sdf3d(uv3)

View File

@ -9,10 +9,10 @@ export(float) var rotation : float = 0.3
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
@ -20,9 +20,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -36,7 +36,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector2("get_col_row", "set_col_row", "Col,Row", 1)
mm_graph_node.add_slot_float("get_rotation", "set_rotation", "Rotation", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#todo make seed a class variable probably into MMNode
var new_uv : Vector3 = MMAlgos.sdf3d_repeat(uv3, col_row, rotation, 1)

View File

@ -8,10 +8,10 @@ export(float) var offset : float = 0.25
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
@ -19,9 +19,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -34,7 +34,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_offset", "set_offset", "Offset", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#vec2 $(name_uv)_q = vec2(length($uv.xy) - $d + 0.5, $uv.z + 0.5);
var uv : Vector2 = Vector2(Vector2(uv3.x, uv3.y).length() - offset + 0.5, uv3.z + 0.5)

View File

@ -8,19 +8,19 @@ export(float) var radius : float = 0.15
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
input.connect("changed", self, "on_input_changed")
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -33,7 +33,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
var v : Vector2 = input.get_value_sdf3d(uv3)
#vec2($(name_uv)_v.x-$r, $(name_uv)_v.y)

View File

@ -10,10 +10,10 @@ export(float) var smoothness : float = 0.15
func _init_properties():
if !input1:
input1 = MMNodeUniversalProperty.new()
input1.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input1.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input1.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input1.slot_name = ">>> Input 1 "
if !input1.is_connected("changed", self, "on_input_changed"):
@ -21,10 +21,10 @@ func _init_properties():
if !input2:
input2 = MMNodeUniversalProperty.new()
input2.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input2.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input2.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input2.slot_name = ">>> Input 2 "
if !input2.is_connected("changed", self, "on_input_changed"):
@ -32,9 +32,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -50,7 +50,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_enum("get_operation", "set_operation", "Operation", [ "Union", "Substraction", "Intersection" ])
mm_graph_node.add_slot_float("get_smoothness", "set_smoothness", "Smoothness", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
var s1 : Vector2 = input1.get_value_sdf3d(uv3)
var s2 : Vector2 = input2.get_value_sdf3d(uv3)

View File

@ -10,30 +10,30 @@ export(Resource) var out_color_map : Resource
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
#for some reason this doesn't work, todo check
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = "Input"
if !out_height_map:
out_height_map = MMNodeUniversalProperty.new()
out_height_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_height_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_height_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_height_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_normal_map:
out_normal_map = MMNodeUniversalProperty.new()
out_normal_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_normal_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_normal_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_normal_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !out_color_map:
out_color_map = MMNodeUniversalProperty.new()
out_color_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
out_color_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
out_color_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
out_color_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(out_height_map)
register_output_property(out_normal_map)
@ -100,7 +100,7 @@ func _render(material) -> void:
out_normal_map.set_value(normal_map)
out_color_map.set_value(color_map)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
#vec2 raymarch_$name(vec2 uv) {

View File

@ -8,9 +8,9 @@ export(float) var radius : float = 0.01
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -22,7 +22,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector3("get_size", "set_size", "Size", 0.01)
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
return MMAlgos.sdf3d_box(uv3, size.x, size.y, size.z, radius)
#size

View File

@ -12,9 +12,9 @@ func _init():
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -28,7 +28,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
mm_graph_node.add_slot_curve()
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
if axis == 0:
return sdf3d_capsule_x(uv3, radius, length)
elif axis == 1:

View File

@ -8,9 +8,9 @@ export(float) var angle : float = 30
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -22,7 +22,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_enum("get_axis", "set_axis", "Axis", [ "+X", "-X", "+Y", "-Y", "+Z", "-Z" ])
mm_graph_node.add_slot_float("get_angle", "set_angle", "Angle", 1)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
if axis == 0:
return MMAlgos.sdf3d_cone_px(uv3, angle)
elif axis == 1:

View File

@ -9,9 +9,9 @@ export(float) var radius : float = 0.25
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -24,7 +24,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_length", "set_length", "Length", 0.01)
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
if axis == 0:
return MMAlgos.sdf3d_cylinder_x(uv3, radius, length)
elif axis == 1:

View File

@ -7,9 +7,9 @@ export(float) var radius : float = 0.5
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -20,7 +20,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_radius", "set_radius", "Radius", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
return MMAlgos.sdf3d_sphere(uv3, radius)
#radius

View File

@ -9,9 +9,9 @@ export(float) var minor_radius : float = 0.15
func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -24,7 +24,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_major_radius", "set_major_radius", "Major_radius", 0.01)
mm_graph_node.add_slot_float("get_minor_radius", "set_minor_radius", "Minor_radius", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
if axis == 0:
return MMAlgos.sdf3d_torus_x(uv3, major_radius, minor_radius)
elif axis == 1:

View File

@ -8,10 +8,10 @@ export(Vector3) var rotation : Vector3 = Vector3()
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
@ -19,9 +19,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -34,7 +34,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector3("get_rotation", "set_rotation", "Rotation", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#$in(rotate3d($uv, -vec3($ax, $ay, $az)*0.01745329251))
return input.get_value_sdf3d(MMAlgos.rotate3d(uv3, -rotation * 0.01745329251))

View File

@ -8,10 +8,10 @@ export(float) var scale : float = 1
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
@ -19,9 +19,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -34,7 +34,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_scale", "set_scale", "Scale", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#vec2 $(name_uv)_in = $in(($uv)/$s);
return input.get_value_sdf3d(uv3 / scale)

View File

@ -8,10 +8,10 @@ export(Vector3) var translation : Vector3 = Vector3()
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_VECTOR2
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
# input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_VECTOR2
input.slot_name = ">>> Input "
if !input.is_connected("changed", self, "on_input_changed"):
@ -19,9 +19,9 @@ func _init_properties():
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_VECTOR2
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_VECTOR2
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
output.slot_name = ">>> Output >>>"
output.get_value_from_owner = true
@ -34,7 +34,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_vector3("get_translation", "set_translation", "Translation", 0.01)
func get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
func _get_property_value_sdf3d(uv3 : Vector3) -> Vector2:
#$in($uv-vec3($x, $y, $z))
return input.get_value_sdf3d(uv3 - translation)

View File

@ -13,16 +13,16 @@ export(int) var repeat : int = 1
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input.set_default_value(1.0)
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
register_input_property(input)
@ -38,7 +38,7 @@ func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float("get_width", "set_width", "Width", 0.01)
mm_graph_node.add_slot_int("get_repeat", "set_repeat", "Repeat")
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var nuv : Vector2 = transform_uv(uv)
var f : float = 0

View File

@ -7,9 +7,9 @@ export(String) var image_path : String
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_output_property(image)
@ -21,7 +21,7 @@ func _register_methods(mm_graph_node) -> void:
#
# image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return image.get_value(uv)
func get_image_path() -> String:

View File

@ -18,25 +18,25 @@ export(Resource) var edge : Resource
func _init_properties():
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !radius:
radius = MMNodeUniversalProperty.new()
radius.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
radius.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
radius.set_default_value(0.34375)
radius.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
radius.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
radius.slot_name = "radius"
radius.value_step = 0.05
if !edge:
edge = MMNodeUniversalProperty.new()
edge.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
edge.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
edge.set_default_value(0.2)
edge.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
edge.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
edge.slot_name = "edge"
edge.value_step = 0.05
@ -57,7 +57,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var c : float = 0
var rad : float = radius.get_value(uv)

View File

@ -10,18 +10,18 @@ export(int) var repeat : int = 1
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -38,7 +38,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$in(vec2(fract($repeat*atan($uv.y-0.5, $uv.x-0.5)*0.15915494309), min(0.99999, 2.0/$radius*length($uv-vec2(0.5)))))",
var nuv : Vector2 = Vector2(MMAlgos.fractf(repeat*atan2(uv.y - 0.5, uv.x - 0.5) * 0.15915494309), min(0.99999, 2.0 / radius * (uv - Vector2(0.5, 0.5)).length()))

View File

@ -21,31 +21,31 @@ export(bool) var variations : bool = false
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !in_mask:
in_mask = MMNodeUniversalProperty.new()
in_mask.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
in_mask.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
in_mask.set_default_value(1)
in_mask.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
in_mask.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
in_mask.slot_name = ">>> Mask "
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !instance_map:
instance_map = MMNodeUniversalProperty.new()
instance_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
instance_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
instance_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
instance_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_input_property(input)
register_input_property(in_mask)
@ -106,7 +106,7 @@ func _render(material) -> void:
output.set_value(output_img)
instance_map.set_value(instance_map_img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
#tile

View File

@ -9,18 +9,18 @@ export(float) var offset : float = 0
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -37,7 +37,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$i(kal_rotate($uv, $count, $offset))
return input.get_value(MMAlgos.kal_rotate(uv, count, offset))

View File

@ -9,18 +9,18 @@ export(float) var offset : float = 0
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -37,7 +37,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$i(uvmirror_$direction($uv, $offset))
if direction == 0:

View File

@ -6,13 +6,13 @@ export(Resource) var input : Resource
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Apply >>>"
#input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_COLOR
input.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
#input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_COLOR
input.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.get_value_from_owner = true
register_input_property(input)
@ -21,5 +21,5 @@ func _init_properties():
func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_label_universal(input)
func get_property_value(uv : Vector2):
func _get_property_value(uv : Vector2):
return input.get_value(MMAlgos.fractv2(uv), true)

View File

@ -9,18 +9,18 @@ export(float) var rotate : float = 0
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -37,7 +37,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$i(rotate($uv, vec2(0.5+$cx, 0.5+$cy), $rotate*0.01745329251))
return input.get_value(MMAlgos.rotate(uv, center + Vector2(0.5, 0.5), rotate*0.01745329251))

View File

@ -9,18 +9,18 @@ export(Vector2) var scale : Vector2 = Vector2(1, 1)
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -37,7 +37,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$i(scale($uv, vec2(0.5+$cx, 0.5+$cy), vec2($scale_x, $scale_y)))
return input.get_value(MMAlgos.scale(uv, center + Vector2(0.5, 0.5), scale))

View File

@ -10,18 +10,18 @@ export(float) var center : float = 0
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -39,7 +39,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$in($uv+$amount*($uv.yx-vec2($center))*vec2($direction))
if direction == 0:

View File

@ -21,31 +21,31 @@ export(bool) var variations : bool = false
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
input.set_default_value(0)
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !in_mask:
in_mask = MMNodeUniversalProperty.new()
in_mask.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
in_mask.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
in_mask.set_default_value(1)
in_mask.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
in_mask.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
in_mask.slot_name = ">>> Mask "
if !output:
output = MMNodeUniversalProperty.new()
output.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
output.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
output.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
output.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
if !instance_map:
instance_map = MMNodeUniversalProperty.new()
instance_map.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
instance_map.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
instance_map.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
instance_map.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
register_input_property(input)
register_input_property(in_mask)
@ -113,7 +113,7 @@ func _render(material) -> void:
output.set_value(output_img)
instance_map.set_value(instance_map_img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
return Color()
#tile

View File

@ -14,63 +14,63 @@ export(int, "Clamp,Repeat,Extend") var mode : int = 0
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
if !translate_x:
translate_x = MMNodeUniversalProperty.new()
translate_x.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
translate_x.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
translate_x.set_default_value(0)
translate_x.value_step = 0.01
translate_x.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
translate_x.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
translate_x.slot_name = "Translate X"
if !translate_y:
translate_y = MMNodeUniversalProperty.new()
translate_y.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
translate_y.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
translate_y.set_default_value(0)
translate_y.value_step = 0.01
translate_y.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
translate_y.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
translate_y.slot_name = "Translate Y"
if !rotate:
rotate = MMNodeUniversalProperty.new()
rotate.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
rotate.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
rotate.set_default_value(0)
rotate.value_step = 0.01
rotate.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
rotate.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
rotate.slot_name = "Rotate"
if !scale_x:
scale_x = MMNodeUniversalProperty.new()
scale_x.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
scale_x.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
scale_x.set_default_value(1)
scale_x.value_step = 0.01
scale_x.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
scale_x.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
scale_x.slot_name = "Scale X"
if !scale_y:
scale_y = MMNodeUniversalProperty.new()
scale_y.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
scale_y.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
scale_y.set_default_value(1)
scale_y.value_step = 0.01
scale_y.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
scale_y.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
scale_y.slot_name = "Scale Y"
register_input_property(input)
@ -98,7 +98,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$i($mode(transform2($uv, vec2($translate_x*(2.0*$tx($uv)-1.0), $translate_y*(2.0*$ty($uv)-1.0)), $rotate*0.01745329251*(2.0*$r($uv)-1.0), vec2($scale_x*(2.0*$sx($uv)-1.0), $scale_y*(2.0*$sy($uv)-1.0)))))",
#Mode:

View File

@ -8,18 +8,18 @@ export(Vector2) var translation : Vector2 = Vector2()
func _init_properties():
if !input:
input = MMNodeUniversalProperty.new()
input.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_COLOR
input.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_COLOR
input.set_default_value(Color(0, 0, 0, 1))
input.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_UNIVERSAL
input.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_UNIVERSAL
input.slot_name = ">>> Input1 "
if !image:
image = MMNodeUniversalProperty.new()
image.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_IMAGE
image.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_IMAGE
#image.input_slot_type = MMNodeUniversalProperty.SLOT_TYPE_FLOAT
image.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_IMAGE
#image.force_override = true
register_input_property(input)
@ -35,7 +35,7 @@ func _render(material) -> void:
image.set_value(img)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
#$i($uv-vec2($translate_x, $translate_y))
return input.get_value(uv - translation)

View File

@ -6,20 +6,20 @@ export(Resource) var uniform : Resource
func _init_properties():
if !uniform:
uniform = MMNodeUniversalProperty.new()
uniform.default_type = MMNodeUniversalProperty.MMNodeUniversalPropertyDefaultType.DEFAULT_TYPE_FLOAT
uniform.default_type = MMNodeUniversalProperty.DEFAULT_TYPE_FLOAT
uniform.set_default_value(0.5)
uniform.slot_name = "Value (Color)"
uniform.value_step = 0.01
uniform.value_range = Vector2(0, 1)
uniform.output_slot_type = MMNodeUniversalProperty.SlotTypes.SLOT_TYPE_COLOR
uniform.output_slot_type = MMNodeUniversalProperty.SLOT_TYPE_COLOR
register_output_property(uniform)
func _register_methods(mm_graph_node) -> void:
mm_graph_node.add_slot_float_universal(uniform)
func get_value_for(uv : Vector2, pseed : int) -> Color:
func _get_value_for(uv : Vector2, pseed : int) -> Color:
var f : float = uniform.get_value(uv)
return Color(f, f, f, 1)

Some files were not shown because too many files have changed in this diff Show More