diff --git a/.gitignore b/.gitignore index 4a68b5d..690a910 100644 --- a/.gitignore +++ b/.gitignore @@ -1,24 +1,8 @@ .import generated_image.png -generated_image.png -doc/bricks.png.import -doc/perlin.png.import -doc/screenshot.png.import -doc/sine.png.import -doc/voronoi.png.import -examples/test.ptex -examples/test_blend.ptex -addons/procedural_material/models/Material.material -addons/procedural_material/models/models.blend1 -addons/procedural_material/models/models.dae -addons/procedural_material/models/models.dae.import -/examples/*.png -/examples/*.import -examples/input_image.png.import -examples/input_image.png.import +addons/material_maker/models/Material.material +addons/material_maker/models/models.blend1 +addons/material_maker/models/models.dae +addons/material_maker/models/models.dae.import *.import -*.import -*.import -*.import -/addons/procedural_material/nodes/godot_logo.png.import _build diff --git a/README.md b/README.md index f1d1b4c..4dd1049 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,5 @@ Its user interface is based on Godot's GraphEditor: textures are described as in More details in the [user manual](https://rodzill4.github.io/godot-procedural-textures/doc/). -![Screenshot](addons/procedural_material/doc/images/screenshot.png) +![Screenshot](addons/material_maker/doc/images/screenshot.png) diff --git a/addons/procedural_material/common.shader b/addons/material_maker/common.shader similarity index 100% rename from addons/procedural_material/common.shader rename to addons/material_maker/common.shader diff --git a/addons/procedural_material/doc/Makefile b/addons/material_maker/doc/Makefile similarity index 100% rename from addons/procedural_material/doc/Makefile rename to addons/material_maker/doc/Makefile diff --git a/addons/procedural_material/doc/conf.py b/addons/material_maker/doc/conf.py similarity index 100% rename from addons/procedural_material/doc/conf.py rename to addons/material_maker/doc/conf.py diff --git a/addons/procedural_material/doc/images/bricks.png b/addons/material_maker/doc/images/bricks.png similarity index 100% rename from addons/procedural_material/doc/images/bricks.png rename to addons/material_maker/doc/images/bricks.png diff --git a/addons/procedural_material/doc/images/colorize.png b/addons/material_maker/doc/images/colorize.png similarity index 100% rename from addons/procedural_material/doc/images/colorize.png rename to addons/material_maker/doc/images/colorize.png diff --git a/addons/procedural_material/doc/images/connect_nodes.gif b/addons/material_maker/doc/images/connect_nodes.gif similarity index 100% rename from addons/procedural_material/doc/images/connect_nodes.gif rename to addons/material_maker/doc/images/connect_nodes.gif diff --git a/addons/procedural_material/doc/images/create_node.gif b/addons/material_maker/doc/images/create_node.gif similarity index 100% rename from addons/procedural_material/doc/images/create_node.gif rename to addons/material_maker/doc/images/create_node.gif diff --git a/addons/procedural_material/doc/images/emboss.png b/addons/material_maker/doc/images/emboss.png similarity index 100% rename from addons/procedural_material/doc/images/emboss.png rename to addons/material_maker/doc/images/emboss.png diff --git a/addons/procedural_material/doc/images/node_adjust_hsv.png b/addons/material_maker/doc/images/node_adjust_hsv.png similarity index 100% rename from addons/procedural_material/doc/images/node_adjust_hsv.png rename to addons/material_maker/doc/images/node_adjust_hsv.png diff --git a/addons/procedural_material/doc/images/node_blend.png b/addons/material_maker/doc/images/node_blend.png similarity index 100% rename from addons/procedural_material/doc/images/node_blend.png rename to addons/material_maker/doc/images/node_blend.png diff --git a/addons/procedural_material/doc/images/node_blur.png b/addons/material_maker/doc/images/node_blur.png similarity index 100% rename from addons/procedural_material/doc/images/node_blur.png rename to addons/material_maker/doc/images/node_blur.png diff --git a/addons/procedural_material/doc/images/node_bricks.png b/addons/material_maker/doc/images/node_bricks.png similarity index 100% rename from addons/procedural_material/doc/images/node_bricks.png rename to addons/material_maker/doc/images/node_bricks.png diff --git a/addons/procedural_material/doc/images/node_colorize.png b/addons/material_maker/doc/images/node_colorize.png similarity index 100% rename from addons/procedural_material/doc/images/node_colorize.png rename to addons/material_maker/doc/images/node_colorize.png diff --git a/addons/procedural_material/doc/images/node_combine.png b/addons/material_maker/doc/images/node_combine.png similarity index 100% rename from addons/procedural_material/doc/images/node_combine.png rename to addons/material_maker/doc/images/node_combine.png diff --git a/addons/procedural_material/doc/images/node_decompose.png b/addons/material_maker/doc/images/node_decompose.png similarity index 100% rename from addons/procedural_material/doc/images/node_decompose.png rename to addons/material_maker/doc/images/node_decompose.png diff --git a/addons/procedural_material/doc/images/node_emboss.png b/addons/material_maker/doc/images/node_emboss.png similarity index 100% rename from addons/procedural_material/doc/images/node_emboss.png rename to addons/material_maker/doc/images/node_emboss.png diff --git a/addons/procedural_material/doc/images/node_image.png b/addons/material_maker/doc/images/node_image.png similarity index 100% rename from addons/procedural_material/doc/images/node_image.png rename to addons/material_maker/doc/images/node_image.png diff --git a/addons/procedural_material/doc/images/node_noise.png b/addons/material_maker/doc/images/node_noise.png similarity index 100% rename from addons/procedural_material/doc/images/node_noise.png rename to addons/material_maker/doc/images/node_noise.png diff --git a/addons/procedural_material/doc/images/node_normal_map.png b/addons/material_maker/doc/images/node_normal_map.png similarity index 100% rename from addons/procedural_material/doc/images/node_normal_map.png rename to addons/material_maker/doc/images/node_normal_map.png diff --git a/addons/procedural_material/doc/images/node_pattern.png b/addons/material_maker/doc/images/node_pattern.png similarity index 100% rename from addons/procedural_material/doc/images/node_pattern.png rename to addons/material_maker/doc/images/node_pattern.png diff --git a/addons/procedural_material/doc/images/node_perlin.png b/addons/material_maker/doc/images/node_perlin.png similarity index 100% rename from addons/procedural_material/doc/images/node_perlin.png rename to addons/material_maker/doc/images/node_perlin.png diff --git a/addons/procedural_material/doc/images/node_transform.png b/addons/material_maker/doc/images/node_transform.png similarity index 100% rename from addons/procedural_material/doc/images/node_transform.png rename to addons/material_maker/doc/images/node_transform.png diff --git a/addons/procedural_material/doc/images/node_uniform.png b/addons/material_maker/doc/images/node_uniform.png similarity index 100% rename from addons/procedural_material/doc/images/node_uniform.png rename to addons/material_maker/doc/images/node_uniform.png diff --git a/addons/procedural_material/doc/images/node_voronoi.png b/addons/material_maker/doc/images/node_voronoi.png similarity index 100% rename from addons/procedural_material/doc/images/node_voronoi.png rename to addons/material_maker/doc/images/node_voronoi.png diff --git a/addons/procedural_material/doc/images/node_warp.png b/addons/material_maker/doc/images/node_warp.png similarity index 100% rename from addons/procedural_material/doc/images/node_warp.png rename to addons/material_maker/doc/images/node_warp.png diff --git a/addons/procedural_material/doc/images/noise.png b/addons/material_maker/doc/images/noise.png similarity index 100% rename from addons/procedural_material/doc/images/noise.png rename to addons/material_maker/doc/images/noise.png diff --git a/addons/procedural_material/doc/images/pattern.png b/addons/material_maker/doc/images/pattern.png similarity index 100% rename from addons/procedural_material/doc/images/pattern.png rename to addons/material_maker/doc/images/pattern.png diff --git a/addons/procedural_material/doc/images/perlin.png b/addons/material_maker/doc/images/perlin.png similarity index 100% rename from addons/procedural_material/doc/images/perlin.png rename to addons/material_maker/doc/images/perlin.png diff --git a/addons/procedural_material/doc/images/screenshot.png b/addons/material_maker/doc/images/screenshot.png similarity index 100% rename from addons/procedural_material/doc/images/screenshot.png rename to addons/material_maker/doc/images/screenshot.png diff --git a/addons/procedural_material/doc/images/voronoi.png b/addons/material_maker/doc/images/voronoi.png similarity index 100% rename from addons/procedural_material/doc/images/voronoi.png rename to addons/material_maker/doc/images/voronoi.png diff --git a/addons/procedural_material/doc/images/warp.png b/addons/material_maker/doc/images/warp.png similarity index 100% rename from addons/procedural_material/doc/images/warp.png rename to addons/material_maker/doc/images/warp.png diff --git a/addons/procedural_material/doc/index.rst b/addons/material_maker/doc/index.rst similarity index 100% rename from addons/procedural_material/doc/index.rst rename to addons/material_maker/doc/index.rst diff --git a/addons/procedural_material/doc/intro.rst b/addons/material_maker/doc/intro.rst similarity index 100% rename from addons/procedural_material/doc/intro.rst rename to addons/material_maker/doc/intro.rst diff --git a/addons/procedural_material/doc/make.bat b/addons/material_maker/doc/make.bat similarity index 100% rename from addons/procedural_material/doc/make.bat rename to addons/material_maker/doc/make.bat diff --git a/addons/procedural_material/doc/node_adjust_hsv.rst b/addons/material_maker/doc/node_adjust_hsv.rst similarity index 100% rename from addons/procedural_material/doc/node_adjust_hsv.rst rename to addons/material_maker/doc/node_adjust_hsv.rst diff --git a/addons/procedural_material/doc/node_blend.rst b/addons/material_maker/doc/node_blend.rst similarity index 100% rename from addons/procedural_material/doc/node_blend.rst rename to addons/material_maker/doc/node_blend.rst diff --git a/addons/procedural_material/doc/node_blur.rst b/addons/material_maker/doc/node_blur.rst similarity index 100% rename from addons/procedural_material/doc/node_blur.rst rename to addons/material_maker/doc/node_blur.rst diff --git a/addons/procedural_material/doc/node_bricks.rst b/addons/material_maker/doc/node_bricks.rst similarity index 100% rename from addons/procedural_material/doc/node_bricks.rst rename to addons/material_maker/doc/node_bricks.rst diff --git a/addons/procedural_material/doc/node_colorize.rst b/addons/material_maker/doc/node_colorize.rst similarity index 100% rename from addons/procedural_material/doc/node_colorize.rst rename to addons/material_maker/doc/node_colorize.rst diff --git a/addons/procedural_material/doc/node_combine.rst b/addons/material_maker/doc/node_combine.rst similarity index 100% rename from addons/procedural_material/doc/node_combine.rst rename to addons/material_maker/doc/node_combine.rst diff --git a/addons/procedural_material/doc/node_decompose.rst b/addons/material_maker/doc/node_decompose.rst similarity index 100% rename from addons/procedural_material/doc/node_decompose.rst rename to addons/material_maker/doc/node_decompose.rst diff --git a/addons/procedural_material/doc/node_emboss.rst b/addons/material_maker/doc/node_emboss.rst similarity index 100% rename from addons/procedural_material/doc/node_emboss.rst rename to addons/material_maker/doc/node_emboss.rst diff --git a/addons/procedural_material/doc/node_image.rst b/addons/material_maker/doc/node_image.rst similarity index 100% rename from addons/procedural_material/doc/node_image.rst rename to addons/material_maker/doc/node_image.rst diff --git a/addons/procedural_material/doc/node_noise.rst b/addons/material_maker/doc/node_noise.rst similarity index 100% rename from addons/procedural_material/doc/node_noise.rst rename to addons/material_maker/doc/node_noise.rst diff --git a/addons/procedural_material/doc/node_normal_map.rst b/addons/material_maker/doc/node_normal_map.rst similarity index 100% rename from addons/procedural_material/doc/node_normal_map.rst rename to addons/material_maker/doc/node_normal_map.rst diff --git a/addons/procedural_material/doc/node_pattern.rst b/addons/material_maker/doc/node_pattern.rst similarity index 100% rename from addons/procedural_material/doc/node_pattern.rst rename to addons/material_maker/doc/node_pattern.rst diff --git a/addons/procedural_material/doc/node_perlin.rst b/addons/material_maker/doc/node_perlin.rst similarity index 100% rename from addons/procedural_material/doc/node_perlin.rst rename to addons/material_maker/doc/node_perlin.rst diff --git a/addons/procedural_material/doc/node_transform.rst b/addons/material_maker/doc/node_transform.rst similarity index 100% rename from addons/procedural_material/doc/node_transform.rst rename to addons/material_maker/doc/node_transform.rst diff --git a/addons/procedural_material/doc/node_uniform.rst b/addons/material_maker/doc/node_uniform.rst similarity index 100% rename from addons/procedural_material/doc/node_uniform.rst rename to addons/material_maker/doc/node_uniform.rst diff --git a/addons/procedural_material/doc/node_voronoi.rst b/addons/material_maker/doc/node_voronoi.rst similarity index 100% rename from addons/procedural_material/doc/node_voronoi.rst rename to addons/material_maker/doc/node_voronoi.rst diff --git a/addons/procedural_material/doc/node_warp.rst b/addons/material_maker/doc/node_warp.rst similarity index 100% rename from addons/procedural_material/doc/node_warp.rst rename to addons/material_maker/doc/node_warp.rst diff --git a/addons/procedural_material/doc/nodes.rst b/addons/material_maker/doc/nodes.rst similarity index 100% rename from addons/procedural_material/doc/nodes.rst rename to addons/material_maker/doc/nodes.rst diff --git a/addons/procedural_material/doc/nodes_filters.rst b/addons/material_maker/doc/nodes_filters.rst similarity index 100% rename from addons/procedural_material/doc/nodes_filters.rst rename to addons/material_maker/doc/nodes_filters.rst diff --git a/addons/procedural_material/doc/nodes_generators.rst b/addons/material_maker/doc/nodes_generators.rst similarity index 100% rename from addons/procedural_material/doc/nodes_generators.rst rename to addons/material_maker/doc/nodes_generators.rst diff --git a/addons/procedural_material/doc/user_interface.rst b/addons/material_maker/doc/user_interface.rst similarity index 100% rename from addons/procedural_material/doc/user_interface.rst rename to addons/material_maker/doc/user_interface.rst diff --git a/addons/procedural_material/examples/biohazard.ptex b/addons/material_maker/examples/biohazard.ptex similarity index 100% rename from addons/procedural_material/examples/biohazard.ptex rename to addons/material_maker/examples/biohazard.ptex diff --git a/addons/procedural_material/examples/bricks.ptex b/addons/material_maker/examples/bricks.ptex similarity index 100% rename from addons/procedural_material/examples/bricks.ptex rename to addons/material_maker/examples/bricks.ptex diff --git a/addons/procedural_material/examples/crocodile_skin.ptex b/addons/material_maker/examples/crocodile_skin.ptex similarity index 100% rename from addons/procedural_material/examples/crocodile_skin.ptex rename to addons/material_maker/examples/crocodile_skin.ptex diff --git a/addons/procedural_material/examples/dry_earth.ptex b/addons/material_maker/examples/dry_earth.ptex similarity index 100% rename from addons/procedural_material/examples/dry_earth.ptex rename to addons/material_maker/examples/dry_earth.ptex diff --git a/addons/procedural_material/examples/floor1.ptex b/addons/material_maker/examples/floor1.ptex similarity index 100% rename from addons/procedural_material/examples/floor1.ptex rename to addons/material_maker/examples/floor1.ptex diff --git a/addons/procedural_material/examples/floor2.ptex b/addons/material_maker/examples/floor2.ptex similarity index 100% rename from addons/procedural_material/examples/floor2.ptex rename to addons/material_maker/examples/floor2.ptex diff --git a/addons/procedural_material/examples/grass_with_flowers.ptex b/addons/material_maker/examples/grass_with_flowers.ptex similarity index 100% rename from addons/procedural_material/examples/grass_with_flowers.ptex rename to addons/material_maker/examples/grass_with_flowers.ptex diff --git a/addons/procedural_material/examples/lava.ptex b/addons/material_maker/examples/lava.ptex similarity index 100% rename from addons/procedural_material/examples/lava.ptex rename to addons/material_maker/examples/lava.ptex diff --git a/addons/procedural_material/examples/marble.ptex b/addons/material_maker/examples/marble.ptex similarity index 100% rename from addons/procedural_material/examples/marble.ptex rename to addons/material_maker/examples/marble.ptex diff --git a/addons/procedural_material/examples/metal_pattern.ptex b/addons/material_maker/examples/metal_pattern.ptex similarity index 100% rename from addons/procedural_material/examples/metal_pattern.ptex rename to addons/material_maker/examples/metal_pattern.ptex diff --git a/addons/procedural_material/examples/metal_pattern_2.ptex b/addons/material_maker/examples/metal_pattern_2.ptex similarity index 100% rename from addons/procedural_material/examples/metal_pattern_2.ptex rename to addons/material_maker/examples/metal_pattern_2.ptex diff --git a/addons/procedural_material/examples/metal_pattern_3.ptex b/addons/material_maker/examples/metal_pattern_3.ptex similarity index 100% rename from addons/procedural_material/examples/metal_pattern_3.ptex rename to addons/material_maker/examples/metal_pattern_3.ptex diff --git a/addons/procedural_material/examples/rock.ptex b/addons/material_maker/examples/rock.ptex similarity index 100% rename from addons/procedural_material/examples/rock.ptex rename to addons/material_maker/examples/rock.ptex diff --git a/addons/procedural_material/examples/rusted_metal.ptex b/addons/material_maker/examples/rusted_metal.ptex similarity index 100% rename from addons/procedural_material/examples/rusted_metal.ptex rename to addons/material_maker/examples/rusted_metal.ptex diff --git a/addons/procedural_material/examples/stone_wall.ptex b/addons/material_maker/examples/stone_wall.ptex similarity index 100% rename from addons/procedural_material/examples/stone_wall.ptex rename to addons/material_maker/examples/stone_wall.ptex diff --git a/addons/procedural_material/examples/wood.ptex b/addons/material_maker/examples/wood.ptex similarity index 100% rename from addons/procedural_material/examples/wood.ptex rename to addons/material_maker/examples/wood.ptex diff --git a/addons/procedural_material/examples/wood_with_blood.ptex b/addons/material_maker/examples/wood_with_blood.ptex similarity index 100% rename from addons/procedural_material/examples/wood_with_blood.ptex rename to addons/material_maker/examples/wood_with_blood.ptex diff --git a/addons/procedural_material/examples/wooden_floor.ptex b/addons/material_maker/examples/wooden_floor.ptex similarity index 100% rename from addons/procedural_material/examples/wooden_floor.ptex rename to addons/material_maker/examples/wooden_floor.ptex diff --git a/addons/procedural_material/graph_edit.gd b/addons/material_maker/graph_edit.gd similarity index 99% rename from addons/procedural_material/graph_edit.gd rename to addons/material_maker/graph_edit.gd index a0c06e5..288a84e 100644 --- a/addons/procedural_material/graph_edit.gd +++ b/addons/material_maker/graph_edit.gd @@ -114,7 +114,7 @@ func create_nodes(data, position = null): if data == null: return if data.has("type"): - var node_type = load("res://addons/procedural_material/nodes/"+data.type+".tscn") + var node_type = load("res://addons/material_maker/nodes/"+data.type+".tscn") if node_type != null: var node = node_type.instance() if data.has("name") && !has_node(data.name): diff --git a/addons/procedural_material/graph_edit.tscn b/addons/material_maker/graph_edit.tscn similarity index 93% rename from addons/procedural_material/graph_edit.tscn rename to addons/material_maker/graph_edit.tscn index 6b2d495..fc411e2 100644 --- a/addons/procedural_material/graph_edit.tscn +++ b/addons/material_maker/graph_edit.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=6 format=2] -[ext_resource path="res://addons/procedural_material/graph_edit.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/nodes/material.tscn" type="PackedScene" id=2] +[ext_resource path="res://addons/material_maker/graph_edit.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/material.tscn" type="PackedScene" id=2] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/library.gd b/addons/material_maker/library.gd similarity index 97% rename from addons/procedural_material/library.gd rename to addons/material_maker/library.gd index 0a69e37..d565f71 100644 --- a/addons/procedural_material/library.gd +++ b/addons/material_maker/library.gd @@ -30,7 +30,7 @@ func _ready(): var lib_path = OS.get_executable_path() lib_path = lib_path.left(max(lib_path.rfind("\\"), lib_path.rfind("/"))+1)+"library/base.json" if !add_library(lib_path): - add_library("res://addons/procedural_material/library/base.json") + add_library("res://addons/material_maker/library/base.json") add_library("user://library/user.json") func add_library(filename): diff --git a/addons/procedural_material/library/base.json b/addons/material_maker/library/base.json similarity index 98% rename from addons/procedural_material/library/base.json rename to addons/material_maker/library/base.json index 7f27ca0..2deb903 100644 --- a/addons/procedural_material/library/base.json +++ b/addons/material_maker/library/base.json @@ -18,7 +18,7 @@ { "tree_item":"Generators/Image", "type":"image", - "file_path":"res://addons/procedural_material/nodes/godot_logo.png" + "file_path":"res://addons/material_maker/nodes/godot_logo.png" }, { "tree_item":"Generators/Pattern", diff --git a/addons/procedural_material/library/base/basketweave.png b/addons/material_maker/library/base/basketweave.png similarity index 100% rename from addons/procedural_material/library/base/basketweave.png rename to addons/material_maker/library/base/basketweave.png diff --git a/addons/procedural_material/library/base/bricks.png b/addons/material_maker/library/base/bricks.png similarity index 100% rename from addons/procedural_material/library/base/bricks.png rename to addons/material_maker/library/base/bricks.png diff --git a/addons/procedural_material/library/base/checkerboard.png b/addons/material_maker/library/base/checkerboard.png similarity index 100% rename from addons/procedural_material/library/base/checkerboard.png rename to addons/material_maker/library/base/checkerboard.png diff --git a/addons/procedural_material/library/base/herringbone.png b/addons/material_maker/library/base/herringbone.png similarity index 100% rename from addons/procedural_material/library/base/herringbone.png rename to addons/material_maker/library/base/herringbone.png diff --git a/addons/procedural_material/library/base/invert.png b/addons/material_maker/library/base/invert.png similarity index 100% rename from addons/procedural_material/library/base/invert.png rename to addons/material_maker/library/base/invert.png diff --git a/addons/procedural_material/library/base/noise.png b/addons/material_maker/library/base/noise.png similarity index 100% rename from addons/procedural_material/library/base/noise.png rename to addons/material_maker/library/base/noise.png diff --git a/addons/procedural_material/library/base/pattern.png b/addons/material_maker/library/base/pattern.png similarity index 100% rename from addons/procedural_material/library/base/pattern.png rename to addons/material_maker/library/base/pattern.png diff --git a/addons/procedural_material/library/base/perlin.png b/addons/material_maker/library/base/perlin.png similarity index 100% rename from addons/procedural_material/library/base/perlin.png rename to addons/material_maker/library/base/perlin.png diff --git a/addons/procedural_material/library/base/spanishbond.png b/addons/material_maker/library/base/spanishbond.png similarity index 100% rename from addons/procedural_material/library/base/spanishbond.png rename to addons/material_maker/library/base/spanishbond.png diff --git a/addons/procedural_material/library/base/tiles.png b/addons/material_maker/library/base/tiles.png similarity index 100% rename from addons/procedural_material/library/base/tiles.png rename to addons/material_maker/library/base/tiles.png diff --git a/addons/procedural_material/library/base/voronoi.png b/addons/material_maker/library/base/voronoi.png similarity index 100% rename from addons/procedural_material/library/base/voronoi.png rename to addons/material_maker/library/base/voronoi.png diff --git a/addons/procedural_material/main_window.gd b/addons/material_maker/main_window.gd similarity index 96% rename from addons/procedural_material/main_window.gd rename to addons/material_maker/main_window.gd index ba08e5b..70ce42a 100644 --- a/addons/procedural_material/main_window.gd +++ b/addons/material_maker/main_window.gd @@ -75,7 +75,7 @@ func menu_about_to_show(name, menu): menu.set_item_disabled(menu.get_item_index(i), is_disabled) func new_pane(): - var graph_edit = preload("res://addons/procedural_material/graph_edit.tscn").instance() + var graph_edit = preload("res://addons/material_maker/graph_edit.tscn").instance() $VBoxContainer/HBoxContainer/Projects.add_child(graph_edit) $VBoxContainer/HBoxContainer/Projects.current_tab = graph_edit.get_index() return graph_edit @@ -179,7 +179,7 @@ func add_to_user_library(): if n is GraphNode and n.selected: selected_nodes.append(n) if !selected_nodes.empty(): - var dialog = preload("res://addons/procedural_material/widgets/line_dialog.tscn").instance() + var dialog = preload("res://addons/material_maker/widgets/line_dialog.tscn").instance() add_child(dialog) dialog.connect("ok", self, "do_add_to_user_library", [ selected_nodes ]) dialog.popup_centered() @@ -217,7 +217,7 @@ func bug_report(): OS.shell_open("https://github.com/RodZill4/godot-procedural-textures/issues") func about(): - var about_box = preload("res://addons/procedural_material/widgets/about.tscn").instance() + var about_box = preload("res://addons/material_maker/widgets/about.tscn").instance() add_child(about_box) about_box.popup_centered() diff --git a/addons/procedural_material/main_window.tscn b/addons/material_maker/main_window.tscn similarity index 95% rename from addons/procedural_material/main_window.tscn rename to addons/material_maker/main_window.tscn index 0f8fd97..abef85d 100644 --- a/addons/procedural_material/main_window.tscn +++ b/addons/material_maker/main_window.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=5 format=2] -[ext_resource path="res://addons/procedural_material/main_window.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/library.gd" type="Script" id=2] -[ext_resource path="res://addons/procedural_material/preview.tscn" type="PackedScene" id=3] -[ext_resource path="res://addons/procedural_material/widgets/tabs.gd" type="Script" id=4] +[ext_resource path="res://addons/material_maker/main_window.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/library.gd" type="Script" id=2] +[ext_resource path="res://addons/material_maker/preview.tscn" type="PackedScene" id=3] +[ext_resource path="res://addons/material_maker/widgets/tabs.gd" type="Script" id=4] [node name="MainWindow" type="Panel" index="0"] diff --git a/addons/procedural_material/models/models.blend b/addons/material_maker/models/models.blend similarity index 100% rename from addons/procedural_material/models/models.blend rename to addons/material_maker/models/models.blend diff --git a/addons/procedural_material/node_base.gd b/addons/material_maker/node_base.gd similarity index 99% rename from addons/procedural_material/node_base.gd rename to addons/material_maker/node_base.gd index d358763..4bdff22 100644 --- a/addons/procedural_material/node_base.gd +++ b/addons/material_maker/node_base.gd @@ -159,7 +159,7 @@ func do_generate_shader(src_code): var code code = "shader_type canvas_item;\n" var file = File.new() - file.open("res://addons/procedural_material/common.shader", File.READ) + file.open("res://addons/material_maker/common.shader", File.READ) code += file.get_as_text() code += "\n" var shader_code = src_code.defs diff --git a/addons/procedural_material/nodes/adjust_hsv.gd b/addons/material_maker/nodes/adjust_hsv.gd similarity index 94% rename from addons/procedural_material/nodes/adjust_hsv.gd rename to addons/material_maker/nodes/adjust_hsv.gd index 5f032d8..40af204 100644 --- a/addons/procedural_material/nodes/adjust_hsv.gd +++ b/addons/material_maker/nodes/adjust_hsv.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var hue var saturation diff --git a/addons/procedural_material/nodes/adjust_hsv.tscn b/addons/material_maker/nodes/adjust_hsv.tscn similarity index 98% rename from addons/procedural_material/nodes/adjust_hsv.tscn rename to addons/material_maker/nodes/adjust_hsv.tscn index 073fef8..8f869e7 100644 --- a/addons/procedural_material/nodes/adjust_hsv.tscn +++ b/addons/material_maker/nodes/adjust_hsv.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/adjust_hsv.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/adjust_hsv.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/blend.gd b/addons/material_maker/nodes/blend.gd similarity index 96% rename from addons/procedural_material/nodes/blend.gd rename to addons/material_maker/nodes/blend.gd index 0d302d5..abd45d3 100644 --- a/addons/procedural_material/nodes/blend.gd +++ b/addons/material_maker/nodes/blend.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var blend_type = 0 var amount = 0.0 diff --git a/addons/procedural_material/nodes/blend.tscn b/addons/material_maker/nodes/blend.tscn similarity index 98% rename from addons/procedural_material/nodes/blend.tscn rename to addons/material_maker/nodes/blend.tscn index 97887b5..b6f25e3 100644 --- a/addons/procedural_material/nodes/blend.tscn +++ b/addons/material_maker/nodes/blend.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/blend.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/blend.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/blur.gd b/addons/material_maker/nodes/blur.gd similarity index 98% rename from addons/procedural_material/nodes/blur.gd rename to addons/material_maker/nodes/blur.gd index 3729bf0..aad02b0 100644 --- a/addons/procedural_material/nodes/blur.gd +++ b/addons/material_maker/nodes/blur.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var size = 5 var direction = 0 diff --git a/addons/procedural_material/nodes/blur.tscn b/addons/material_maker/nodes/blur.tscn similarity index 98% rename from addons/procedural_material/nodes/blur.tscn rename to addons/material_maker/nodes/blur.tscn index ed217af..9bb51ee 100644 --- a/addons/procedural_material/nodes/blur.tscn +++ b/addons/material_maker/nodes/blur.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/blur.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/blur.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/bricks.gd b/addons/material_maker/nodes/bricks.gd similarity index 96% rename from addons/procedural_material/nodes/bricks.gd rename to addons/material_maker/nodes/bricks.gd index 5141596..d207f3c 100644 --- a/addons/procedural_material/nodes/bricks.gd +++ b/addons/material_maker/nodes/bricks.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var pattern = 0 var repeat diff --git a/addons/procedural_material/nodes/bricks.tscn b/addons/material_maker/nodes/bricks.tscn similarity index 99% rename from addons/procedural_material/nodes/bricks.tscn rename to addons/material_maker/nodes/bricks.tscn index 57f9c97..d971506 100644 --- a/addons/procedural_material/nodes/bricks.tscn +++ b/addons/material_maker/nodes/bricks.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/bricks.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/bricks.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/colorize.gd b/addons/material_maker/nodes/colorize.gd similarity index 93% rename from addons/procedural_material/nodes/colorize.gd rename to addons/material_maker/nodes/colorize.gd index 55447ca..88c8d87 100644 --- a/addons/procedural_material/nodes/colorize.gd +++ b/addons/material_maker/nodes/colorize.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" func _get_shader_code(uv): var rv = { defs="", code="" } diff --git a/addons/procedural_material/nodes/colorize.tscn b/addons/material_maker/nodes/colorize.tscn similarity index 84% rename from addons/procedural_material/nodes/colorize.tscn rename to addons/material_maker/nodes/colorize.tscn index e7297b2..bc4fe7b 100644 --- a/addons/procedural_material/nodes/colorize.tscn +++ b/addons/material_maker/nodes/colorize.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://addons/procedural_material/nodes/colorize.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/widgets/gradient_editor.tscn" type="PackedScene" id=2] +[ext_resource path="res://addons/material_maker/nodes/colorize.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/widgets/gradient_editor.tscn" type="PackedScene" id=2] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/combine.gd b/addons/material_maker/nodes/combine.gd similarity index 94% rename from addons/procedural_material/nodes/combine.gd rename to addons/material_maker/nodes/combine.gd index c74fa58..46ab830 100644 --- a/addons/procedural_material/nodes/combine.gd +++ b/addons/material_maker/nodes/combine.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" func _get_shader_code(uv): var rv = { defs="", code="" } diff --git a/addons/procedural_material/nodes/combine.tscn b/addons/material_maker/nodes/combine.tscn similarity index 96% rename from addons/procedural_material/nodes/combine.tscn rename to addons/material_maker/nodes/combine.tscn index a06c101..0f6bc87 100644 --- a/addons/procedural_material/nodes/combine.tscn +++ b/addons/material_maker/nodes/combine.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/combine.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/combine.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/compound.tscn b/addons/material_maker/nodes/compound.tscn similarity index 95% rename from addons/procedural_material/nodes/compound.tscn rename to addons/material_maker/nodes/compound.tscn index a166e39..318ef5e 100644 --- a/addons/procedural_material/nodes/compound.tscn +++ b/addons/material_maker/nodes/compound.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/uniform.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/uniform.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/decompose.gd b/addons/material_maker/nodes/decompose.gd similarity index 91% rename from addons/procedural_material/nodes/decompose.gd rename to addons/material_maker/nodes/decompose.gd index ee13e05..4b26560 100644 --- a/addons/procedural_material/nodes/decompose.gd +++ b/addons/material_maker/nodes/decompose.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" const OUTPUTS = [ "r", "g", "b" ] diff --git a/addons/procedural_material/nodes/decompose.tscn b/addons/material_maker/nodes/decompose.tscn similarity index 96% rename from addons/procedural_material/nodes/decompose.tscn rename to addons/material_maker/nodes/decompose.tscn index 8530c52..032bcfb 100644 --- a/addons/procedural_material/nodes/decompose.tscn +++ b/addons/material_maker/nodes/decompose.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/decompose.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/decompose.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/emboss.gd b/addons/material_maker/nodes/emboss.gd similarity index 96% rename from addons/procedural_material/nodes/emboss.gd rename to addons/material_maker/nodes/emboss.gd index 809da8b..edd578b 100644 --- a/addons/procedural_material/nodes/emboss.gd +++ b/addons/material_maker/nodes/emboss.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var size = 5 var direction = 0 diff --git a/addons/procedural_material/nodes/emboss.tscn b/addons/material_maker/nodes/emboss.tscn similarity index 98% rename from addons/procedural_material/nodes/emboss.tscn rename to addons/material_maker/nodes/emboss.tscn index af9237f..be03565 100644 --- a/addons/procedural_material/nodes/emboss.tscn +++ b/addons/material_maker/nodes/emboss.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/emboss.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/emboss.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/export.gd b/addons/material_maker/nodes/export.gd similarity index 92% rename from addons/procedural_material/nodes/export.gd rename to addons/material_maker/nodes/export.gd index 2bf1834..5ea273f 100644 --- a/addons/procedural_material/nodes/export.gd +++ b/addons/material_maker/nodes/export.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var resolution = 1 var suffix = "suffix" diff --git a/addons/procedural_material/nodes/export.tscn b/addons/material_maker/nodes/export.tscn similarity index 96% rename from addons/procedural_material/nodes/export.tscn rename to addons/material_maker/nodes/export.tscn index 0832a89..94b5faa 100644 --- a/addons/procedural_material/nodes/export.tscn +++ b/addons/material_maker/nodes/export.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/export.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/export.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/godot_logo.png b/addons/material_maker/nodes/godot_logo.png similarity index 100% rename from addons/procedural_material/nodes/godot_logo.png rename to addons/material_maker/nodes/godot_logo.png diff --git a/addons/procedural_material/nodes/image.gd b/addons/material_maker/nodes/image.gd similarity index 96% rename from addons/procedural_material/nodes/image.gd rename to addons/material_maker/nodes/image.gd index 9e98144..bf22660 100644 --- a/addons/procedural_material/nodes/image.gd +++ b/addons/material_maker/nodes/image.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var file_path = null diff --git a/addons/procedural_material/nodes/image.tscn b/addons/material_maker/nodes/image.tscn similarity index 89% rename from addons/procedural_material/nodes/image.tscn rename to addons/material_maker/nodes/image.tscn index 7a54893..43546ea 100644 --- a/addons/procedural_material/nodes/image.tscn +++ b/addons/material_maker/nodes/image.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://addons/procedural_material/nodes/image.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/nodes/godot_logo.png" type="Texture" id=2] +[ext_resource path="res://addons/material_maker/nodes/image.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/godot_logo.png" type="Texture" id=2] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/material.gd b/addons/material_maker/nodes/material.gd similarity index 82% rename from addons/procedural_material/nodes/material.gd rename to addons/material_maker/nodes/material.gd index f4a4549..0a5ee33 100644 --- a/addons/procedural_material/nodes/material.gd +++ b/addons/material_maker/nodes/material.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var resolution = 1 var albedo_color @@ -23,6 +23,14 @@ const TEXTURE_LIST = [ { port=6, texture="depth_map" } ] +const ADDON_TEXTURE_LIST = [ + { port=0, texture="albedo" }, + { port=3, texture="emission" }, + { port=4, texture="normal_map" }, + { ports=[1, 2, 5], texture="mrao" }, + { port=6, texture="depth_map" } +] + func _ready(): for t in TEXTURE_LIST: generated_textures[t.texture] = { shader=null, source=null, texture=null } @@ -101,5 +109,13 @@ func do_update_materials(material_list): func export_textures(prefix, size = null): if size == null: size = int(pow(2, 8+resolution)) - for t in TEXTURE_LIST: - get_parent().export_texture(get_source(t.port), "%s_%s.png" % [ prefix, t.texture ], size) + var texture_list = TEXTURE_LIST + if Engine.editor_hint: + texture_list = ADDON_TEXTURE_LIST + for t in texture_list: + if t.has("port"): + get_parent().export_texture(get_source(t.port), "%s_%s.png" % [ prefix, t.texture ], size) + elif t.has("ports"): + get_parent().export_combined_texture(get_source(t.port[0]), get_source(t.port[1]), get_source(t.port[2]), "%s_%s.png" % [ prefix, t.texture ], size) + if Engine.editor_hint: + print("Exporting material") diff --git a/addons/procedural_material/nodes/material.tscn b/addons/material_maker/nodes/material.tscn similarity index 99% rename from addons/procedural_material/nodes/material.tscn rename to addons/material_maker/nodes/material.tscn index d8cc548..0566c73 100644 --- a/addons/procedural_material/nodes/material.tscn +++ b/addons/material_maker/nodes/material.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/material.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/material.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/noise.gd b/addons/material_maker/nodes/noise.gd similarity index 93% rename from addons/procedural_material/nodes/noise.gd rename to addons/material_maker/nodes/noise.gd index 60334e7..7d8e379 100644 --- a/addons/procedural_material/nodes/noise.gd +++ b/addons/material_maker/nodes/noise.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var size = 4 var density = 0.5 diff --git a/addons/procedural_material/nodes/noise.tscn b/addons/material_maker/nodes/noise.tscn similarity index 97% rename from addons/procedural_material/nodes/noise.tscn rename to addons/material_maker/nodes/noise.tscn index b766a81..313b3fb 100644 --- a/addons/procedural_material/nodes/noise.tscn +++ b/addons/material_maker/nodes/noise.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/noise.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/noise.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/normal_map.gd b/addons/material_maker/nodes/normal_map.gd similarity index 97% rename from addons/procedural_material/nodes/normal_map.gd rename to addons/material_maker/nodes/normal_map.gd index 6b40fd2..f0e1dbb 100644 --- a/addons/procedural_material/nodes/normal_map.gd +++ b/addons/material_maker/nodes/normal_map.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var size = 5 var amount = 0.0 diff --git a/addons/procedural_material/nodes/normal_map.tscn b/addons/material_maker/nodes/normal_map.tscn similarity index 97% rename from addons/procedural_material/nodes/normal_map.tscn rename to addons/material_maker/nodes/normal_map.tscn index 1f06725..3f549bf 100644 --- a/addons/procedural_material/nodes/normal_map.tscn +++ b/addons/material_maker/nodes/normal_map.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/normal_map.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/normal_map.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/pattern.gd b/addons/material_maker/nodes/pattern.gd similarity index 94% rename from addons/procedural_material/nodes/pattern.gd rename to addons/material_maker/nodes/pattern.gd index 34f2ae7..f2cadeb 100644 --- a/addons/procedural_material/nodes/pattern.gd +++ b/addons/material_maker/nodes/pattern.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var mix = 0; var x_wave = 0 diff --git a/addons/procedural_material/nodes/pattern.tscn b/addons/material_maker/nodes/pattern.tscn similarity index 98% rename from addons/procedural_material/nodes/pattern.tscn rename to addons/material_maker/nodes/pattern.tscn index ee6186a..4c6ac24 100644 --- a/addons/procedural_material/nodes/pattern.tscn +++ b/addons/material_maker/nodes/pattern.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/pattern.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/pattern.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/perlin.gd b/addons/material_maker/nodes/perlin.gd similarity index 93% rename from addons/procedural_material/nodes/perlin.gd rename to addons/material_maker/nodes/perlin.gd index 1b5d92d..0e12fd9 100644 --- a/addons/procedural_material/nodes/perlin.gd +++ b/addons/material_maker/nodes/perlin.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var scale_x var scale_y diff --git a/addons/procedural_material/nodes/perlin.tscn b/addons/material_maker/nodes/perlin.tscn similarity index 98% rename from addons/procedural_material/nodes/perlin.tscn rename to addons/material_maker/nodes/perlin.tscn index a401d4f..0d0a965 100644 --- a/addons/procedural_material/nodes/perlin.tscn +++ b/addons/material_maker/nodes/perlin.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/perlin.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/perlin.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/transform.gd b/addons/material_maker/nodes/transform.gd similarity index 96% rename from addons/procedural_material/nodes/transform.gd rename to addons/material_maker/nodes/transform.gd index 79b2816..77e73c8 100644 --- a/addons/procedural_material/nodes/transform.gd +++ b/addons/material_maker/nodes/transform.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var translate_x = 0.0 var translate_y = 0.0 diff --git a/addons/procedural_material/nodes/transform.tscn b/addons/material_maker/nodes/transform.tscn similarity index 99% rename from addons/procedural_material/nodes/transform.tscn rename to addons/material_maker/nodes/transform.tscn index bf6b4b3..b193dc1 100644 --- a/addons/procedural_material/nodes/transform.tscn +++ b/addons/material_maker/nodes/transform.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/transform.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/transform.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/uniform.gd b/addons/material_maker/nodes/uniform.gd similarity index 80% rename from addons/procedural_material/nodes/uniform.gd rename to addons/material_maker/nodes/uniform.gd index 96ec5a7..dfcc368 100644 --- a/addons/procedural_material/nodes/uniform.gd +++ b/addons/material_maker/nodes/uniform.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var color = Color(0.0, 0.0, 0.0) diff --git a/addons/procedural_material/nodes/uniform.tscn b/addons/material_maker/nodes/uniform.tscn similarity index 93% rename from addons/procedural_material/nodes/uniform.tscn rename to addons/material_maker/nodes/uniform.tscn index 82b8ddf..7baa152 100644 --- a/addons/procedural_material/nodes/uniform.tscn +++ b/addons/material_maker/nodes/uniform.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/uniform.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/uniform.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/voronoi.gd b/addons/material_maker/nodes/voronoi.gd similarity index 94% rename from addons/procedural_material/nodes/voronoi.gd rename to addons/material_maker/nodes/voronoi.gd index 9751a01..1b98481 100644 --- a/addons/procedural_material/nodes/voronoi.gd +++ b/addons/material_maker/nodes/voronoi.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var scale_x var scale_y diff --git a/addons/procedural_material/nodes/voronoi.tscn b/addons/material_maker/nodes/voronoi.tscn similarity index 98% rename from addons/procedural_material/nodes/voronoi.tscn rename to addons/material_maker/nodes/voronoi.tscn index b23f6f0..e5e63b1 100644 --- a/addons/procedural_material/nodes/voronoi.tscn +++ b/addons/material_maker/nodes/voronoi.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/voronoi.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/voronoi.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/nodes/warp.gd b/addons/material_maker/nodes/warp.gd similarity index 96% rename from addons/procedural_material/nodes/warp.gd rename to addons/material_maker/nodes/warp.gd index 5854f4c..2a8191b 100644 --- a/addons/procedural_material/nodes/warp.gd +++ b/addons/material_maker/nodes/warp.gd @@ -1,5 +1,5 @@ tool -extends "res://addons/procedural_material/node_base.gd" +extends "res://addons/material_maker/node_base.gd" var amount = 0.0 diff --git a/addons/procedural_material/nodes/warp.tscn b/addons/material_maker/nodes/warp.tscn similarity index 96% rename from addons/procedural_material/nodes/warp.tscn rename to addons/material_maker/nodes/warp.tscn index 2de7595..1586b07 100644 --- a/addons/procedural_material/nodes/warp.tscn +++ b/addons/material_maker/nodes/warp.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/procedural_material/nodes/warp.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/nodes/warp.gd" type="Script" id=1] [sub_resource type="Theme" id=1] diff --git a/addons/procedural_material/panoramas/experiment.hdr b/addons/material_maker/panoramas/experiment.hdr similarity index 100% rename from addons/procedural_material/panoramas/experiment.hdr rename to addons/material_maker/panoramas/experiment.hdr diff --git a/addons/procedural_material/panoramas/lobby.hdr b/addons/material_maker/panoramas/lobby.hdr similarity index 100% rename from addons/procedural_material/panoramas/lobby.hdr rename to addons/material_maker/panoramas/lobby.hdr diff --git a/addons/procedural_material/panoramas/night.hdr b/addons/material_maker/panoramas/night.hdr similarity index 100% rename from addons/procedural_material/panoramas/night.hdr rename to addons/material_maker/panoramas/night.hdr diff --git a/addons/procedural_material/panoramas/park.hdr b/addons/material_maker/panoramas/park.hdr similarity index 100% rename from addons/procedural_material/panoramas/park.hdr rename to addons/material_maker/panoramas/park.hdr diff --git a/addons/procedural_material/panoramas/schelde.hdr b/addons/material_maker/panoramas/schelde.hdr similarity index 100% rename from addons/procedural_material/panoramas/schelde.hdr rename to addons/material_maker/panoramas/schelde.hdr diff --git a/addons/procedural_material/plugin.cfg b/addons/material_maker/plugin.cfg similarity index 70% rename from addons/procedural_material/plugin.cfg rename to addons/material_maker/plugin.cfg index 31378ae..b7abdb3 100644 --- a/addons/procedural_material/plugin.cfg +++ b/addons/material_maker/plugin.cfg @@ -1,7 +1,7 @@ [plugin] -name="ProceduralMaterial" +name="MaterialMaker" description="Procedural Material creation tool" author="RodZilla" -version="0.1" +version="0.5" script="plugin.gd" diff --git a/addons/material_maker/plugin.gd b/addons/material_maker/plugin.gd new file mode 100644 index 0000000..38f3fb7 --- /dev/null +++ b/addons/material_maker/plugin.gd @@ -0,0 +1,39 @@ +tool +extends EditorPlugin + +var mm_button = null +var material_maker = null + +func _enter_tree(): + #material_maker = preload("res://addons/material_maker/pm_material_maker.tscn").instance() + #add_control_to_bottom_panel(material_maker, "ProceduralMaterial") + print("Adding menu item") + mm_button = Button.new() + mm_button.connect("pressed", self, "open_material_maker") + mm_button.text = "Material Maker" + add_control_to_container(CONTAINER_TOOLBAR, mm_button) + print("done") + +func _exit_tree(): + #remove_control_from_bottom_panel(material_maker) + if mm_button != null: + remove_control_from_container(CONTAINER_TOOLBAR, mm_button) + mm_button.queue_free() + if material_maker != null: + material_maker.hide() + material_maker.queue_free() + material_maker = null + +func _get_state(): + var s = { mm_button=mm_button, material_maker=material_maker } + return s + +func _set_state(s): + mm_button = s.mm_button + material_maker = s.material_maker + +func open_material_maker(): + if material_maker == null: + material_maker = load("res://addons/material_maker/window_dialog.tscn").instance() + add_child(material_maker) + material_maker.popup_centered() diff --git a/addons/procedural_material/pm_editor.gd b/addons/material_maker/pm_editor.gd similarity index 100% rename from addons/procedural_material/pm_editor.gd rename to addons/material_maker/pm_editor.gd diff --git a/addons/procedural_material/pm_editor.tscn b/addons/material_maker/pm_editor.tscn similarity index 94% rename from addons/procedural_material/pm_editor.tscn rename to addons/material_maker/pm_editor.tscn index 802ccb8..e57e80c 100644 --- a/addons/procedural_material/pm_editor.tscn +++ b/addons/material_maker/pm_editor.tscn @@ -1,8 +1,8 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://addons/procedural_material/pm_editor.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/graph_edit.tscn" type="PackedScene" id=2] -[ext_resource path="res://addons/procedural_material/preview.tscn" type="PackedScene" id=3] +[ext_resource path="res://addons/material_maker/pm_editor.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/graph_edit.tscn" type="PackedScene" id=2] +[ext_resource path="res://addons/material_maker/preview.tscn" type="PackedScene" id=3] [sub_resource type="Shader" id=5] diff --git a/addons/procedural_material/preview.gd b/addons/material_maker/preview.gd similarity index 95% rename from addons/procedural_material/preview.gd rename to addons/material_maker/preview.gd index 3ee796d..142817f 100644 --- a/addons/procedural_material/preview.gd +++ b/addons/material_maker/preview.gd @@ -20,7 +20,7 @@ func _ready(): _on_Preview_resized() func _on_Environment_item_selected(id): - $MaterialPreview/WorldEnvironment.environment.background_sky.panorama = load("res://addons/procedural_material/panoramas/"+ENVIRONMENTS[id]+".hdr") + $MaterialPreview/WorldEnvironment.environment.background_sky.panorama = load("res://addons/material_maker/panoramas/"+ENVIRONMENTS[id]+".hdr") func _on_Model_item_selected(id): var model = $Config/Model.get_item_text(id) diff --git a/addons/procedural_material/preview.tscn b/addons/material_maker/preview.tscn similarity index 99% rename from addons/procedural_material/preview.tscn rename to addons/material_maker/preview.tscn index 465babf..d7ff026 100644 --- a/addons/procedural_material/preview.tscn +++ b/addons/material_maker/preview.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=13 format=2] -[ext_resource path="res://addons/procedural_material/preview.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/panoramas/park.hdr" type="Texture" id=2] +[ext_resource path="res://addons/material_maker/preview.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/panoramas/park.hdr" type="Texture" id=2] [sub_resource type="Animation" id=1] diff --git a/addons/procedural_material/widgets/about.gd b/addons/material_maker/widgets/about.gd similarity index 100% rename from addons/procedural_material/widgets/about.gd rename to addons/material_maker/widgets/about.gd diff --git a/addons/procedural_material/widgets/about.tscn b/addons/material_maker/widgets/about.tscn similarity index 93% rename from addons/procedural_material/widgets/about.tscn rename to addons/material_maker/widgets/about.tscn index 162e41e..ea7eece 100644 --- a/addons/procedural_material/widgets/about.tscn +++ b/addons/material_maker/widgets/about.tscn @@ -1,12 +1,12 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://addons/procedural_material/widgets/about.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/widgets/about.gd" type="Script" id=1] [ext_resource path="res://icon.png" type="Texture" id=2] -[ext_resource path="res://addons/procedural_material/widgets/icon.png" type="Texture" id=3] -[ext_resource path="res://addons/procedural_material/widgets/facebook.png" type="Texture" id=4] -[ext_resource path="res://addons/procedural_material/widgets/twitter.png" type="Texture" id=5] -[ext_resource path="res://addons/procedural_material/widgets/youtube.png" type="Texture" id=6] -[ext_resource path="res://addons/procedural_material/widgets/github.png" type="Texture" id=7] +[ext_resource path="res://addons/material_maker/widgets/icon.png" type="Texture" id=3] +[ext_resource path="res://addons/material_maker/widgets/facebook.png" type="Texture" id=4] +[ext_resource path="res://addons/material_maker/widgets/twitter.png" type="Texture" id=5] +[ext_resource path="res://addons/material_maker/widgets/youtube.png" type="Texture" id=6] +[ext_resource path="res://addons/material_maker/widgets/github.png" type="Texture" id=7] [node name="About" type="WindowDialog" index="0"] diff --git a/addons/procedural_material/widgets/facebook.png b/addons/material_maker/widgets/facebook.png similarity index 100% rename from addons/procedural_material/widgets/facebook.png rename to addons/material_maker/widgets/facebook.png diff --git a/addons/procedural_material/widgets/github.png b/addons/material_maker/widgets/github.png similarity index 100% rename from addons/procedural_material/widgets/github.png rename to addons/material_maker/widgets/github.png diff --git a/addons/procedural_material/widgets/gradient_editor.gd b/addons/material_maker/widgets/gradient_editor.gd similarity index 100% rename from addons/procedural_material/widgets/gradient_editor.gd rename to addons/material_maker/widgets/gradient_editor.gd diff --git a/addons/procedural_material/widgets/gradient_editor.tscn b/addons/material_maker/widgets/gradient_editor.tscn similarity index 96% rename from addons/procedural_material/widgets/gradient_editor.tscn rename to addons/material_maker/widgets/gradient_editor.tscn index 7463d82..71ad827 100644 --- a/addons/procedural_material/widgets/gradient_editor.tscn +++ b/addons/material_maker/widgets/gradient_editor.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://addons/procedural_material/widgets/gradient_editor.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/widgets/gradient_editor.gd" type="Script" id=1] [sub_resource type="Shader" id=1] diff --git a/addons/procedural_material/widgets/icon.png b/addons/material_maker/widgets/icon.png similarity index 100% rename from addons/procedural_material/widgets/icon.png rename to addons/material_maker/widgets/icon.png diff --git a/addons/procedural_material/widgets/line_dialog.gd b/addons/material_maker/widgets/line_dialog.gd similarity index 100% rename from addons/procedural_material/widgets/line_dialog.gd rename to addons/material_maker/widgets/line_dialog.gd diff --git a/addons/procedural_material/widgets/line_dialog.tscn b/addons/material_maker/widgets/line_dialog.tscn similarity index 97% rename from addons/procedural_material/widgets/line_dialog.tscn rename to addons/material_maker/widgets/line_dialog.tscn index e6f8b5a..d0573c1 100644 --- a/addons/procedural_material/widgets/line_dialog.tscn +++ b/addons/material_maker/widgets/line_dialog.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://addons/procedural_material/widgets/line_dialog.gd" type="Script" id=1] +[ext_resource path="res://addons/material_maker/widgets/line_dialog.gd" type="Script" id=1] [node name="LineDialog" type="WindowDialog" index="0"] diff --git a/addons/procedural_material/widgets/tabs.gd b/addons/material_maker/widgets/tabs.gd similarity index 100% rename from addons/procedural_material/widgets/tabs.gd rename to addons/material_maker/widgets/tabs.gd diff --git a/addons/procedural_material/widgets/twitter.png b/addons/material_maker/widgets/twitter.png similarity index 100% rename from addons/procedural_material/widgets/twitter.png rename to addons/material_maker/widgets/twitter.png diff --git a/addons/procedural_material/widgets/youtube.png b/addons/material_maker/widgets/youtube.png similarity index 100% rename from addons/procedural_material/widgets/youtube.png rename to addons/material_maker/widgets/youtube.png diff --git a/addons/procedural_material/window_dialog.tscn b/addons/material_maker/window_dialog.tscn similarity index 85% rename from addons/procedural_material/window_dialog.tscn rename to addons/material_maker/window_dialog.tscn index b81e20c..43324ce 100644 --- a/addons/procedural_material/window_dialog.tscn +++ b/addons/material_maker/window_dialog.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://addons/procedural_material/main_window.tscn" type="PackedScene" id=1] +[ext_resource path="res://addons/material_maker/main_window.tscn" type="PackedScene" id=1] [node name="WindowDialog" type="WindowDialog" index="0"] diff --git a/addons/procedural_material/nodes/godot_logo.png.import b/addons/procedural_material/nodes/godot_logo.png.import deleted file mode 100644 index 616fa2e..0000000 --- a/addons/procedural_material/nodes/godot_logo.png.import +++ /dev/null @@ -1,30 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path.s3tc="res://.import/godot_logo.png-045faf38aa6152514c35dacd2584c5c2.s3tc.stex" -path.etc2="res://.import/godot_logo.png-045faf38aa6152514c35dacd2584c5c2.etc2.stex" - -[deps] - -source_file="res://addons/procedural_material/nodes/godot_logo.png" -dest_files=[ "res://.import/godot_logo.png-045faf38aa6152514c35dacd2584c5c2.s3tc.stex", "res://.import/godot_logo.png-045faf38aa6152514c35dacd2584c5c2.etc2.stex" ] - -[params] - -compress/mode=2 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/normal_map=0 -flags/repeat=true -flags/filter=true -flags/mipmaps=true -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -stream=false -size_limit=0 -detect_3d=false -svg/scale=1.0 diff --git a/addons/procedural_material/paint_tool/icons/icons.svg b/addons/procedural_material/paint_tool/icons/icons.svg deleted file mode 100644 index 53a3e35..0000000 --- a/addons/procedural_material/paint_tool/icons/icons.svg +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/procedural_material/paint_tool/icons/line.png b/addons/procedural_material/paint_tool/icons/line.png deleted file mode 100644 index b6a2d11..0000000 Binary files a/addons/procedural_material/paint_tool/icons/line.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/icons/line_s.png b/addons/procedural_material/paint_tool/icons/line_s.png deleted file mode 100644 index d130c1d..0000000 Binary files a/addons/procedural_material/paint_tool/icons/line_s.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/icons/line_strip.png b/addons/procedural_material/paint_tool/icons/line_strip.png deleted file mode 100644 index 450ec50..0000000 Binary files a/addons/procedural_material/paint_tool/icons/line_strip.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/icons/line_strip_s.png b/addons/procedural_material/paint_tool/icons/line_strip_s.png deleted file mode 100644 index ccfba39..0000000 Binary files a/addons/procedural_material/paint_tool/icons/line_strip_s.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/icons/paint.png b/addons/procedural_material/paint_tool/icons/paint.png deleted file mode 100644 index 577979b..0000000 Binary files a/addons/procedural_material/paint_tool/icons/paint.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/icons/paint_s.png b/addons/procedural_material/paint_tool/icons/paint_s.png deleted file mode 100644 index 99f820d..0000000 Binary files a/addons/procedural_material/paint_tool/icons/paint_s.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/bricks_albedo.png b/addons/procedural_material/paint_tool/materials/bricks_albedo.png deleted file mode 100644 index d2b53b0..0000000 Binary files a/addons/procedural_material/paint_tool/materials/bricks_albedo.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/bricks_mr.png b/addons/procedural_material/paint_tool/materials/bricks_mr.png deleted file mode 100644 index 8b173f5..0000000 Binary files a/addons/procedural_material/paint_tool/materials/bricks_mr.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/bricks_normal_map.png b/addons/procedural_material/paint_tool/materials/bricks_normal_map.png deleted file mode 100644 index 5f47155..0000000 Binary files a/addons/procedural_material/paint_tool/materials/bricks_normal_map.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/metal_pattern_albedo.png b/addons/procedural_material/paint_tool/materials/metal_pattern_albedo.png deleted file mode 100644 index bf3d185..0000000 Binary files a/addons/procedural_material/paint_tool/materials/metal_pattern_albedo.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/metal_pattern_mr.png b/addons/procedural_material/paint_tool/materials/metal_pattern_mr.png deleted file mode 100644 index a5f336a..0000000 Binary files a/addons/procedural_material/paint_tool/materials/metal_pattern_mr.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/metal_pattern_normal_map.png b/addons/procedural_material/paint_tool/materials/metal_pattern_normal_map.png deleted file mode 100644 index 5237400..0000000 Binary files a/addons/procedural_material/paint_tool/materials/metal_pattern_normal_map.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/rusted_metal_albedo.png b/addons/procedural_material/paint_tool/materials/rusted_metal_albedo.png deleted file mode 100644 index 9e258bb..0000000 Binary files a/addons/procedural_material/paint_tool/materials/rusted_metal_albedo.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/rusted_metal_mr.png b/addons/procedural_material/paint_tool/materials/rusted_metal_mr.png deleted file mode 100644 index a98c7ce..0000000 Binary files a/addons/procedural_material/paint_tool/materials/rusted_metal_mr.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/wooden_floor_albedo.png b/addons/procedural_material/paint_tool/materials/wooden_floor_albedo.png deleted file mode 100644 index 34ca202..0000000 Binary files a/addons/procedural_material/paint_tool/materials/wooden_floor_albedo.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/wooden_floor_mr.png b/addons/procedural_material/paint_tool/materials/wooden_floor_mr.png deleted file mode 100644 index 850483f..0000000 Binary files a/addons/procedural_material/paint_tool/materials/wooden_floor_mr.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/materials/wooden_floor_normal_map.png b/addons/procedural_material/paint_tool/materials/wooden_floor_normal_map.png deleted file mode 100644 index 532a07e..0000000 Binary files a/addons/procedural_material/paint_tool/materials/wooden_floor_normal_map.png and /dev/null differ diff --git a/addons/procedural_material/paint_tool/paint.gd b/addons/procedural_material/paint_tool/paint.gd deleted file mode 100644 index 25d5269..0000000 --- a/addons/procedural_material/paint_tool/paint.gd +++ /dev/null @@ -1,358 +0,0 @@ -tool -extends ViewportContainer - -const MODE_BRUSH = 0 -const MODE_TEXTURE = 1 -const MODE_FIRST_TOOL = 2 -const MODE_FREE = 2 -const MODE_LINE = 3 -const MODE_LINE_STRIP = 4 - -var current_tool = MODE_FREE -var mode = MODE_FREE - -var brush_size = 50.0 -var brush_strength = 0.5 -var texture_albedo = null -var texture_mr = null -var texture_normal = null -var texture_scale = 2.0 - -var previous_position = null -var painting = false -var next_paint_to = null - -var key_rotate = Vector2(0.0, 0.0) - -var object_name = null - -onready var albedo_viewport = $AlbedoPaint/Viewport -onready var mr_viewport = $MRPaint/Viewport -onready var normal_viewport = $NormalPaint/Viewport -onready var albedo_material = $AlbedoPaint/Viewport/PaintRect.get_material() -onready var mr_material = $MRPaint/Viewport/PaintRect.get_material() -onready var normal_material = $NormalPaint/Viewport/PaintRect.get_material() - -onready var brush_material = $Brush.get_material() - -const MATERIAL_OPTIONS = [ "none", "bricks", "metal_pattern", "rusted_metal", "wooden_floor" ] - -signal update_material - -func _ready(): - # add View2Texture as input of Texture2View (to ignore non-visible parts of the mesh) - $Texture2View/Viewport/PaintedMesh.get_surface_material(0).set_shader_param("view2texture", $View2Texture/Viewport.get_texture()) - # Add Texture2View as input to all painted textures - albedo_material.set_shader_param("tex2view_tex", $Texture2View/Viewport.get_texture()) - mr_material.set_shader_param("tex2view_tex", $Texture2View/Viewport.get_texture()) - normal_material.set_shader_param("tex2view_tex", $Texture2View/Viewport.get_texture()) - albedo_material.set_shader_param("tex2viewlsb_tex", $Texture2ViewLsb/Viewport.get_texture()) - mr_material.set_shader_param("tex2viewlsb_tex", $Texture2ViewLsb/Viewport.get_texture()) - normal_material.set_shader_param("tex2viewlsb_tex", $Texture2ViewLsb/Viewport.get_texture()) - # Add all painted textures as input to themselves - normal_material.set_shader_param("self_tex", normal_viewport.get_texture()) - # Assign all textures to painted mesh - albedo_viewport.get_texture().flags |= Texture.FLAG_FILTER | Texture.FLAG_ANISOTROPIC_FILTER - $Viewport/PaintedMesh.get_surface_material(0).albedo_texture = albedo_viewport.get_texture() - mr_viewport.get_texture().flags |= Texture.FLAG_FILTER | Texture.FLAG_ANISOTROPIC_FILTER - $Viewport/PaintedMesh.get_surface_material(0).metallic_texture = mr_viewport.get_texture() - $Viewport/PaintedMesh.get_surface_material(0).roughness_texture = mr_viewport.get_texture() - normal_viewport.get_texture().flags |= Texture.FLAG_FILTER | Texture.FLAG_ANISOTROPIC_FILTER - $Viewport/PaintedMesh.get_surface_material(0).normal_texture = normal_viewport.get_texture() - # Updated Texture2View wrt current camera position - update_tex2view() - # Set size of painted textures - set_texture_size(2048) - # update the material list - $Material/OptionButton.clear() - for m in MATERIAL_OPTIONS: - $Material/OptionButton.add_item(m) - select_material(0) - # Initialize brush related parameters in paint shaders - update_brush_parameters() - # Disable physics process so we avoid useless updates of tex2view textures - set_physics_process(false) - -func set_mesh(n, m): - object_name = n - var mat - mat = $Viewport/PaintedMesh.get_surface_material(0) - $Viewport/PaintedMesh.mesh = m - $Viewport/PaintedMesh.set_surface_material(0, mat) - mat = $Texture2View/Viewport/PaintedMesh.get_surface_material(0) - $Texture2View/Viewport/PaintedMesh.mesh = m - $Texture2View/Viewport/PaintedMesh.set_surface_material(0, mat) - mat = $Texture2ViewLsb/Viewport/PaintedMesh.get_surface_material(0) - $Texture2ViewLsb/Viewport/PaintedMesh.mesh = m - $Texture2ViewLsb/Viewport/PaintedMesh.set_surface_material(0, mat) - mat = $View2Texture/Viewport/PaintedMesh.get_surface_material(0) - $View2Texture/Viewport/PaintedMesh.mesh = m - $View2Texture/Viewport/PaintedMesh.set_surface_material(0, mat) - update_tex2view() - clear_textures() - save() - -func set_texture_size(s): - $Texture2View/Viewport.size = Vector2(s, s) - $Texture2ViewLsb/Viewport.size = Vector2(s, s) - $FixSeams/Viewport.size = Vector2(s, s) - $FixSeams/Viewport/TextureRect1.rect_size = Vector2(s, s) - $FixSeams/Viewport/TextureRect2.rect_size = Vector2(s, s) - $FixSeams/Viewport/TextureRect3.rect_size = Vector2(s, s) - $FixSeams/Viewport/TextureRect4.rect_size = Vector2(s, s) - $FixSeams/Viewport/TextureRect5.rect_size = Vector2(s, s) - $AlbedoPaint/Viewport.size = Vector2(s, s) - $AlbedoPaint/Viewport/PaintRect.rect_size = Vector2(s, s) - $AlbedoPaint/Viewport/InitRect.rect_size = Vector2(s, s) - $MRPaint/Viewport.size = Vector2(s, s) - $MRPaint/Viewport/PaintRect.rect_size = Vector2(s, s) - $MRPaint/Viewport/InitRect.rect_size = Vector2(s, s) - $NormalPaint/Viewport.size = Vector2(s, s) - $NormalPaint/Viewport/PaintRect.rect_size = Vector2(s, s) - $NormalPaint/Viewport/InitRect.rect_size = Vector2(s, s) - -func set_mode(m): - mode = m - if mode == MODE_TEXTURE: - $Texture.show() - else: - $Texture.hide() - -func set_current_tool(m): - current_tool = m - for i in $Tools.get_child_count(): - $Tools.get_child(i).pressed = (i == m) - if mode >= MODE_FIRST_TOOL: - set_mode(current_tool) - -func _physics_process(delta): - $Viewport/CameraStand.rotate($Viewport/CameraStand/Camera.global_transform.basis.x.normalized(), -key_rotate.y*delta) - $Viewport/CameraStand.rotate(Vector3(0, 1, 0), -key_rotate.x*delta) - update_tex2view() - -func _input(ev): - if ev is InputEventKey: - if ev.scancode == KEY_SHIFT or ev.scancode == KEY_CONTROL: - if Input.is_key_pressed(KEY_SHIFT): - set_mode(MODE_BRUSH) - elif Input.is_key_pressed(KEY_CONTROL): - set_mode(MODE_TEXTURE) - else: - set_mode(current_tool) - elif ev.scancode == KEY_LEFT or ev.scancode == KEY_RIGHT or ev.scancode == KEY_UP or ev.scancode == KEY_DOWN: - key_rotate = Vector2(0.0, 0.0) - if Input.is_key_pressed(KEY_UP): - key_rotate.y -= 1.0 - if Input.is_key_pressed(KEY_DOWN): - key_rotate.y += 1.0 - if Input.is_key_pressed(KEY_LEFT): - key_rotate.x -= 1.0 - if Input.is_key_pressed(KEY_RIGHT): - key_rotate.x += 1.0 - set_physics_process(key_rotate != Vector2(0.0, 0.0)) - -func _on_Test_gui_input(ev): - if ev is InputEventMouseMotion: - show_brush(ev.position, previous_position) - if ev.button_mask & BUTTON_MASK_RIGHT != 0: - $Viewport/CameraStand.rotate($Viewport/CameraStand/Camera.global_transform.basis.x.normalized(), -0.01*ev.relative.y) - $Viewport/CameraStand.rotate(Vector3(0, 1, 0), -0.01*ev.relative.x) - if ev.button_mask & BUTTON_MASK_LEFT != 0: - if ev.control: - previous_position = null - texture_scale += ev.relative.x*0.1 - texture_scale = clamp(texture_scale, 0.01, 20.0) - elif ev.shift: - previous_position = null - brush_size += ev.relative.x*0.1 - brush_size = clamp(brush_size, 0.0, 250.0) - brush_strength += ev.relative.y*0.01 - brush_strength = clamp(brush_strength, 0.0, 0.999) - update_brush_parameters() - elif current_tool == MODE_FREE: - paint(ev.position) - elif current_tool != MODE_LINE_STRIP: - previous_position = null - elif ev is InputEventMouseButton and !ev.shift: - var pos = ev.position - if ev.pressed: - var zoom = 0.0 - if ev.button_index == BUTTON_WHEEL_UP: - zoom += 0.1 - $Viewport/CameraStand/Camera.translate(Vector3(0.0, 0.0, zoom)) - update_tex2view() - elif ev.button_index == BUTTON_WHEEL_DOWN: - zoom -= 0.1 - $Viewport/CameraStand/Camera.translate(Vector3(0.0, 0.0, zoom)) - update_tex2view() - elif ev.button_index == BUTTON_LEFT: - if current_tool == MODE_LINE_STRIP && previous_position != null: - paint(pos) - if ev.doubleclick: - pos = null - previous_position = pos - else: - if ev.button_index == BUTTON_RIGHT: - update_tex2view() - elif ev.button_index == BUTTON_LEFT: - if current_tool != MODE_LINE_STRIP: - paint(pos) - previous_position = null - -func show_brush(p, op = null): - if op == null: - op = p - var position = p/rect_size - var old_position = op/rect_size - brush_material.set_shader_param("brush_pos", position) - brush_material.set_shader_param("brush_ppos", old_position) - -func update_brush_parameters(): - var brush_size_vector = Vector2(brush_size, brush_size)/rect_size - if brush_material != null: - brush_material.set_shader_param("brush_size", Vector2(brush_size, brush_size)/rect_size) - brush_material.set_shader_param("brush_strength", brush_strength) - if albedo_material != null: - albedo_material.set_shader_param("brush_size", brush_size_vector) - albedo_material.set_shader_param("brush_strength", brush_strength) - if mr_material != null: - mr_material.set_shader_param("brush_size", brush_size_vector) - mr_material.set_shader_param("brush_strength", brush_strength) - if normal_material != null: - normal_material.set_shader_param("brush_size", brush_size_vector) - normal_material.set_shader_param("brush_strength", brush_strength) - -func clear_textures(): - $AlbedoPaint/Viewport/InitRect.show() - $MRPaint/Viewport/InitRect.show() - $NormalPaint/Viewport/InitRect.show() - albedo_viewport.render_target_update_mode = Viewport.UPDATE_ONCE - albedo_viewport.update_worlds() - mr_viewport.render_target_update_mode = Viewport.UPDATE_ONCE - mr_viewport.update_worlds() - normal_viewport.render_target_update_mode = Viewport.UPDATE_ONCE - normal_viewport.update_worlds() - yield(get_tree(), "idle_frame") - yield(get_tree(), "idle_frame") - $AlbedoPaint/Viewport/InitRect.hide() - $MRPaint/Viewport/InitRect.hide() - $NormalPaint/Viewport/InitRect.hide() - -func paint(p): - if painting: - # if not available for painting, record a paint order - next_paint_to = p - return - painting = true - if previous_position == null: - previous_position = p - var position = p/rect_size - var prev_position = previous_position/rect_size - albedo_material.set_shader_param("brush_pos", position) - albedo_material.set_shader_param("brush_ppos", prev_position) - albedo_material.set_shader_param("brush_color", $Material/AlbedoColor.color) - albedo_viewport.render_target_update_mode = Viewport.UPDATE_ONCE - albedo_viewport.update_worlds() - mr_material.set_shader_param("brush_pos", position) - mr_material.set_shader_param("brush_ppos", prev_position) - mr_material.set_shader_param("brush_color", $Material/MRColor.color) - mr_viewport.render_target_update_mode = Viewport.UPDATE_ONCE - mr_viewport.update_worlds() - normal_material.set_shader_param("brush_pos", position) - normal_material.set_shader_param("brush_ppos", prev_position) - normal_viewport.render_target_update_mode = Viewport.UPDATE_ONCE - normal_viewport.update_worlds() - previous_position = p - yield(get_tree(), "idle_frame") - yield(get_tree(), "idle_frame") - painting = false - # execute recorded paint order if any - if next_paint_to != null: - p = next_paint_to - next_paint_to = null - paint(p) - -func update_tex2view(): - var camera = $Viewport/CameraStand/Camera - var transform = camera.global_transform.affine_inverse()*$Viewport/PaintedMesh.global_transform - # View to texture - $View2Texture/Viewport.size = $Viewport.size - $View2Texture/Viewport/Camera.transform = camera.global_transform - $View2Texture/Viewport.render_target_update_mode = Viewport.UPDATE_ALWAYS - $View2Texture/Viewport.update_worlds() - yield(get_tree(), "idle_frame") - yield(get_tree(), "idle_frame") - var t2v_shader_material = $Texture2View/Viewport/PaintedMesh.get_surface_material(0) - t2v_shader_material.set_shader_param("model_transform", transform) - t2v_shader_material.set_shader_param("fovy_degrees", camera.fov) - t2v_shader_material.set_shader_param("z_near", camera.near) - t2v_shader_material.set_shader_param("z_far", camera.far) - t2v_shader_material.set_shader_param("aspect", rect_size.x/rect_size.y) - $Texture2View/Viewport.render_target_update_mode = Viewport.UPDATE_ALWAYS - $Texture2View/Viewport.update_worlds() - t2v_shader_material = $Texture2ViewLsb/Viewport/PaintedMesh.get_surface_material(0) - t2v_shader_material.set_shader_param("model_transform", transform) - t2v_shader_material.set_shader_param("fovy_degrees", camera.fov) - t2v_shader_material.set_shader_param("z_near", camera.near) - t2v_shader_material.set_shader_param("z_far", camera.far) - t2v_shader_material.set_shader_param("aspect", rect_size.x/rect_size.y) - $Texture2ViewLsb/Viewport.render_target_update_mode = Viewport.UPDATE_ALWAYS - $Texture2ViewLsb/Viewport.update_worlds() - yield(get_tree(), "idle_frame") - yield(get_tree(), "idle_frame") - $Texture2View/Viewport.render_target_update_mode = Viewport.UPDATE_DISABLED - $Texture2ViewLsb/Viewport.render_target_update_mode = Viewport.UPDATE_DISABLED - $FixSeams/Viewport.render_target_update_mode = Viewport.UPDATE_ALWAYS - $FixSeams/Viewport.update_worlds() - yield(get_tree(), "idle_frame") - yield(get_tree(), "idle_frame") - $FixSeams/Viewport.render_target_update_mode = Viewport.UPDATE_DISABLED - -func load_material(): - var dialog = FileDialog.new() - add_child(dialog) - dialog.rect_min_size = Vector2(500, 500) - dialog.access = FileDialog.ACCESS_FILESYSTEM - dialog.mode = FileDialog.MODE_OPEN_FILE - dialog.add_filter("*.paintmat;Paint material") - dialog.connect("file_selected", self, "do_load_material") - dialog.popup_centered() - -func do_load_material(filename): - pass - -func select_material(id): - var m = $Material/OptionButton.get_item_text(id) - if m == "none": - texture_albedo = null - texture_mr = null - texture_normal = null - else: - texture_albedo = load("res://addons/procedural_material/paint_tool/materials/%s_albedo.png" % m) - texture_mr = load("res://addons/procedural_material/paint_tool/materials/%s_mr.png" % m) - texture_normal = load("res://addons/procedural_material/paint_tool/materials/%s_normal_map.png" % m) - albedo_material.set_shader_param("brush_texture", texture_albedo) - mr_material.set_shader_param("brush_texture", texture_mr) - normal_material.set_shader_param("brush_texture", texture_normal) - -func _on_resized(): - update_brush_parameters() - -func dump_viewport(viewport, filename): - var viewport_texture = viewport.get_texture() - var viewport_image = viewport_texture.get_data() - viewport_image.save_png(filename) - -func debug(): - dump_viewport($View2Texture/Viewport, "view2texture.png") - dump_viewport($Texture2View/Viewport, "texture2view.png") - dump_viewport($Texture2ViewLsb/Viewport, "texture2viewlsb.png") - dump_viewport($FixSeams/Viewport, "seamsfixed.png") - -func save(): - var mat = $Viewport/PaintedMesh.get_surface_material(0).duplicate() - dump_viewport($AlbedoPaint/Viewport, object_name+"_albedo.png") - dump_viewport($MRPaint/Viewport, object_name+"_mr.png") - dump_viewport($NormalPaint/Viewport, object_name+"_nm.png") - emit_signal("update_material", { material=mat, albedo=object_name+"_albedo.png", mr=object_name+"_mr.png", nm=object_name+"_nm.png" }) - diff --git a/addons/procedural_material/paint_tool/paint.shader b/addons/procedural_material/paint_tool/paint.shader deleted file mode 100644 index 4e9318b..0000000 --- a/addons/procedural_material/paint_tool/paint.shader +++ /dev/null @@ -1,28 +0,0 @@ -shader_type canvas_item; - -uniform sampler2D tex2view_tex; -uniform sampler2D tex2viewlsb_tex; -uniform sampler2D brush_texture : hint_white; -uniform vec2 brush_pos = vec2(0.5, 0.5); -uniform vec2 brush_ppos = vec2(0.5, 0.5); -uniform vec2 brush_size = vec2(0.25, 0.25); -uniform float brush_strength = 1.0; -uniform vec4 brush_color = vec4(1.0, 0.0, 0.0, 1.0); - -float brush(float v) { - return clamp(v / (1.0-brush_strength), 0.0, 1.0); -} - -void fragment() { - vec4 t2v = texture(tex2view_tex, UV); - vec4 t2vlsb = texture(tex2viewlsb_tex, UV); - vec2 xy = t2v.xy+t2vlsb.xy/256.0; - vec2 b = brush_pos/brush_size; - vec2 bv = (brush_ppos-brush_pos)/brush_size; - vec2 p = xy/brush_size; - float x = clamp(dot(p-b, bv)/dot(bv, bv), 0.0, 1.0); - float a = 1.0-length(p-(b+x*bv)); - a = brush(max(0.0, a))*brush_color.w*t2v.z; - vec4 color = brush_color*texture(brush_texture, 2.0*vec2(brush_size.y/brush_size.x, 1.0)*xy); - COLOR = vec4(color.xyz, a); -} diff --git a/addons/procedural_material/paint_tool/paint.tscn b/addons/procedural_material/paint_tool/paint.tscn deleted file mode 100644 index b8aac52..0000000 --- a/addons/procedural_material/paint_tool/paint.tscn +++ /dev/null @@ -1,1229 +0,0 @@ -[gd_scene load_steps=38 format=2] - -[ext_resource path="res://addons/procedural_material/paint_tool/paint.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/panoramas/park.hdr" type="Texture" id=2] -[ext_resource path="res://addons/procedural_material/paint_tool/showbrush.shader" type="Shader" id=3] -[ext_resource path="res://addons/procedural_material/paint_tool/view2texture.shader" type="Shader" id=4] -[ext_resource path="res://addons/procedural_material/paint_tool/texture2view.shader" type="Shader" id=5] -[ext_resource path="res://addons/procedural_material/paint_tool/texture2view_lsb.shader" type="Shader" id=6] -[ext_resource path="res://addons/procedural_material/paint_tool/paint.shader" type="Shader" id=7] -[ext_resource path="res://addons/procedural_material/paint_tool/paint_nm.shader" type="Shader" id=8] -[ext_resource path="res://addons/procedural_material/paint_tool/icons/paint.png" type="Texture" id=9] -[ext_resource path="res://addons/procedural_material/paint_tool/icons/paint_s.png" type="Texture" id=10] -[ext_resource path="res://addons/procedural_material/paint_tool/icons/line.png" type="Texture" id=11] -[ext_resource path="res://addons/procedural_material/paint_tool/icons/line_s.png" type="Texture" id=12] -[ext_resource path="res://addons/procedural_material/paint_tool/icons/line_strip.png" type="Texture" id=13] -[ext_resource path="res://addons/procedural_material/paint_tool/icons/line_strip_s.png" type="Texture" id=14] - -[sub_resource type="PanoramaSky" id=1] - -radiance_size = 4 -panorama = ExtResource( 2 ) - -[sub_resource type="Environment" id=2] - -background_mode = 2 -background_sky = SubResource( 1 ) -background_sky_custom_fov = 0.0 -background_color = Color( 0, 0, 0, 1 ) -background_energy = 1.0 -background_canvas_max_layer = 0 -ambient_light_color = Color( 0, 0, 0, 1 ) -ambient_light_energy = 1.0 -ambient_light_sky_contribution = 1.0 -fog_enabled = false -fog_color = Color( 0.5, 0.6, 0.7, 1 ) -fog_sun_color = Color( 1, 0.9, 0.7, 1 ) -fog_sun_amount = 0.0 -fog_depth_enabled = true -fog_depth_begin = 10.0 -fog_depth_curve = 1.0 -fog_transmit_enabled = false -fog_transmit_curve = 1.0 -fog_height_enabled = false -fog_height_min = 0.0 -fog_height_max = 100.0 -fog_height_curve = 1.0 -tonemap_mode = 0 -tonemap_exposure = 1.0 -tonemap_white = 1.0 -auto_exposure_enabled = false -auto_exposure_scale = 0.4 -auto_exposure_min_luma = 0.05 -auto_exposure_max_luma = 8.0 -auto_exposure_speed = 0.5 -ss_reflections_enabled = false -ss_reflections_max_steps = 64 -ss_reflections_fade_in = 0.15 -ss_reflections_fade_out = 2.0 -ss_reflections_depth_tolerance = 0.2 -ss_reflections_roughness = true -ssao_enabled = false -ssao_radius = 1.0 -ssao_intensity = 1.0 -ssao_radius2 = 0.0 -ssao_intensity2 = 1.0 -ssao_bias = 0.01 -ssao_light_affect = 0.0 -ssao_color = Color( 0, 0, 0, 1 ) -ssao_quality = 0 -ssao_blur = 3 -ssao_edge_sharpness = 4.0 -dof_blur_far_enabled = false -dof_blur_far_distance = 10.0 -dof_blur_far_transition = 5.0 -dof_blur_far_amount = 0.1 -dof_blur_far_quality = 1 -dof_blur_near_enabled = false -dof_blur_near_distance = 2.0 -dof_blur_near_transition = 1.0 -dof_blur_near_amount = 0.1 -dof_blur_near_quality = 1 -glow_enabled = false -glow_levels/1 = false -glow_levels/2 = false -glow_levels/3 = true -glow_levels/4 = false -glow_levels/5 = true -glow_levels/6 = false -glow_levels/7 = false -glow_intensity = 0.8 -glow_strength = 1.0 -glow_bloom = 0.0 -glow_blend_mode = 2 -glow_hdr_threshold = 1.0 -glow_hdr_scale = 2.0 -glow_bicubic_upscale = false -adjustment_enabled = false -adjustment_brightness = 1.0 -adjustment_contrast = 1.0 -adjustment_saturation = 1.0 -_sections_unfolded = [ "Background" ] - -[sub_resource type="World" id=3] - -environment = SubResource( 2 ) - -[sub_resource type="CubeMesh" id=4] - -custom_aabb = AABB( 0, 0, 0, 0, 0, 0 ) -size = Vector3( 1, 1, 1 ) -subdivide_width = 0 -subdivide_height = 0 -subdivide_depth = 0 - -[sub_resource type="ViewportTexture" id=27] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="ViewportTexture" id=28] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="ViewportTexture" id=29] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="SpatialMaterial" id=8] - -render_priority = 0 -flags_transparent = false -flags_unshaded = false -flags_vertex_lighting = false -flags_no_depth_test = false -flags_use_point_size = false -flags_world_triplanar = false -flags_fixed_size = false -flags_albedo_tex_force_srgb = false -vertex_color_use_as_albedo = false -vertex_color_is_srgb = false -params_diffuse_mode = 0 -params_specular_mode = 0 -params_blend_mode = 0 -params_cull_mode = 0 -params_depth_draw_mode = 0 -params_line_width = 1.0 -params_point_size = 1.0 -params_billboard_mode = 0 -params_grow = false -params_use_alpha_scissor = false -albedo_color = Color( 1, 1, 1, 1 ) -albedo_texture = SubResource( 27 ) -metallic = 1.0 -metallic_specular = 0.5 -metallic_texture = SubResource( 28 ) -metallic_texture_channel = 0 -roughness = 1.0 -roughness_texture = SubResource( 28 ) -roughness_texture_channel = 1 -emission_enabled = false -normal_enabled = true -normal_scale = 1.0 -normal_texture = SubResource( 29 ) -rim_enabled = false -clearcoat_enabled = false -anisotropy_enabled = false -ao_enabled = false -depth_enabled = false -subsurf_scatter_enabled = false -transmission_enabled = false -refraction_enabled = false -detail_enabled = false -uv1_scale = Vector3( 1, 1, 1 ) -uv1_offset = Vector3( 0, 0, 0 ) -uv1_triplanar = false -uv1_triplanar_sharpness = 1.0 -uv2_scale = Vector3( 1, 1, 1 ) -uv2_offset = Vector3( 0, 0, 0 ) -uv2_triplanar = false -uv2_triplanar_sharpness = 1.0 -proximity_fade_enable = false -distance_fade_enable = false - -[sub_resource type="ShaderMaterial" id=9] - -render_priority = 0 -shader = ExtResource( 3 ) -shader_param/brush_pos = Vector2( 0.745497, 0.0291262 ) -shader_param/brush_ppos = Vector2( 0.745497, 0.0291262 ) -shader_param/brush_size = Vector2( 0.032498, 0.0575589 ) -shader_param/brush_strength = 0.939 - -[sub_resource type="Shader" id=10] - -code = "" - -[sub_resource type="ShaderMaterial" id=11] - -render_priority = 0 -shader = SubResource( 10 ) - -[sub_resource type="ShaderMaterial" id=12] - -render_priority = 0 -shader = ExtResource( 4 ) - -[sub_resource type="ViewportTexture" id=30] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="ShaderMaterial" id=14] - -render_priority = 0 -shader = ExtResource( 5 ) -shader_param/model_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2 ) -shader_param/fovy_degrees = 70.0 -shader_param/z_near = 0.05 -shader_param/z_far = 25.0 -shader_param/aspect = 1.77778 -shader_param/view2texture = SubResource( 30 ) - -[sub_resource type="ViewportTexture" id=13] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="ShaderMaterial" id=15] - -render_priority = 0 -shader = ExtResource( 6 ) -shader_param/model_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -2 ) -shader_param/fovy_degrees = 70.0 -shader_param/z_near = 0.05 -shader_param/z_far = 25.0 -shader_param/aspect = 1.77778 -shader_param/view2texture = SubResource( 13 ) - -[sub_resource type="ViewportTexture" id=16] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("Texture2View/Viewport") - -[sub_resource type="ViewportTexture" id=25] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="ViewportTexture" id=26] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="ShaderMaterial" id=18] - -render_priority = 0 -shader = ExtResource( 7 ) -shader_param/brush_pos = Vector2( 0.480031, 0.783634 ) -shader_param/brush_ppos = Vector2( 0.480031, 0.783634 ) -shader_param/brush_size = Vector2( 0.0391543, 0.0693481 ) -shader_param/brush_strength = 0.5 -shader_param/brush_color = Color( 1, 0, 0, 1 ) -shader_param/tex2view_tex = SubResource( 25 ) -shader_param/tex2viewlsb_tex = SubResource( 26 ) -_sections_unfolded = [ "shader_param" ] - -[sub_resource type="ShaderMaterial" id=19] - -render_priority = 0 -shader = ExtResource( 7 ) -shader_param/brush_pos = Vector2( 0.480031, 0.783634 ) -shader_param/brush_ppos = Vector2( 0.480031, 0.783634 ) -shader_param/brush_size = Vector2( 0.0391543, 0.0693481 ) -shader_param/brush_strength = 0.5 -shader_param/brush_color = Color( 1, 1, 1, 1 ) -shader_param/tex2view_tex = SubResource( 25 ) -shader_param/tex2viewlsb_tex = SubResource( 26 ) -_sections_unfolded = [ "shader_param" ] - -[sub_resource type="ViewportTexture" id=31] - -resource_local_to_scene = true -flags = 0 -viewport_path = NodePath("") - -[sub_resource type="ShaderMaterial" id=20] - -render_priority = 0 -shader = ExtResource( 8 ) -shader_param/brush_pos = Vector2( 0.181676, 0.37448 ) -shader_param/brush_ppos = Vector2( 0.181676, 0.37448 ) -shader_param/brush_size = Vector2( 0.032498, 0.0575589 ) -shader_param/brush_strength = 0.939 -shader_param/self_tex = SubResource( 29 ) -shader_param/tex2view_tex = SubResource( 31 ) -_sections_unfolded = [ "shader_param" ] - -[node name="PaintTool" type="ViewportContainer" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -stretch = true -stretch_shrink = 1 -script = ExtResource( 1 ) -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="." index="0"] - -arvr = false -size = Vector2( 1280, 720 ) -own_world = false -world = SubResource( 3 ) -transparent_bg = false -msaa = 0 -hdr = true -disable_3d = false -usage = 2 -debug_draw = 0 -render_target_v_flip = false -render_target_clear_mode = 0 -render_target_update_mode = 3 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Rendering" ] - -[node name="CameraStand" type="Spatial" parent="Viewport" index="0"] - -[node name="Camera" type="Camera" parent="Viewport/CameraStand" index="0"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2 ) -keep_aspect = 1 -cull_mask = 1048575 -environment = null -h_offset = 0.0 -v_offset = 0.0 -doppler_tracking = 0 -projection = 0 -current = true -fov = 70.0 -size = 1.0 -near = 0.05 -far = 25.0 -_sections_unfolded = [ "Transform" ] - -[node name="OmniLight" type="OmniLight" parent="Viewport/CameraStand" index="1"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.04372, 0, 1.98915 ) -layers = 1 -light_color = Color( 1, 1, 1, 1 ) -light_energy = 1.0 -light_indirect_energy = 1.0 -light_negative = false -light_specular = 0.5 -light_bake_mode = 1 -light_cull_mask = -1 -shadow_enabled = false -shadow_color = Color( 0, 0, 0, 1 ) -shadow_bias = 0.15 -shadow_contact = 0.0 -shadow_reverse_cull_face = false -editor_only = false -omni_range = 5.0 -omni_attenuation = 1.0 -omni_shadow_mode = 1 -omni_shadow_detail = 1 - -[node name="PaintedMesh" type="MeshInstance" parent="Viewport" index="1"] - -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -mesh = SubResource( 4 ) -skeleton = NodePath("..") -material/0 = SubResource( 8 ) -_sections_unfolded = [ "material" ] - -[node name="Brush" type="ColorRect" parent="." index="1"] - -material = SubResource( 9 ) -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 2 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 1, 1, 1, 1 ) -_sections_unfolded = [ "Material", "Mouse" ] - -[node name="Texture" type="ColorRect" parent="." index="2"] - -visible = false -self_modulate = Color( 1, 1, 1, 0.502745 ) -material = SubResource( 11 ) -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 2 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 1, 1, 1, 1 ) -_sections_unfolded = [ "Material", "Mouse", "Visibility" ] - -[node name="View2Texture" type="Node" parent="." index="3"] - -editor/display_folded = true -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="View2Texture" index="0"] - -arvr = false -size = Vector2( 1280, 720 ) -own_world = true -world = null -transparent_bg = true -msaa = 0 -hdr = true -disable_3d = false -usage = 2 -debug_draw = 1 -render_target_v_flip = true -render_target_clear_mode = 0 -render_target_update_mode = 3 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Render Target", "Rendering" ] - -[node name="Camera" type="Camera" parent="View2Texture/Viewport" index="0"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2 ) -keep_aspect = 1 -cull_mask = 1048575 -environment = null -h_offset = 0.0 -v_offset = 0.0 -doppler_tracking = 0 -projection = 0 -current = true -fov = 70.0 -size = 1.0 -near = 0.05 -far = 100.0 -_sections_unfolded = [ "Transform", "Visibility" ] - -[node name="PaintedMesh" type="MeshInstance" parent="View2Texture/Viewport" index="1"] - -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -mesh = SubResource( 4 ) -skeleton = NodePath("..") -material/0 = SubResource( 12 ) -_sections_unfolded = [ "material" ] - -[node name="Texture2View" type="Node" parent="." index="4"] - -editor/display_folded = true -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="Texture2View" index="0"] - -arvr = false -size = Vector2( 2048, 2048 ) -own_world = true -world = null -transparent_bg = true -msaa = 0 -hdr = true -disable_3d = false -usage = 2 -debug_draw = 1 -render_target_v_flip = false -render_target_clear_mode = 0 -render_target_update_mode = 0 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Render Target", "Rendering" ] - -[node name="Camera" type="Camera" parent="Texture2View/Viewport" index="0"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 20 ) -keep_aspect = 1 -cull_mask = 1048575 -environment = null -h_offset = 0.0 -v_offset = 0.0 -doppler_tracking = 0 -projection = 1 -current = true -fov = 70.0 -size = 1.0 -near = 0.05 -far = 100.0 -_sections_unfolded = [ "Transform", "Visibility" ] - -[node name="PaintedMesh" type="MeshInstance" parent="Texture2View/Viewport" index="1"] - -transform = Transform( 1, -5.09656e-008, 1.56295e-008, 5.09656e-008, 1, 5.78721e-010, -1.56295e-008, -5.78721e-010, 1, 0, 0, 0 ) -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -mesh = SubResource( 4 ) -skeleton = NodePath("..") -material/0 = SubResource( 14 ) -_sections_unfolded = [ "material" ] - -[node name="Texture2ViewLsb" type="Node" parent="." index="5"] - -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="Texture2ViewLsb" index="0"] - -arvr = false -size = Vector2( 2048, 2048 ) -own_world = true -world = null -transparent_bg = true -msaa = 0 -hdr = true -disable_3d = false -usage = 2 -debug_draw = 1 -render_target_v_flip = false -render_target_clear_mode = 0 -render_target_update_mode = 0 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Render Target", "Rendering" ] - -[node name="Camera" type="Camera" parent="Texture2ViewLsb/Viewport" index="0"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 20 ) -keep_aspect = 1 -cull_mask = 1048575 -environment = null -h_offset = 0.0 -v_offset = 0.0 -doppler_tracking = 0 -projection = 1 -current = true -fov = 70.0 -size = 1.0 -near = 0.05 -far = 100.0 -_sections_unfolded = [ "Transform", "Visibility" ] - -[node name="PaintedMesh" type="MeshInstance" parent="Texture2ViewLsb/Viewport" index="1"] - -transform = Transform( 1, -5.09656e-008, 1.56295e-008, 5.09656e-008, 1, 5.78721e-010, -1.56295e-008, -5.78721e-010, 1, 0, 0, 0 ) -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -mesh = SubResource( 4 ) -skeleton = NodePath("..") -material/0 = SubResource( 15 ) -_sections_unfolded = [ "material" ] - -[node name="FixSeams" type="Node" parent="." index="6"] - -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="FixSeams" index="0"] - -arvr = false -size = Vector2( 2048, 2048 ) -own_world = true -world = null -transparent_bg = true -msaa = 0 -hdr = true -disable_3d = true -usage = 0 -debug_draw = 0 -render_target_v_flip = true -render_target_clear_mode = 1 -render_target_update_mode = 3 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Render Target", "Rendering" ] - -[node name="TextureRect1" type="TextureRect" parent="FixSeams/Viewport" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_left = 8.0 -margin_right = 2056.0 -margin_bottom = 2048.0 -rect_min_size = Vector2( 1024, 1024 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -texture = SubResource( 16 ) -stretch_mode = 0 -_sections_unfolded = [ "Material", "Rect" ] - -[node name="TextureRect2" type="TextureRect" parent="FixSeams/Viewport" index="1"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_left = -8.0 -margin_right = 2040.0 -margin_bottom = 2048.0 -rect_min_size = Vector2( 1024, 1024 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -texture = SubResource( 16 ) -stretch_mode = 0 -_sections_unfolded = [ "Material", "Rect" ] - -[node name="TextureRect3" type="TextureRect" parent="FixSeams/Viewport" index="2"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 8.0 -margin_right = 2048.0 -margin_bottom = 2056.0 -rect_min_size = Vector2( 1024, 1024 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -texture = SubResource( 16 ) -stretch_mode = 0 -_sections_unfolded = [ "Material", "Rect" ] - -[node name="TextureRect4" type="TextureRect" parent="FixSeams/Viewport" index="3"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = -8.0 -margin_right = 2048.0 -margin_bottom = 2040.0 -rect_min_size = Vector2( 1024, 1024 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -texture = SubResource( 16 ) -stretch_mode = 0 -_sections_unfolded = [ "Material", "Rect" ] - -[node name="TextureRect5" type="TextureRect" parent="FixSeams/Viewport" index="4"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 2048.0 -margin_bottom = 2048.0 -rect_min_size = Vector2( 1024, 1024 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -texture = SubResource( 16 ) -stretch_mode = 0 -_sections_unfolded = [ "Material", "Rect" ] - -[node name="AlbedoPaint" type="Node" parent="." index="7"] - -editor/display_folded = true -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="AlbedoPaint" index="0"] - -editor/display_folded = true -arvr = false -size = Vector2( 2048, 2048 ) -own_world = true -world = null -transparent_bg = true -msaa = 0 -hdr = true -disable_3d = true -usage = 0 -debug_draw = 0 -render_target_v_flip = true -render_target_clear_mode = 1 -render_target_update_mode = 1 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Render Target", "Rendering" ] - -[node name="PaintRect" type="ColorRect" parent="AlbedoPaint/Viewport" index="0"] - -material = SubResource( 18 ) -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 2048.0 -margin_bottom = 2048.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 1, 1, 1, 1 ) -_sections_unfolded = [ "Material", "Rect" ] - -[node name="InitRect" type="ColorRect" parent="AlbedoPaint/Viewport" index="1"] - -visible = false -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 2048.0 -margin_bottom = 2048.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 1, 1, 1, 1 ) -_sections_unfolded = [ "Material", "Rect" ] - -[node name="MRPaint" type="Node" parent="." index="8"] - -editor/display_folded = true -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="MRPaint" index="0"] - -editor/display_folded = true -arvr = false -size = Vector2( 2048, 2048 ) -own_world = true -world = null -transparent_bg = true -msaa = 0 -hdr = true -disable_3d = true -usage = 0 -debug_draw = 0 -render_target_v_flip = true -render_target_clear_mode = 1 -render_target_update_mode = 1 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Render Target", "Rendering" ] - -[node name="PaintRect" type="ColorRect" parent="MRPaint/Viewport" index="0"] - -material = SubResource( 19 ) -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 2048.0 -margin_bottom = 2048.0 -rect_min_size = Vector2( 1024, 1024 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 1, 1, 1, 1 ) -_sections_unfolded = [ "Material", "Rect" ] - -[node name="InitRect" type="ColorRect" parent="MRPaint/Viewport" index="1"] - -visible = false -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 2048.0 -margin_bottom = 2048.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 1, 1, 1, 1 ) -_sections_unfolded = [ "Material", "Rect" ] - -[node name="NormalPaint" type="Node" parent="." index="9"] - -_sections_unfolded = [ "Rect" ] - -[node name="Viewport" type="Viewport" parent="NormalPaint" index="0"] - -arvr = false -size = Vector2( 2048, 2048 ) -own_world = true -world = null -transparent_bg = true -msaa = 0 -hdr = true -disable_3d = true -usage = 0 -debug_draw = 0 -render_target_v_flip = true -render_target_clear_mode = 1 -render_target_update_mode = 1 -audio_listener_enable_2d = false -audio_listener_enable_3d = false -physics_object_picking = false -gui_disable_input = false -gui_snap_controls_to_pixels = true -shadow_atlas_size = 0 -shadow_atlas_quad_0 = 2 -shadow_atlas_quad_1 = 2 -shadow_atlas_quad_2 = 3 -shadow_atlas_quad_3 = 4 -_sections_unfolded = [ "Render Target", "Rendering" ] - -[node name="PaintRect" type="ColorRect" parent="NormalPaint/Viewport" index="0"] - -material = SubResource( 20 ) -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 2048.0 -margin_bottom = 2048.0 -rect_min_size = Vector2( 1024, 1024 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 1, 1, 1, 1 ) -_sections_unfolded = [ "Material", "Rect" ] - -[node name="InitRect" type="ColorRect" parent="NormalPaint/Viewport" index="1"] - -visible = false -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 2048.0 -margin_bottom = 2048.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -color = Color( 0.498039, 0.498039, 0, 1 ) -_sections_unfolded = [ "Material", "Rect" ] - -[node name="Tools" type="VBoxContainer" parent="." index="10"] - -editor/display_folded = true -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 64.0 -margin_bottom = 64.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -alignment = 0 -_sections_unfolded = [ "Rect" ] - -[node name="Free" type="TextureButton" parent="Tools" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 64.0 -margin_bottom = 64.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = true -enabled_focus_mode = 2 -shortcut = null -group = null -texture_normal = ExtResource( 9 ) -texture_pressed = ExtResource( 10 ) -_sections_unfolded = [ "Textures" ] - -[node name="Line" type="TextureButton" parent="Tools" index="1"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 68.0 -margin_right = 64.0 -margin_bottom = 132.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = true -enabled_focus_mode = 2 -shortcut = null -group = null -texture_normal = ExtResource( 11 ) -texture_pressed = ExtResource( 12 ) -_sections_unfolded = [ "Textures" ] - -[node name="Strip" type="TextureButton" parent="Tools" index="2"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 136.0 -margin_right = 64.0 -margin_bottom = 200.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = true -enabled_focus_mode = 2 -shortcut = null -group = null -texture_normal = ExtResource( 13 ) -texture_pressed = ExtResource( 14 ) -_sections_unfolded = [ "Textures" ] - -[node name="Debug" type="Button" parent="Tools" index="3"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 204.0 -margin_right = 64.0 -margin_bottom = 224.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -text = "Debug" -flat = false -align = 1 -_sections_unfolded = [ "Rect" ] - -[node name="Save" type="Button" parent="Tools" index="4"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 228.0 -margin_right = 64.0 -margin_bottom = 248.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -text = "Save" -flat = false -align = 1 -_sections_unfolded = [ "Rect" ] - -[node name="Material" type="VBoxContainer" parent="." index="11"] - -editor/display_folded = true -anchor_left = 1.0 -anchor_top = 0.0 -anchor_right = 1.0 -anchor_bottom = 0.0 -margin_left = -100.0 -margin_bottom = 68.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 1 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -alignment = 0 - -[node name="OptionButton" type="OptionButton" parent="Material" index="0"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 100.0 -margin_bottom = 20.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -action_mode = 0 -enabled_focus_mode = 2 -shortcut = null -group = null -text = "none" -flat = false -align = 0 -items = [ "none", null, false, -1, null, "bricks", null, false, -1, null, "metal_pattern", null, false, -1, null, "rusted_metal", null, false, -1, null, "wooden_floor", null, false, -1, null ] -selected = 0 -_sections_unfolded = [ "Rect" ] - -[node name="AlbedoColor" type="ColorPickerButton" parent="Material" index="1"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 24.0 -margin_right = 100.0 -margin_bottom = 44.0 -rect_min_size = Vector2( 50, 0 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -flat = false -align = 1 -color = Color( 1, 1, 1, 1 ) -edit_alpha = true -_sections_unfolded = [ "Rect" ] - -[node name="MRColor" type="ColorPickerButton" parent="Material" index="2"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_top = 48.0 -margin_right = 100.0 -margin_bottom = 68.0 -rect_min_size = Vector2( 50, 0 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -flat = false -align = 1 -color = Color( 1, 1, 1, 1 ) -edit_alpha = true -_sections_unfolded = [ "Rect" ] - -[connection signal="gui_input" from="." to="." method="_on_Test_gui_input"] - -[connection signal="resized" from="." to="." method="_on_resized"] - -[connection signal="pressed" from="Tools/Free" to="." method="set_current_tool" binds= [ 2 ]] - -[connection signal="pressed" from="Tools/Line" to="." method="set_current_tool" binds= [ 3 ]] - -[connection signal="pressed" from="Tools/Strip" to="." method="set_current_tool" binds= [ 4 ]] - -[connection signal="pressed" from="Tools/Debug" to="." method="debug"] - -[connection signal="pressed" from="Tools/Save" to="." method="save"] - -[connection signal="item_selected" from="Material/OptionButton" to="." method="select_material"] - - diff --git a/addons/procedural_material/paint_tool/paint_nm.shader b/addons/procedural_material/paint_tool/paint_nm.shader deleted file mode 100644 index 28d508b..0000000 --- a/addons/procedural_material/paint_tool/paint_nm.shader +++ /dev/null @@ -1,28 +0,0 @@ -shader_type canvas_item; - -uniform sampler2D self_tex; -uniform sampler2D tex2view_tex; -uniform sampler2D brush_texture : hint_normal; -uniform vec2 brush_pos = vec2(0.5, 0.5); -uniform vec2 brush_ppos = vec2(0.5, 0.5); -uniform vec2 brush_size = vec2(0.25, 0.25); -uniform float brush_strength = 1.0; - -float brush(float v) { - return clamp(v / (1.0-brush_strength), 0.0, 1.0); -} - -void fragment() { - vec4 t2v = textureLod(tex2view_tex, UV, 0.0); - vec2 xy = t2v.xy; - vec2 b = brush_pos/brush_size; - vec2 bv = (brush_ppos-brush_pos)/brush_size; - vec2 p = xy/brush_size; - float x = clamp(dot(p-b, bv)/dot(bv, bv), 0.0, 1.0); - float a = 1.0-length(p-(b+x*bv)); - a = brush(max(0.0, a))*t2v.z; - vec3 old = texture(self_tex, UV).xyz; - vec3 new = texture(brush_texture, 2.0*vec2(brush_size.y/brush_size.x, 1.0)*xy).xyz; - vec3 color = normalize(mix(old, new, a)-vec3(0.5)); - COLOR = vec4(0.5*color+0.5, 1.0); -} diff --git a/addons/procedural_material/paint_tool/paint_window.gd b/addons/procedural_material/paint_tool/paint_window.gd deleted file mode 100644 index d027e38..0000000 --- a/addons/procedural_material/paint_tool/paint_window.gd +++ /dev/null @@ -1,8 +0,0 @@ -tool -extends WindowDialog - -func _ready(): - pass - -func set_object(o): - $PaintTool.set_mesh(o.name, o.mesh) diff --git a/addons/procedural_material/paint_tool/paint_window.tscn b/addons/procedural_material/paint_tool/paint_window.tscn deleted file mode 100644 index 00ab97a..0000000 --- a/addons/procedural_material/paint_tool/paint_window.tscn +++ /dev/null @@ -1,28 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://addons/procedural_material/paint_tool/paint_window.gd" type="Script" id=1] -[ext_resource path="res://addons/procedural_material/paint_tool/paint.tscn" type="PackedScene" id=2] - -[node name="PaintWindow" type="WindowDialog"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 1277.0 -margin_bottom = 721.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -popup_exclusive = true -window_title = "Material Spray" -resizable = true -script = ExtResource( 1 ) -_sections_unfolded = [ "Popup" ] - -[node name="PaintTool" parent="." index="1" instance=ExtResource( 2 )] - - diff --git a/addons/procedural_material/paint_tool/pt_button.tscn b/addons/procedural_material/paint_tool/pt_button.tscn deleted file mode 100644 index f2d5bd5..0000000 --- a/addons/procedural_material/paint_tool/pt_button.tscn +++ /dev/null @@ -1,29 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://addons/procedural_material/paint_tool/icons/paint.png" type="Texture" id=1] - -[node name="TextureButton" type="TextureButton"] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_right = 24.0 -margin_bottom = 24.0 -rect_min_size = Vector2( 24, 24 ) -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -focus_mode = 2 -mouse_filter = 0 -mouse_default_cursor_shape = 0 -size_flags_horizontal = 1 -size_flags_vertical = 1 -toggle_mode = false -enabled_focus_mode = 2 -shortcut = null -group = null -texture_normal = ExtResource( 1 ) -expand = true -_sections_unfolded = [ "Rect", "Textures" ] - - diff --git a/addons/procedural_material/paint_tool/show_uv.shader b/addons/procedural_material/paint_tool/show_uv.shader deleted file mode 100644 index 1d5b731..0000000 --- a/addons/procedural_material/paint_tool/show_uv.shader +++ /dev/null @@ -1,6 +0,0 @@ -shader_type spatial; -render_mode unshaded; - -void fragment() { - ALBEDO = vec3(UV, 0.0); -} diff --git a/addons/procedural_material/paint_tool/showbrush.shader b/addons/procedural_material/paint_tool/showbrush.shader deleted file mode 100644 index b3eee3b..0000000 --- a/addons/procedural_material/paint_tool/showbrush.shader +++ /dev/null @@ -1,21 +0,0 @@ -shader_type canvas_item; - -uniform sampler2D brush_texture : hint_albedo; -uniform vec2 brush_pos = vec2(0.5, 0.5); -uniform vec2 brush_ppos = vec2(0.5, 0.5); -uniform vec2 brush_size = vec2(0.25, 0.25); -uniform float brush_strength = 0.5; - -float brush(float v) { - return clamp(v / (1.0-brush_strength), 0.0, 1.0); -} - -void fragment() { - vec2 b = brush_pos/brush_size; - vec2 bv = (brush_ppos-brush_pos)/brush_size; - vec2 p = UV/brush_size; - float x = clamp(dot(p-b, bv)/dot(bv, bv), 0.0, 1.0); - float a = 1.0-length(p-(b+x*bv)); - a = brush(max(0.0, a)); - COLOR = vec4(vec3(1.0), 0.5*a); -} diff --git a/addons/procedural_material/paint_tool/texture2view.shader b/addons/procedural_material/paint_tool/texture2view.shader deleted file mode 100644 index 394ffd8..0000000 --- a/addons/procedural_material/paint_tool/texture2view.shader +++ /dev/null @@ -1,62 +0,0 @@ -shader_type spatial; -render_mode unshaded, cull_front; - -uniform sampler2D view2texture; -uniform mat4 model_transform; -uniform float fovy_degrees = 45; -uniform float z_near = 0.01; -uniform float z_far = 60.0; -uniform float aspect = 1.0; - -varying vec4 global_position; -varying vec3 normal; - -mat4 get_projection_matrix() { - float PI = 3.14159265359; - - float rads = fovy_degrees / 2.0 * PI / 180.0; - - float deltaZ = z_far - z_near; - float sine = sin(rads); - - if (deltaZ == 0.0 || sine == 0.0 || aspect == 0.0) - return mat4(0.0); - - float cotangent = cos(rads) / sine; - - mat4 matrix = mat4(1.0); - matrix[0][0] = cotangent / aspect; - matrix[1][1] = cotangent; - matrix[2][2] = (z_far + z_near) / deltaZ; - matrix[2][3] = 1.0; //try +1 - matrix[3][2] = 2.0 * z_near * z_far / deltaZ; - - matrix[3][3] = 0.0; - - return matrix; -} - -void vertex() { - global_position = model_transform*vec4(VERTEX, 1.0); - normal = (model_transform*vec4(NORMAL, 0.0)).xyz; - VERTEX=vec3(UV.x, UV.y, 0.0); - COLOR=vec4(1.0); -} - -vec2 fix_unshaded(vec2 xy) { - return pow(xy, vec2(2.22)); -} - -void fragment() { - vec4 color = get_projection_matrix()*vec4(global_position.xyz, 1.0); - color.xyz /= color.w; - vec3 xyz = vec3(0.5-0.5*color.x, 0.5+0.5*color.y, -0.5*color.z); - vec4 v2t = textureLod(view2texture, xyz.xy, 0.0); - xyz.xy = floor(xyz.xy*255.0)/255.0; - vec2 delta = v2t.xy-UV.xy; - float visible = 0.0; - if (color.x > -1.0 && color.x < 1.0 && color.y > -1.0 && color.y < 1.0) { - visible = clamp(100.0*dot(normalize(normal), normalize(color.xyz)), 0.0, 1.0)*max(0.0, 1.0-4.0*pow(dot(delta, delta), 2.0)); - } - ALBEDO = vec3(fix_unshaded(xyz.xy), visible); -} diff --git a/addons/procedural_material/paint_tool/texture2view_lsb.shader b/addons/procedural_material/paint_tool/texture2view_lsb.shader deleted file mode 100644 index 0e1a7a7..0000000 --- a/addons/procedural_material/paint_tool/texture2view_lsb.shader +++ /dev/null @@ -1,56 +0,0 @@ -shader_type spatial; -render_mode unshaded, cull_front; - -uniform sampler2D view2texture; -uniform mat4 model_transform; -uniform float fovy_degrees = 45; -uniform float z_near = 0.01; -uniform float z_far = 60.0; -uniform float aspect = 1.0; - -varying vec4 global_position; -varying vec3 normal; - -mat4 get_projection_matrix() { - float PI = 3.14159265359; - - float rads = fovy_degrees / 2.0 * PI / 180.0; - - float deltaZ = z_far - z_near; - float sine = sin(rads); - - if (deltaZ == 0.0 || sine == 0.0 || aspect == 0.0) - return mat4(0.0); - - float cotangent = cos(rads) / sine; - - mat4 matrix = mat4(1.0); - matrix[0][0] = cotangent / aspect; - matrix[1][1] = cotangent; - matrix[2][2] = (z_far + z_near) / deltaZ; - matrix[2][3] = 1.0; //try +1 - matrix[3][2] = 2.0 * z_near * z_far / deltaZ; - - matrix[3][3] = 0.0; - - return matrix; -} - -void vertex() { - global_position = model_transform*vec4(VERTEX, 1.0); - normal = (model_transform*vec4(NORMAL, 0.0)).xyz; - VERTEX=vec3(UV.x, UV.y, 0.0); - COLOR=vec4(1.0); -} - -vec2 fix_unshaded(vec2 xy) { - return pow(xy, vec2(2.22)); -} - -void fragment() { - vec4 color = get_projection_matrix()*vec4(global_position.xyz, 1.0); - color.xyz /= color.w; - vec3 xyz = vec3(0.5-0.5*color.x, 0.5+0.5*color.y, -0.5*color.z); - xyz.xy = fract(xyz.xy*255.0); - ALBEDO = vec3(fix_unshaded(xyz.xy), 0.0); -} diff --git a/addons/procedural_material/paint_tool/view2texture.shader b/addons/procedural_material/paint_tool/view2texture.shader deleted file mode 100644 index 59ce8d7..0000000 --- a/addons/procedural_material/paint_tool/view2texture.shader +++ /dev/null @@ -1,10 +0,0 @@ -shader_type spatial; -render_mode unshaded; - -vec3 fix_unshaded(vec3 xy) { - return pow(xy, vec3(2.22)); -} - -void fragment() { - ALBEDO = fix_unshaded(vec3(UV, VERTEX.z)); -} diff --git a/addons/procedural_material/panoramas/experiment.hdr.import b/addons/procedural_material/panoramas/experiment.hdr.import deleted file mode 100644 index 2993c51..0000000 --- a/addons/procedural_material/panoramas/experiment.hdr.import +++ /dev/null @@ -1,29 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/experiment.hdr-d18e99e31a5e03809d487620198f72b4.stex" - -[deps] - -source_file="res://addons/procedural_material/panoramas/experiment.hdr" -dest_files=[ "res://.import/experiment.hdr-d18e99e31a5e03809d487620198f72b4.stex" ] - -[params] - -compress/mode=1 -compress/lossy_quality=0.1 -compress/hdr_mode=1 -compress/normal_map=2 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/addons/procedural_material/panoramas/lobby.hdr.import b/addons/procedural_material/panoramas/lobby.hdr.import deleted file mode 100644 index 0d7848a..0000000 --- a/addons/procedural_material/panoramas/lobby.hdr.import +++ /dev/null @@ -1,29 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/lobby.hdr-6fc8fec9aa03ce8405278cd0e68f7a42.stex" - -[deps] - -source_file="res://addons/procedural_material/panoramas/lobby.hdr" -dest_files=[ "res://.import/lobby.hdr-6fc8fec9aa03ce8405278cd0e68f7a42.stex" ] - -[params] - -compress/mode=1 -compress/lossy_quality=0.1 -compress/hdr_mode=1 -compress/normal_map=2 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/addons/procedural_material/panoramas/night.hdr.import b/addons/procedural_material/panoramas/night.hdr.import deleted file mode 100644 index d830f40..0000000 --- a/addons/procedural_material/panoramas/night.hdr.import +++ /dev/null @@ -1,29 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/night.hdr-b83487dc308f39913d6b85bbf9e8feb0.stex" - -[deps] - -source_file="res://addons/procedural_material/panoramas/night.hdr" -dest_files=[ "res://.import/night.hdr-b83487dc308f39913d6b85bbf9e8feb0.stex" ] - -[params] - -compress/mode=1 -compress/lossy_quality=0.1 -compress/hdr_mode=1 -compress/normal_map=2 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/addons/procedural_material/panoramas/park.hdr.import b/addons/procedural_material/panoramas/park.hdr.import deleted file mode 100644 index d7584a3..0000000 --- a/addons/procedural_material/panoramas/park.hdr.import +++ /dev/null @@ -1,29 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/park.hdr-1e56c84521c4230f03b191409247d136.stex" - -[deps] - -source_file="res://addons/procedural_material/panoramas/park.hdr" -dest_files=[ "res://.import/park.hdr-1e56c84521c4230f03b191409247d136.stex" ] - -[params] - -compress/mode=1 -compress/lossy_quality=0.1 -compress/hdr_mode=1 -compress/normal_map=2 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/addons/procedural_material/panoramas/schelde.hdr.import b/addons/procedural_material/panoramas/schelde.hdr.import deleted file mode 100644 index 04a4ed5..0000000 --- a/addons/procedural_material/panoramas/schelde.hdr.import +++ /dev/null @@ -1,29 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/schelde.hdr-b680943616a80a290fb3e52fcaf638d7.stex" - -[deps] - -source_file="res://addons/procedural_material/panoramas/schelde.hdr" -dest_files=[ "res://.import/schelde.hdr-b680943616a80a290fb3e52fcaf638d7.stex" ] - -[params] - -compress/mode=1 -compress/lossy_quality=0.1 -compress/hdr_mode=1 -compress/normal_map=2 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/addons/procedural_material/plugin.gd b/addons/procedural_material/plugin.gd deleted file mode 100644 index d27f31f..0000000 --- a/addons/procedural_material/plugin.gd +++ /dev/null @@ -1,96 +0,0 @@ -tool -extends EditorPlugin - -var mm_button = null -var material_maker = null -var edited_object = null - -var pt_button = null -var paint_tool = null - -func _enter_tree(): - #material_maker = preload("res://addons/procedural_material/pm_material_maker.tscn").instance() - #add_control_to_bottom_panel(material_maker, "ProceduralMaterial") - print("Adding menu item") - mm_button = Button.new() - mm_button.connect("pressed", self, "open_material_maker") - mm_button.text = "Material Maker" - add_control_to_container(CONTAINER_TOOLBAR, mm_button) - print("done") - -func _exit_tree(): - #remove_control_from_bottom_panel(material_maker) - if mm_button != null: - remove_control_from_container(CONTAINER_TOOLBAR, mm_button) - mm_button.queue_free() - if pt_button != null: - remove_control_from_container(CONTAINER_SPATIAL_EDITOR_MENU, pt_button) - pt_button.queue_free() - pt_button = null - if material_maker != null: - material_maker.hide() - material_maker.queue_free() - material_maker = null - if paint_tool != null: - paint_tool.hide() - paint_tool.queue_free() - paint_tool = null - -func _get_state(): - var s = { mm_button=mm_button, material_maker=material_maker } - return s - -func _set_state(s): - mm_button = s.mm_button - material_maker = s.material_maker - -func open_material_maker(): - if material_maker == null: - material_maker = load("res://addons/procedural_material/window_dialog.tscn").instance() - add_child(material_maker) - material_maker.popup_centered() - -func handles(object): - return object is MeshInstance - -func edit(object): - edited_object = object - -func make_visible(b): - if b: - pt_button = preload("res://addons/procedural_material/paint_tool/pt_button.tscn").instance() - pt_button.connect("pressed", self, "paint") - add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, pt_button) - else: - edited_object = null - remove_control_from_container(CONTAINER_SPATIAL_EDITOR_MENU, pt_button) - pt_button.queue_free() - pt_button = null - -func paint(): - paint_tool = preload("res://addons/procedural_material/paint_tool/paint_window.tscn").instance() - add_child(paint_tool) - paint_tool.set_object(edited_object) - paint_tool.connect("popup_hide", self, "free_paint_tool") - paint_tool.get_node("PaintTool").connect("update_material", self, "assign_material") - paint_tool.popup_centered() - -func free_paint_tool(): - paint_tool.queue_free() - paint_tool = null - -func assign_material(m): - var texture - var editor_file_system = get_editor_interface().get_resource_filesystem() - editor_file_system.scan() - editor_file_system.update_file(m.albedo) - texture = load(m.albedo) - m.material.albedo_texture = texture - editor_file_system.update_file(m.mr) - texture = load(m.mr) - m.material.metallic_texture = texture - m.material.roughness_texture = texture - editor_file_system.update_file(m.nm) - texture = load(m.nm) - m.material.normal_texture = texture - edited_object.set_surface_material(0, m.material) diff --git a/export_presets.cfg b/export_presets.cfg index d854865..67c308b 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -5,8 +5,8 @@ platform="Windows Desktop" runnable=true custom_features="" export_filter="resources" -export_files=PoolStringArray( "res://addons/procedural_material/common.shader", "res://addons/procedural_material/graph_edit.gd", "res://addons/procedural_material/graph_edit.tscn", "res://addons/procedural_material/library.gd", "res://addons/procedural_material/main_window.gd", "res://addons/procedural_material/main_window.tscn", "res://addons/procedural_material/node_base.gd", "res://addons/procedural_material/nodes/adjust_hsv.gd", "res://addons/procedural_material/nodes/adjust_hsv.tscn", "res://addons/procedural_material/nodes/blend.gd", "res://addons/procedural_material/nodes/blend.tscn", "res://addons/procedural_material/nodes/blur.gd", "res://addons/procedural_material/nodes/blur.tscn", "res://addons/procedural_material/nodes/bricks.gd", "res://addons/procedural_material/nodes/bricks.tscn", "res://addons/procedural_material/nodes/colorize.gd", "res://addons/procedural_material/nodes/colorize.tscn", "res://addons/procedural_material/nodes/combine.gd", "res://addons/procedural_material/nodes/combine.tscn", "res://addons/procedural_material/nodes/decompose.gd", "res://addons/procedural_material/nodes/decompose.tscn", "res://addons/procedural_material/nodes/emboss.gd", "res://addons/procedural_material/nodes/emboss.tscn", "res://addons/procedural_material/nodes/export.gd", "res://addons/procedural_material/nodes/export.tscn", "res://addons/procedural_material/nodes/godot_logo.png", "res://addons/procedural_material/nodes/image.gd", "res://addons/procedural_material/nodes/image.tscn", "res://addons/procedural_material/nodes/material.gd", "res://addons/procedural_material/nodes/material.tscn", "res://addons/procedural_material/nodes/noise.gd", "res://addons/procedural_material/nodes/noise.tscn", "res://addons/procedural_material/nodes/normal_map.gd", "res://addons/procedural_material/nodes/normal_map.tscn", "res://addons/procedural_material/nodes/pattern.gd", "res://addons/procedural_material/nodes/pattern.tscn", "res://addons/procedural_material/nodes/perlin.gd", "res://addons/procedural_material/nodes/perlin.tscn", "res://addons/procedural_material/nodes/transform.gd", "res://addons/procedural_material/nodes/transform.tscn", "res://addons/procedural_material/nodes/uniform.gd", "res://addons/procedural_material/nodes/uniform.tscn", "res://addons/procedural_material/nodes/voronoi.gd", "res://addons/procedural_material/nodes/voronoi.tscn", "res://addons/procedural_material/nodes/warp.gd", "res://addons/procedural_material/nodes/warp.tscn", "res://addons/procedural_material/panoramas/experiment.hdr", "res://addons/procedural_material/panoramas/lobby.hdr", "res://addons/procedural_material/panoramas/night.hdr", "res://addons/procedural_material/panoramas/park.hdr", "res://addons/procedural_material/panoramas/schelde.hdr", "res://addons/procedural_material/pm_editor.gd", "res://addons/procedural_material/pm_editor.tscn", "res://addons/procedural_material/preview.gd", "res://addons/procedural_material/preview.tscn", "res://addons/procedural_material/widgets/about.gd", "res://addons/procedural_material/widgets/about.tscn", "res://addons/procedural_material/widgets/facebook.png", "res://addons/procedural_material/widgets/github.png", "res://addons/procedural_material/widgets/gradient_editor.gd", "res://addons/procedural_material/widgets/gradient_editor.tscn", "res://addons/procedural_material/widgets/icon.png", "res://addons/procedural_material/widgets/line_dialog.gd", "res://addons/procedural_material/widgets/line_dialog.tscn", "res://addons/procedural_material/widgets/twitter.png", "res://addons/procedural_material/widgets/youtube.png", "res://addons/procedural_material/window_dialog.tscn", "res://icon.png" ) -include_filter="*.json,res://addons/procedural_material/library/base/*.png" +export_files=PoolStringArray( "res://addons/material_maker/common.shader", "res://addons/material_maker/graph_edit.gd", "res://addons/material_maker/graph_edit.tscn", "res://addons/material_maker/library.gd", "res://addons/material_maker/main_window.gd", "res://addons/material_maker/main_window.tscn", "res://addons/material_maker/node_base.gd", "res://addons/material_maker/nodes/adjust_hsv.gd", "res://addons/material_maker/nodes/adjust_hsv.tscn", "res://addons/material_maker/nodes/blend.gd", "res://addons/material_maker/nodes/blend.tscn", "res://addons/material_maker/nodes/blur.gd", "res://addons/material_maker/nodes/blur.tscn", "res://addons/material_maker/nodes/bricks.gd", "res://addons/material_maker/nodes/bricks.tscn", "res://addons/material_maker/nodes/colorize.gd", "res://addons/material_maker/nodes/colorize.tscn", "res://addons/material_maker/nodes/combine.gd", "res://addons/material_maker/nodes/combine.tscn", "res://addons/material_maker/nodes/decompose.gd", "res://addons/material_maker/nodes/decompose.tscn", "res://addons/material_maker/nodes/emboss.gd", "res://addons/material_maker/nodes/emboss.tscn", "res://addons/material_maker/nodes/export.gd", "res://addons/material_maker/nodes/export.tscn", "res://addons/material_maker/nodes/godot_logo.png", "res://addons/material_maker/nodes/image.gd", "res://addons/material_maker/nodes/image.tscn", "res://addons/material_maker/nodes/material.gd", "res://addons/material_maker/nodes/material.tscn", "res://addons/material_maker/nodes/noise.gd", "res://addons/material_maker/nodes/noise.tscn", "res://addons/material_maker/nodes/normal_map.gd", "res://addons/material_maker/nodes/normal_map.tscn", "res://addons/material_maker/nodes/pattern.gd", "res://addons/material_maker/nodes/pattern.tscn", "res://addons/material_maker/nodes/perlin.gd", "res://addons/material_maker/nodes/perlin.tscn", "res://addons/material_maker/nodes/transform.gd", "res://addons/material_maker/nodes/transform.tscn", "res://addons/material_maker/nodes/uniform.gd", "res://addons/material_maker/nodes/uniform.tscn", "res://addons/material_maker/nodes/voronoi.gd", "res://addons/material_maker/nodes/voronoi.tscn", "res://addons/material_maker/nodes/warp.gd", "res://addons/material_maker/nodes/warp.tscn", "res://addons/material_maker/panoramas/experiment.hdr", "res://addons/material_maker/panoramas/lobby.hdr", "res://addons/material_maker/panoramas/night.hdr", "res://addons/material_maker/panoramas/park.hdr", "res://addons/material_maker/panoramas/schelde.hdr", "res://addons/material_maker/pm_editor.gd", "res://addons/material_maker/pm_editor.tscn", "res://addons/material_maker/preview.gd", "res://addons/material_maker/preview.tscn", "res://addons/material_maker/widgets/about.gd", "res://addons/material_maker/widgets/about.tscn", "res://addons/material_maker/widgets/facebook.png", "res://addons/material_maker/widgets/github.png", "res://addons/material_maker/widgets/gradient_editor.gd", "res://addons/material_maker/widgets/gradient_editor.tscn", "res://addons/material_maker/widgets/icon.png", "res://addons/material_maker/widgets/line_dialog.gd", "res://addons/material_maker/widgets/line_dialog.tscn", "res://addons/material_maker/widgets/twitter.png", "res://addons/material_maker/widgets/youtube.png", "res://addons/material_maker/window_dialog.tscn", "res://icon.png" ) +include_filter="*.json,res://addons/material_maker/library/base/*.png" exclude_filter="*.ptex" patch_list=PoolStringArray( ) @@ -26,3 +26,24 @@ application/product_name="" application/file_description="" application/copyright="" application/trademarks="" + +[preset.1] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="resources" +export_files=PoolStringArray( "res://addons/material_maker/common.shader", "res://addons/material_maker/graph_edit.gd", "res://addons/material_maker/graph_edit.tscn", "res://addons/material_maker/library.gd", "res://addons/material_maker/main_window.gd", "res://addons/material_maker/main_window.tscn", "res://addons/material_maker/node_base.gd", "res://addons/material_maker/nodes/adjust_hsv.gd", "res://addons/material_maker/nodes/adjust_hsv.tscn", "res://addons/material_maker/nodes/blend.gd", "res://addons/material_maker/nodes/blend.tscn", "res://addons/material_maker/nodes/blur.gd", "res://addons/material_maker/nodes/blur.tscn", "res://addons/material_maker/nodes/bricks.gd", "res://addons/material_maker/nodes/bricks.tscn", "res://addons/material_maker/nodes/colorize.gd", "res://addons/material_maker/nodes/colorize.tscn", "res://addons/material_maker/nodes/combine.gd", "res://addons/material_maker/nodes/combine.tscn", "res://addons/material_maker/nodes/decompose.gd", "res://addons/material_maker/nodes/decompose.tscn", "res://addons/material_maker/nodes/emboss.gd", "res://addons/material_maker/nodes/emboss.tscn", "res://addons/material_maker/nodes/export.gd", "res://addons/material_maker/nodes/export.tscn", "res://addons/material_maker/nodes/godot_logo.png", "res://addons/material_maker/nodes/image.gd", "res://addons/material_maker/nodes/image.tscn", "res://addons/material_maker/nodes/material.gd", "res://addons/material_maker/nodes/material.tscn", "res://addons/material_maker/nodes/noise.gd", "res://addons/material_maker/nodes/noise.tscn", "res://addons/material_maker/nodes/normal_map.gd", "res://addons/material_maker/nodes/normal_map.tscn", "res://addons/material_maker/nodes/pattern.gd", "res://addons/material_maker/nodes/pattern.tscn", "res://addons/material_maker/nodes/perlin.gd", "res://addons/material_maker/nodes/perlin.tscn", "res://addons/material_maker/nodes/transform.gd", "res://addons/material_maker/nodes/transform.tscn", "res://addons/material_maker/nodes/uniform.gd", "res://addons/material_maker/nodes/uniform.tscn", "res://addons/material_maker/nodes/voronoi.gd", "res://addons/material_maker/nodes/voronoi.tscn", "res://addons/material_maker/nodes/warp.gd", "res://addons/material_maker/nodes/warp.tscn", "res://addons/material_maker/panoramas/experiment.hdr", "res://addons/material_maker/panoramas/lobby.hdr", "res://addons/material_maker/panoramas/night.hdr", "res://addons/material_maker/panoramas/park.hdr", "res://addons/material_maker/panoramas/schelde.hdr", "res://addons/material_maker/pm_editor.gd", "res://addons/material_maker/pm_editor.tscn", "res://addons/material_maker/preview.gd", "res://addons/material_maker/preview.tscn", "res://addons/material_maker/widgets/about.gd", "res://addons/material_maker/widgets/about.tscn", "res://addons/material_maker/widgets/facebook.png", "res://addons/material_maker/widgets/github.png", "res://addons/material_maker/widgets/gradient_editor.gd", "res://addons/material_maker/widgets/gradient_editor.tscn", "res://addons/material_maker/widgets/icon.png", "res://addons/material_maker/widgets/line_dialog.gd", "res://addons/material_maker/widgets/line_dialog.tscn", "res://addons/material_maker/widgets/twitter.png", "res://addons/material_maker/widgets/youtube.png", "res://addons/material_maker/window_dialog.tscn", "res://icon.png" ) +include_filter="*.json,res://addons/material_maker/library/base/*.png" +exclude_filter="*.ptex" +patch_list=PoolStringArray( ) + +[preset.1.options] + +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +binary_format/64_bits=true +custom_template/release="" +custom_template/debug="" diff --git a/project.godot b/project.godot index e893ed4..46bb8a0 100644 --- a/project.godot +++ b/project.godot @@ -11,11 +11,11 @@ config_version=3 [application] config/name="Material Maker" -run/main_scene="res://addons/procedural_material/main_window.tscn" +run/main_scene="res://addons/material_maker/main_window.tscn" config/use_custom_user_dir=true config/custom_user_dir_name="material_maker" config/icon="res://icon.png" -config/release="0.4" +config/release="0.5" [display] @@ -24,7 +24,7 @@ window/size/height=720 [editor_plugins] -enabled=PoolStringArray( "procedural_material" ) +enabled=PoolStringArray( "material_maker" ) [rendering] diff --git a/test/suzanne.mesh b/test/suzanne.mesh deleted file mode 100644 index 00fdd84..0000000 Binary files a/test/suzanne.mesh and /dev/null differ diff --git a/test/test.tscn b/test/test.tscn deleted file mode 100644 index 3fd8db9..0000000 --- a/test/test.tscn +++ /dev/null @@ -1,295 +0,0 @@ -[gd_scene load_steps=9 format=2] - -[ext_resource path="res://test/suzanne.mesh" type="ArrayMesh" id=1] -[ext_resource path="res://addons/procedural_material/panoramas/park.hdr" type="Texture" id=2] - -[sub_resource type="CubeMesh" id=1] - -custom_aabb = AABB( 0, 0, 0, 0, 0, 0 ) -size = Vector3( 2, 2, 2 ) -subdivide_width = 0 -subdivide_height = 0 -subdivide_depth = 0 - -[sub_resource type="SpatialMaterial" id=2] - -render_priority = 0 -flags_transparent = false -flags_unshaded = false -flags_vertex_lighting = false -flags_no_depth_test = false -flags_use_point_size = false -flags_world_triplanar = false -flags_fixed_size = false -flags_albedo_tex_force_srgb = false -vertex_color_use_as_albedo = false -vertex_color_is_srgb = false -params_diffuse_mode = 0 -params_specular_mode = 0 -params_blend_mode = 0 -params_cull_mode = 0 -params_depth_draw_mode = 0 -params_line_width = 1.0 -params_point_size = 1.0 -params_billboard_mode = 0 -params_grow = false -params_use_alpha_scissor = false -albedo_color = Color( 1, 1, 1, 1 ) -metallic = 1.0 -metallic_specular = 0.5 -metallic_texture_channel = 0 -roughness = 1.0 -roughness_texture_channel = 0 -emission_enabled = false -normal_enabled = false -rim_enabled = false -clearcoat_enabled = false -anisotropy_enabled = false -ao_enabled = false -depth_enabled = false -subsurf_scatter_enabled = false -transmission_enabled = false -refraction_enabled = false -detail_enabled = false -uv1_scale = Vector3( 1, 1, 1 ) -uv1_offset = Vector3( 0, 0, 0 ) -uv1_triplanar = false -uv1_triplanar_sharpness = 1.0 -uv2_scale = Vector3( 1, 1, 1 ) -uv2_offset = Vector3( 0, 0, 0 ) -uv2_triplanar = false -uv2_triplanar_sharpness = 1.0 -proximity_fade_enable = false -distance_fade_enable = false -_sections_unfolded = [ "Albedo", "Detail" ] - -[sub_resource type="SpatialMaterial" id=3] - -render_priority = 0 -flags_transparent = false -flags_unshaded = false -flags_vertex_lighting = false -flags_no_depth_test = false -flags_use_point_size = false -flags_world_triplanar = false -flags_fixed_size = false -flags_albedo_tex_force_srgb = false -vertex_color_use_as_albedo = false -vertex_color_is_srgb = false -params_diffuse_mode = 0 -params_specular_mode = 0 -params_blend_mode = 0 -params_cull_mode = 0 -params_depth_draw_mode = 0 -params_line_width = 1.0 -params_point_size = 1.0 -params_billboard_mode = 0 -params_grow = false -params_use_alpha_scissor = false -albedo_color = Color( 1, 1, 1, 1 ) -metallic = 0.0 -metallic_specular = 0.5 -metallic_texture_channel = 0 -roughness = 0.0 -roughness_texture_channel = 0 -emission_enabled = false -normal_enabled = false -rim_enabled = false -clearcoat_enabled = false -anisotropy_enabled = false -ao_enabled = false -depth_enabled = false -subsurf_scatter_enabled = false -transmission_enabled = false -refraction_enabled = false -detail_enabled = false -uv1_scale = Vector3( 1, 1, 1 ) -uv1_offset = Vector3( 0, 0, 0 ) -uv1_triplanar = false -uv1_triplanar_sharpness = 1.0 -uv2_scale = Vector3( 1, 1, 1 ) -uv2_offset = Vector3( 0, 0, 0 ) -uv2_triplanar = false -uv2_triplanar_sharpness = 1.0 -proximity_fade_enable = false -distance_fade_enable = false - -[sub_resource type="PrismMesh" id=4] - -custom_aabb = AABB( 0, 0, 0, 0, 0, 0 ) -left_to_right = 0.5 -size = Vector3( 2, 2, 2 ) -subdivide_width = 0 -subdivide_height = 0 -subdivide_depth = 0 - -[sub_resource type="PanoramaSky" id=5] - -radiance_size = 4 -panorama = ExtResource( 2 ) - -[sub_resource type="Environment" id=6] - -background_mode = 2 -background_sky = SubResource( 5 ) -background_sky_custom_fov = 0.0 -background_color = Color( 0, 0, 0, 1 ) -background_energy = 1.0 -background_canvas_max_layer = 0 -ambient_light_color = Color( 0, 0, 0, 1 ) -ambient_light_energy = 1.0 -ambient_light_sky_contribution = 1.0 -fog_enabled = false -fog_color = Color( 0.5, 0.6, 0.7, 1 ) -fog_sun_color = Color( 1, 0.9, 0.7, 1 ) -fog_sun_amount = 0.0 -fog_depth_enabled = true -fog_depth_begin = 10.0 -fog_depth_curve = 1.0 -fog_transmit_enabled = false -fog_transmit_curve = 1.0 -fog_height_enabled = false -fog_height_min = 0.0 -fog_height_max = 100.0 -fog_height_curve = 1.0 -tonemap_mode = 0 -tonemap_exposure = 1.0 -tonemap_white = 1.0 -auto_exposure_enabled = false -auto_exposure_scale = 0.4 -auto_exposure_min_luma = 0.05 -auto_exposure_max_luma = 8.0 -auto_exposure_speed = 0.5 -ss_reflections_enabled = false -ss_reflections_max_steps = 64 -ss_reflections_fade_in = 0.15 -ss_reflections_fade_out = 2.0 -ss_reflections_depth_tolerance = 0.2 -ss_reflections_roughness = true -ssao_enabled = false -ssao_radius = 1.0 -ssao_intensity = 1.0 -ssao_radius2 = 0.0 -ssao_intensity2 = 1.0 -ssao_bias = 0.01 -ssao_light_affect = 0.0 -ssao_color = Color( 0, 0, 0, 1 ) -ssao_quality = 0 -ssao_blur = 3 -ssao_edge_sharpness = 4.0 -dof_blur_far_enabled = false -dof_blur_far_distance = 10.0 -dof_blur_far_transition = 5.0 -dof_blur_far_amount = 0.1 -dof_blur_far_quality = 1 -dof_blur_near_enabled = false -dof_blur_near_distance = 2.0 -dof_blur_near_transition = 1.0 -dof_blur_near_amount = 0.1 -dof_blur_near_quality = 1 -glow_enabled = false -glow_levels/1 = false -glow_levels/2 = false -glow_levels/3 = true -glow_levels/4 = false -glow_levels/5 = true -glow_levels/6 = false -glow_levels/7 = false -glow_intensity = 0.8 -glow_strength = 1.0 -glow_bloom = 0.19 -glow_blend_mode = 2 -glow_hdr_threshold = 1.0 -glow_hdr_scale = 2.0 -glow_bicubic_upscale = false -adjustment_enabled = false -adjustment_brightness = 1.0 -adjustment_contrast = 1.0 -adjustment_saturation = 1.0 -_sections_unfolded = [ "Background" ] - -[node name="Spatial" type="Spatial" index="0"] - -[node name="Cube" type="MeshInstance" parent="." index="0"] - -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -mesh = SubResource( 1 ) -skeleton = NodePath("..") -material/0 = SubResource( 2 ) -_sections_unfolded = [ "material" ] - -[node name="Suzanne" type="MeshInstance" parent="." index="1"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4, 1, 0 ) -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -mesh = ExtResource( 1 ) -skeleton = NodePath("..") -material/0 = SubResource( 3 ) -_sections_unfolded = [ "material" ] - -[node name="Prism" type="MeshInstance" parent="." index="2"] - -transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4, 0, 0 ) -layers = 1 -material_override = null -cast_shadow = 1 -extra_cull_margin = 0.0 -use_in_baked_light = false -lod_min_distance = 0.0 -lod_min_hysteresis = 0.0 -lod_max_distance = 0.0 -lod_max_hysteresis = 0.0 -mesh = SubResource( 4 ) -skeleton = NodePath("..") -material/0 = SubResource( 2 ) -_sections_unfolded = [ "material" ] - -[node name="WorldEnvironment" type="WorldEnvironment" parent="." index="3"] - -environment = SubResource( 6 ) - -[node name="DirectionalLight" type="DirectionalLight" parent="." index="4"] - -transform = Transform( 1, 0, 0, 0, -4.37114e-008, 1, 0, -1, -4.37114e-008, 0, 6, 0 ) -layers = 1 -light_color = Color( 1, 1, 1, 1 ) -light_energy = 1.0 -light_indirect_energy = 1.0 -light_negative = false -light_specular = 0.5 -light_bake_mode = 1 -light_cull_mask = -1 -shadow_enabled = false -shadow_color = Color( 0, 0, 0, 1 ) -shadow_bias = 0.1 -shadow_contact = 0.0 -shadow_reverse_cull_face = false -editor_only = false -directional_shadow_mode = 2 -directional_shadow_split_1 = 0.1 -directional_shadow_split_2 = 0.2 -directional_shadow_split_3 = 0.5 -directional_shadow_blend_splits = false -directional_shadow_normal_bias = 0.8 -directional_shadow_bias_split_scale = 0.25 -directional_shadow_depth_range = 0 -directional_shadow_max_distance = 200.0 -_sections_unfolded = [ "Light" ] - -