Initial commit.

This commit is contained in:
Nekojimi 2025-04-20 20:55:30 +01:00
parent 9e71b6c6bd
commit 7d05048b1f
286 changed files with 13236 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

1
.gitignore vendored
View File

@ -15,3 +15,4 @@ export_presets.cfg
data_*/
mono_crash.*.json
/android/

37
TerrainGen.gd Normal file
View File

@ -0,0 +1,37 @@
@tool
extends GridMap
class_name TerrainGen
signal map_changed()
@export var region: Rect2i = Rect2i(0,0,200,200):
set(value):
region = value
generate()
@export var noise: Noise:
set(value):
noise = value
generate()
@export var max_height: int = 10:
set(value):
max_height = value
generate()
func _ready() -> void:
generate()
func generate() -> void:
clear()
if noise == null:
return
for x in range(region.position.x, region.size.x):
for y in range(region.position.y, region.size.y):
var point: Vector2i = Vector2i(x,y)
var noise_point: Vector2 = Vector2(point)
var val: float = noise.get_noise_2d(noise_point.x, noise_point.y)
var height: int = floori(((val + 1)/2.0) * max_height)
var point_3d: Vector3i = Vector3i(point.x, height, point.y)
set_cell_item(point_3d, 0)
map_changed.emit()

1
TerrainGen.gd.uid Normal file
View File

@ -0,0 +1 @@
uid://b7hc3l8i50646

21
addons/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 iiMidknightii
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,350 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="PathExtrude3D.svg"
inkscape:version="1.4-rc1 (61ec3f2, 2024-09-26)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1">
<inkscape:path-effect
effect="powermask"
id="path-effect7"
is_visible="true"
lpeversion="1"
uri="#mask-powermask-path-effect7"
invert="false"
hide_mask="false"
background="true"
background_color="#ffffffff" />
<filter
id="mask-powermask-path-effect6_inverse"
inkscape:label="filtermask-powermask-path-effect6"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect6_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect6_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect9_inverse"
inkscape:label="filtermask-powermask-path-effect9"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect9_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect9_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect10_inverse"
inkscape:label="filtermask-powermask-path-effect10"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect10_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect10_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect11_inverse"
inkscape:label="filtermask-powermask-path-effect11"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect11_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect11_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect12_inverse"
inkscape:label="filtermask-powermask-path-effect12"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect12_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect12_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect13_inverse"
inkscape:label="filtermask-powermask-path-effect13"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect13_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect13_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect15_inverse"
inkscape:label="filtermask-powermask-path-effect15"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect15_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect15_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect16_inverse"
inkscape:label="filtermask-powermask-path-effect16"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect16_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect16_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect17_inverse"
inkscape:label="filtermask-powermask-path-effect17"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect17_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect17_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect19_inverse"
inkscape:label="filtermask-powermask-path-effect19"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect19_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect19_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect20_inverse"
inkscape:label="filtermask-powermask-path-effect20"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect20_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect20_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect21_inverse"
inkscape:label="filtermask-powermask-path-effect21"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect21_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect21_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect23_inverse"
inkscape:label="filtermask-powermask-path-effect23"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect23_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect23_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect24_inverse"
inkscape:label="filtermask-powermask-path-effect24"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect24_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect24_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect25_inverse"
inkscape:label="filtermask-powermask-path-effect25"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect25_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect25_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
</defs>
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="59.78125"
inkscape:cx="9.0663879"
inkscape:cy="7.2514375"
inkscape:window-width="3840"
inkscape:window-height="2131"
inkscape:window-x="1341"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
style="fill:none;stroke:#fc7f7f;stroke-linejoin:round;stroke-dasharray:0.5, 0.5;stroke-dashoffset:0.2"
d="m 1.5,14.122024 c 0,0 2.756775,-0.533036 3.623285,-1.514151 C 5.920321,11.70542 5.421506,10.127583 6.09349,9.1285207 6.736053,8.1731991 8.825218,7.0148981 8.825218,7.0148981"
id="path2-5-2-4"
sodipodi:nodetypes="caac" />
<rect
style="fill:none;stroke:#8da5f3;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect25"
width="6"
height="6"
x="1.5"
y="8.5"
rx="2.7755576e-17" />
<use
x="0"
y="0"
xlink:href="#rect25"
id="use25"
transform="translate(7,-7)" />
<path
style="fill:none;stroke:#fc7f7f;stroke-linejoin:round;stroke-dasharray:0.5, 0.5;stroke-dashoffset:0.2"
d="m 7.2751478,14.423122 c 0,0 2.7567752,-0.533036 3.6232852,-1.514151 0.797036,-0.902453 0.298221,-2.48029 0.970205,-3.4793527 0.642563,-0.9553215 2.731728,-2.1136225 2.731728,-2.1136225"
id="path2-5"
sodipodi:nodetypes="caac" />
<path
style="fill:none;stroke:#fc7f7f;stroke-linejoin:round;stroke-dasharray:0.5, 0.5;stroke-dashoffset:0.2"
d="m 7.1747823,8.6071256 c 0,0 2.7567747,-0.533036 3.6232847,-1.514151 0.797036,-0.902453 0.298221,-2.48029 0.970205,-3.479352 C 12.410835,2.658301 14.5,1.5 14.5,1.5"
id="path2-5-2"
sodipodi:nodetypes="caac" />
<path
style="fill:none;stroke:#fc7f7f;stroke-linejoin:round;stroke-dasharray:0.5, 0.5;stroke-dashoffset:0.2"
d="m 1.3755139,8.6907639 c 0,0 2.7567751,-0.533036 3.6232849,-1.514151 0.797036,-0.902453 0.298221,-2.48029 0.970205,-3.4793521 0.642563,-0.9553215 2.731728,-2.1136225 2.731728,-2.1136225"
id="path2"
sodipodi:nodetypes="caac" />
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://8eb8hcla5i0u"
path="res://.godot/imported/PathExtrude3D.svg-d52ee0a8b6d6a0e2a8770d6722511a3d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/PathMesh3D/icons/PathExtrude3D.svg"
dest_files=["res://.godot/imported/PathExtrude3D.svg-d52ee0a8b6d6a0e2a8770d6722511a3d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="PathMesh3D.svg"
inkscape:version="1.4-rc1 (61ec3f2, 2024-09-26)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="59.78125"
inkscape:cx="7.2430737"
inkscape:cy="6.9001568"
inkscape:window-width="3840"
inkscape:window-height="2131"
inkscape:window-x="1341"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
fill="#fc7f7f"
d="M 2.8662419,8.502729 A 0.99914324,0.99914324 0 1 0 1.5024113,9.8665596 v 3.2676984 a 0.99914324,0.99914324 0 1 0 1.3638306,1.363331 h 3.2676979 a 0.99914324,0.99914324 0 1 0 1.363331,-1.363831 V 9.86606 A 0.99914324,0.99914324 0 1 0 6.1334403,8.502729 Z m 0.3412074,0.9991433 h 2.925991 A 0.99914324,0.99914324 0 0 0 6.497628,9.8665596 V 12.792051 L 3.2069497,9.5018723 Z M 2.501055,10.208267 5.7907341,13.498446 H 2.8647431 A 0.99914324,0.99914324 0 0 0 2.5005554,13.133758 v -2.925491 z"
id="path1"
style="stroke-width:0.499572" />
<path
fill="#fc7f7f"
d="M 9.8662413,1.502411 A 0.99914324,0.99914324 0 1 0 8.5024107,2.8662416 V 6.13394 A 0.99914324,0.99914324 0 1 0 9.8662413,7.497271 H 13.133939 A 0.99914324,0.99914324 0 1 0 14.49727,6.13344 V 2.865742 A 0.99914324,0.99914324 0 1 0 13.13344,1.502411 Z m 0.3412077,0.9991433 h 2.925991 a 0.99914324,0.99914324 0 0 0 0.364187,0.3646873 V 5.791733 L 10.206949,2.5015543 Z M 9.5010544,3.207949 12.790733,6.498128 H 9.8647425 A 0.99914324,0.99914324 0 0 0 9.5005548,6.13344 V 3.207949 Z"
id="path1-8"
style="stroke-width:0.499572" />
<path
style="fill:none;stroke:#fc7f7f;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:0.5,0.5;stroke-dashoffset:0"
d="M 1.973863,9.0162049 8.915839,1.9069524"
id="path2" />
<use
x="0"
y="0"
xlink:href="#path2"
id="use2"
transform="translate(5.3528489,5.0015682)"
style="stroke-dasharray:0.5,0.5;stroke-dashoffset:0" />
<use
x="0"
y="0"
xlink:href="#path2"
id="use2-9"
transform="translate(4.7098797,0.43125979)"
style="stroke-dasharray:0.5,0.5;stroke-dashoffset:0" />
<use
x="0"
y="0"
xlink:href="#path2"
id="use2-9-5"
transform="translate(0.01365865,5.2406428)"
style="stroke-dasharray:0.5,0.5;stroke-dashoffset:0" />
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bh5p7hkaa8hie"
path="res://.godot/imported/PathMesh3D.svg-eb764ef0d374aa9048b4a6fb2fc562f4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/PathMesh3D/icons/PathMesh3D.svg"
dest_files=["res://.godot/imported/PathMesh3D.svg-eb764ef0d374aa9048b4a6fb2fc562f4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b6nqpkc7x77ix"
path="res://.godot/imported/PathMesh3DIcon.png-04c24475cefba24f106467cd168d7ccf.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/PathMesh3D/icons/PathMesh3DIcon.png"
dest_files=["res://.godot/imported/PathMesh3DIcon.png-04c24475cefba24f106467cd168d7ccf.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="128"
height="128"
version="1.1"
id="svg1"
sodipodi:docname="PathMesh3DIcon.svg"
inkscape:version="1.4-rc1 (61ec3f2, 2024-09-26)"
inkscape:export-filename="PathMesh3DIcon.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="7.4726563"
inkscape:cx="92.336643"
inkscape:cy="60.018818"
inkscape:window-width="3840"
inkscape:window-height="2131"
inkscape:window-x="1341"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
fill="#fc7f7f"
d="M 17.796179,68.527115 A 8.9922901,8.9922901 0 1 0 5.5217021,80.801592 v 29.409288 a 8.9922901,8.9922901 0 1 0 12.2744769,12.26998 h 29.409284 a 8.9922901,8.9922901 0 1 0 12.26998,-12.27448 V 80.797096 A 8.9922901,8.9922901 0 1 0 47.200967,68.527115 Z m 3.070867,8.992291 h 26.333921 a 8.9922901,8.9922901 0 0 0 3.27769,3.282186 V 107.13102 L 20.862549,77.519406 Z m -6.35755,6.357553 29.607115,29.611611 H 17.782689 A 8.9922901,8.9922901 0 0 0 14.505,110.20638 V 83.876959 Z"
id="path1"
style="stroke-width:4.49615" />
<path
fill="#fc7f7f"
d="M 80.79618,5.5242472 A 8.9922901,8.9922901 0 1 0 68.521703,17.798724 V 47.208012 A 8.9922901,8.9922901 0 1 0 80.79618,59.477993 h 29.40928 A 8.9922901,8.9922901 0 1 0 122.47544,47.203512 V 17.794227 A 8.9922901,8.9922901 0 1 0 110.20097,5.5242472 Z m 3.070869,8.9922908 h 26.333921 a 8.9922901,8.9922901 0 0 0 3.27768,3.282186 V 44.128149 L 83.862549,14.516538 Z m -6.357552,6.357553 29.607113,29.611614 H 80.78269 A 8.9922901,8.9922901 0 0 0 77.505001,47.203512 V 20.874091 Z"
id="path1-8"
style="stroke-width:4.49615" />
<path
style="fill:none;stroke:#fc7f7f;stroke-width:9;stroke-linejoin:round;stroke-opacity:1;stroke-dasharray:4.5,4.5;stroke-dashoffset:0"
d="M 9.7647678,73.148399 72.242558,9.1651201"
id="path2" />
<use
x="0"
y="0"
xlink:href="#path2"
id="use2"
transform="translate(48.175645,45.014118)"
style="stroke-dasharray:0.5,0.5;stroke-dashoffset:0" />
<use
x="0"
y="0"
xlink:href="#path2"
id="use2-9"
transform="translate(42.388922,3.8813385)"
style="stroke-dasharray:0.5,0.5;stroke-dashoffset:0" />
<use
x="0"
y="0"
xlink:href="#path2"
id="use2-9-5"
transform="translate(0.12292786,47.16579)"
style="stroke-dasharray:0.5,0.5;stroke-dashoffset:0" />
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c77khe5dqwb3h"
path="res://.godot/imported/PathMesh3DIcon.svg-4d77d3947e234f16cb0dade5ee147492.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/PathMesh3D/icons/PathMesh3DIcon.svg"
dest_files=["res://.godot/imported/PathMesh3DIcon.svg-4d77d3947e234f16cb0dade5ee147492.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,414 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="PathMultiMesh3Dsvg.svg"
inkscape:version="1.4-rc1 (61ec3f2, 2024-09-26)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1">
<inkscape:path-effect
effect="powermask"
id="path-effect25"
is_visible="true"
lpeversion="1"
uri="#mask-powermask-path-effect25"
invert="false"
hide_mask="false"
background="true"
background_color="#ffffffff" />
<inkscape:path-effect
effect="powermask"
id="path-effect24"
is_visible="true"
lpeversion="1"
uri="#mask-powermask-path-effect24"
invert="false"
hide_mask="false"
background="true"
background_color="#ffffffff" />
<inkscape:path-effect
effect="powermask"
id="path-effect23"
is_visible="true"
lpeversion="1"
uri="#mask-powermask-path-effect23"
invert="false"
hide_mask="false"
background="true"
background_color="#ffffffff" />
<inkscape:path-effect
effect="powermask"
id="path-effect7"
is_visible="true"
lpeversion="1"
uri="#mask-powermask-path-effect7"
invert="false"
hide_mask="false"
background="true"
background_color="#ffffffff" />
<filter
id="mask-powermask-path-effect6_inverse"
inkscape:label="filtermask-powermask-path-effect6"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect6_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect6_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect9_inverse"
inkscape:label="filtermask-powermask-path-effect9"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect9_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect9_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect10_inverse"
inkscape:label="filtermask-powermask-path-effect10"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect10_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect10_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect11_inverse"
inkscape:label="filtermask-powermask-path-effect11"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect11_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect11_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect12_inverse"
inkscape:label="filtermask-powermask-path-effect12"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect12_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect12_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect13_inverse"
inkscape:label="filtermask-powermask-path-effect13"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect13_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect13_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect15_inverse"
inkscape:label="filtermask-powermask-path-effect15"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect15_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect15_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect16_inverse"
inkscape:label="filtermask-powermask-path-effect16"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect16_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect16_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect17_inverse"
inkscape:label="filtermask-powermask-path-effect17"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect17_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect17_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect19_inverse"
inkscape:label="filtermask-powermask-path-effect19"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect19_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect19_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect20_inverse"
inkscape:label="filtermask-powermask-path-effect20"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect20_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect20_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect21_inverse"
inkscape:label="filtermask-powermask-path-effect21"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect21_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect21_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<mask
maskUnits="userSpaceOnUse"
id="mask-powermask-path-effect23">
<path
id="mask-powermask-path-effect23_box"
style="fill:#ffffff;fill-opacity:1"
d="M 5.6800836,5.9683181 H 15.353166 V 16 H 5.6800836 Z" />
<path
id="path21"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 8,12 h 8 M 12,8 v 8" />
</mask>
<mask
maskUnits="userSpaceOnUse"
id="mask-powermask-path-effect24">
<path
id="mask-powermask-path-effect24_box"
style="fill:#ffffff;fill-opacity:1"
d="m 7,0 h 9 V 9.0003176 H 7 Z" />
<path
id="path22"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 8,12 h 8 M 12,8 v 8" />
</mask>
<mask
maskUnits="userSpaceOnUse"
id="mask-powermask-path-effect25">
<path
id="mask-powermask-path-effect25_box"
style="fill:#ffffff;fill-opacity:1"
d="M 1.09217e-8,7 H 8.9999994 v 9.000318 H 1.09217e-8 Z" />
<path
id="path23"
style="fill:none;stroke:#000000;stroke-width:2;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 8,12 h 8 M 12,8 v 8" />
</mask>
<filter
id="mask-powermask-path-effect23_inverse"
inkscape:label="filtermask-powermask-path-effect23"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect23_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect23_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect24_inverse"
inkscape:label="filtermask-powermask-path-effect24"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect24_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect24_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
<filter
id="mask-powermask-path-effect25_inverse"
inkscape:label="filtermask-powermask-path-effect25"
style="color-interpolation-filters:sRGB"
height="100"
width="100"
x="-50"
y="-50">
<feColorMatrix
id="mask-powermask-path-effect25_primitive1"
values="1"
type="saturate"
result="fbSourceGraphic" />
<feColorMatrix
id="mask-powermask-path-effect25_primitive2"
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
in="fbSourceGraphic" />
</filter>
</defs>
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="59.78125"
inkscape:cx="9.0663879"
inkscape:cy="7.2514375"
inkscape:window-width="3840"
inkscape:window-height="2131"
inkscape:window-x="1341"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
fill="#fc7f7f"
d="M 2.8662419,8.502729 A 0.99914324,0.99914324 0 1 0 1.5024113,9.8665596 v 3.2676984 a 0.99914324,0.99914324 0 1 0 1.3638306,1.363331 h 3.2676979 a 0.99914324,0.99914324 0 1 0 1.363331,-1.363831 V 9.86606 A 0.99914324,0.99914324 0 1 0 6.1334403,8.502729 Z m 0.3412074,0.9991433 h 2.925991 A 0.99914324,0.99914324 0 0 0 6.497628,9.8665596 V 12.792051 L 3.2069497,9.5018723 Z M 2.501055,10.208267 5.7907341,13.498445 H 2.8647431 A 0.99914324,0.99914324 0 0 0 2.5005554,13.133758 v -2.925491 z"
id="path1"
style="stroke-width:0.499572"
mask="url(#mask-powermask-path-effect25)"
inkscape:path-effect="#path-effect25"
inkscape:original-d="M 2.8662419,8.502729 A 0.99914324,0.99914324 0 1 0 1.5024113,9.8665596 v 3.2676984 a 0.99914324,0.99914324 0 1 0 1.3638306,1.363331 h 3.2676979 a 0.99914324,0.99914324 0 1 0 1.363331,-1.363831 V 9.86606 A 0.99914324,0.99914324 0 1 0 6.1334403,8.502729 Z m 0.3412074,0.9991433 h 2.925991 A 0.99914324,0.99914324 0 0 0 6.497628,9.8665596 V 12.792051 L 3.2069497,9.5018723 Z M 2.501055,10.208267 5.7907341,13.498445 H 2.8647431 A 0.99914324,0.99914324 0 0 0 2.5005554,13.133758 v -2.925491 z" />
<path
fill="#fc7f7f"
d="M 9.8662419,1.5027286 A 0.99914324,0.99914324 0 1 0 8.5024113,2.8665592 v 3.2676984 a 0.99914324,0.99914324 0 1 0 1.3638306,1.363331 H 13.13394 a 0.99914324,0.99914324 0 1 0 1.363331,-1.363831 V 2.8660596 A 0.99914324,0.99914324 0 1 0 13.13344,1.5027286 Z m 0.3412071,0.9991433 h 2.925991 a 0.99914324,0.99914324 0 0 0 0.364188,0.3646873 V 5.7920506 L 10.20695,2.5018719 Z m -0.706394,0.7063947 3.289679,3.290178 H 9.8647431 A 0.99914324,0.99914324 0 0 0 9.5005554,6.1337576 v -2.925491 z"
id="path1-8"
style="stroke-width:0.499572"
mask="url(#mask-powermask-path-effect24)"
inkscape:path-effect="#path-effect24"
inkscape:original-d="M 9.8662419,1.5027286 A 0.99914324,0.99914324 0 1 0 8.5024113,2.8665592 v 3.2676984 a 0.99914324,0.99914324 0 1 0 1.3638306,1.363331 H 13.13394 a 0.99914324,0.99914324 0 1 0 1.363331,-1.363831 V 2.8660596 A 0.99914324,0.99914324 0 1 0 13.13344,1.5027286 Z m 0.3412071,0.9991433 h 2.925991 a 0.99914324,0.99914324 0 0 0 0.364188,0.3646873 V 5.7920506 L 10.20695,2.5018719 Z m -0.706394,0.7063947 3.289679,3.290178 H 9.8647431 A 0.99914324,0.99914324 0 0 0 9.5005554,6.1337576 v -2.925491 z" />
<path
style="fill:none;stroke:#fc7f7f;stroke-linejoin:round;stroke-dasharray:0.5, 0.5;stroke-dashoffset:0"
d="m 6.7812379,14.510339 c 0,0 2.7567751,-0.533036 3.6232851,-1.514151 0.797036,-0.902453 0.298221,-2.48029 0.970205,-3.479352 0.642563,-0.9553215 2.731728,-2.1136225 2.731728,-2.1136225"
id="path2-5"
sodipodi:nodetypes="caac"
mask="url(#mask-powermask-path-effect23)"
inkscape:path-effect="#path-effect23"
inkscape:original-d="m 6.7812379,14.510339 c 0,0 2.7567751,-0.533036 3.6232851,-1.514151 0.797036,-0.902453 0.298221,-2.48029 0.970205,-3.479352 0.642563,-0.9553215 2.731728,-2.1136225 2.731728,-2.1136225" />
<path
style="fill:none;stroke:#fc7f7f;stroke-linejoin:round;stroke-dasharray:0.5,0.5;stroke-dashoffset:0"
d="m 1.7797467,8.5444126 c 0,0 2.7567751,-0.533036 3.6232849,-1.514151 0.797036,-0.902453 0.298221,-2.48029 0.970205,-3.4793521 C 7.0157996,2.595588 9.1049646,1.437287 9.1049646,1.437287"
id="path2"
sodipodi:nodetypes="caac" />
<path
id="path4"
style="fill:none;stroke:#fc7f7f;stroke-width:1;stroke-linejoin:round;stroke-dasharray:none"
d="m 9,12 h 6 M 12,9 v 6" />
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cffxlnw1viopm"
path="res://.godot/imported/PathMultiMesh3D.svg-f1401263c315f0db21ed219e14790414.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/PathMesh3D/icons/PathMultiMesh3D.svg"
dest_files=["res://.godot/imported/PathMultiMesh3D.svg-f1401263c315f0db21ed219e14790414.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="PathScene3D.svg"
inkscape:version="1.4-rc1 (61ec3f2, 2024-09-26)"
inkscape:export-filename="PathScene3D.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="81.891804"
inkscape:cx="6.5330103"
inkscape:cy="8.3097449"
inkscape:window-width="3840"
inkscape:window-height="2071"
inkscape:window-x="1341"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg1" />
<path
style="fill:none;fill-opacity:1;stroke:#fc8181;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:0.5;stroke-dashoffset:0;stroke-opacity:1"
d="M 7.3846482,14.678811 15.01667,6.5461292"
id="path2"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#fc8181;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:0.5;stroke-dashoffset:0;stroke-opacity:1;fill-opacity:1"
d="M 1.0723209,9.85612 8.8142432,1.9798736"
id="path2-8"
sodipodi:nodetypes="cc" />
<path
fill="#e0e0e0"
d="M 7.641036,8.4966817 6.5184632,8.6607654 6.927672,9.6112504 7.7856098,9.4861866 Z M 5.5284581,8.8043387 4.5389532,8.9494127 4.948162,9.9008982 5.9381672,9.7558242 Z M 3.5479475,9.0934862 2.5584427,9.2385602 2.9676515,10.190046 3.9576566,10.044972 Z M 1.5684375,9.3826337 0.711,9.5076976 0.85557377,10.497703 1.9781466,10.333619 Z M 0.85557377,10.997958 v 3.001531 A 1.0005105,1.0005105 0 0 0 1.8560843,15 h 6.003063 v -4.002042 z"
id="path1"
style="stroke-width:0.500255;stroke:none;stroke-opacity:1;fill:#d7d7d7;fill-opacity:1" />
<use
x="0"
y="0"
xlink:href="#path1"
id="use1"
transform="translate(7.5221203,-7.8640348)" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chm4bonb3hjnw"
path="res://.godot/imported/PathScene3D.svg-d846d90d01178706737043a57e46dba1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/PathMesh3D/icons/PathScene3D.svg"
dest_files=["res://.godot/imported/PathScene3D.svg-d846d90d01178706737043a57e46dba1.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@ -0,0 +1,40 @@
[configuration]
entry_symbol = "path_mesh_3d_init"
compatibility_minimum = "4.3"
reloadable = true
[libraries]
macos.debug = "res://addons/PathMesh3D/bin/path_mesh_3d.macos.template_debug.framework"
macos.release = "res://addons/PathMesh3D/bin/path_mesh_3d.macos.template_release.framework"
ios.debug = "res://addons/PathMesh3D/bin/path_mesh_3d.ios.template_debug.xcframework"
ios.release = "res://addons/PathMesh3D/bin/path_mesh_3d.ios.template_release.xcframework"
windows.debug.x86_32 = "res://addons/PathMesh3D/bin/path_mesh_3d.windows.template_debug.x86_32.dll"
windows.release.x86_32 = "res://addons/PathMesh3D/bin/path_mesh_3d.windows.template_release.x86_32.dll"
windows.debug.x86_64 = "res://addons/PathMesh3D/bin/path_mesh_3d.windows.template_debug.x86_64.dll"
windows.release.x86_64 = "res://addons/PathMesh3D/bin/path_mesh_3d.windows.template_release.x86_64.dll"
linux.debug.x86_64 = "res://addons/PathMesh3D/bin/libpath_mesh_3d.linux.template_debug.x86_64.so"
linux.release.x86_64 = "res://addons/PathMesh3D/bin/libpath_mesh_3d.linux.template_release.x86_64.so"
linux.debug.arm64 = "res://addons/PathMesh3D/bin/libpath_mesh_3d.linux.template_debug.arm64.so"
linux.release.arm64 = "res://addons/PathMesh3D/bin/libpath_mesh_3d.linux.template_release.arm64.so"
linux.debug.rv64 = "res://addons/PathMesh3D/bin/libpath_mesh_3d.linux.template_debug.rv64.so"
linux.release.rv64 = "res://addons/PathMesh3D/bin/libpath_mesh_3d.linux.template_release.rv64.so"
android.debug.x86_64 = "res://addons/PathMesh3D/bin/path_mesh_3d.android.template_debug.x86_64.so"
android.release.x86_64 = "res://addons/PathMesh3D/bin/path_mesh_3d.android.template_release.x86_64.so"
android.debug.arm64 = "res://addons/PathMesh3D/bin/path_mesh_3d.android.template_debug.arm64.so"
android.release.arm64 = "res://addons/PathMesh3D/bin/path_mesh_3d.android.template_release.arm64.so"
[dependencies]
ios.debug = {
"res://addons/PathMesh3D/bin/libgodot-cpp.ios.template_debug.xcframework": ""
}
ios.release = {
"res://addons/PathMesh3D/bin/libgodot-cpp.ios.template_release.xcframework": ""
}
[icons]
PathMesh3D = "res://addons/PathMesh3D/icons/PathMesh3D.svg"
PathExtrude3D = "res://addons/PathMesh3D/icons/PathExtrude3D.svg"
PathMultiMesh3D = "res://addons/PathMesh3D/icons/PathMultiMesh3D.svg"
PathScene3D = "res://addons/PathMesh3D/icons/PathScene3D.svg"

View File

@ -0,0 +1 @@
uid://csxxhm0kw76kb

View File

@ -0,0 +1,7 @@
[plugin]
name="PathMesh3D"
description="A fast set of 3D mesh extrusion and tiling nodes implemented as a C++ GDExtension."
author="iiMidknightii"
version="1.3.0"
script="plugin.gd"

View File

@ -0,0 +1,53 @@
@tool
extends EditorPlugin
const PathMesh3DOptions := preload("res://addons/PathMesh3D/scripts/path_mesh_3d_options.gd")
const PathMesh3DOptionsScene := preload("res://addons/PathMesh3D/scenes/path_mesh_3d_options.tscn")
const PathScene3DOptions := preload("res://addons/PathMesh3D/scripts/path_scene_3d_options.gd")
const PathScene3DOptionsScene := preload("res://addons/PathMesh3D/scenes/path_scene_3d_options.tscn")
var _mesh_editor_button: PathMesh3DOptions
var _scene_editor_button: PathScene3DOptions
var _path_object
func _enter_tree() -> void:
_mesh_editor_button = PathMesh3DOptionsScene.instantiate()
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, _mesh_editor_button)
_mesh_editor_button.hide()
_scene_editor_button = PathScene3DOptionsScene.instantiate()
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, _scene_editor_button)
_scene_editor_button.hide()
func _exit_tree() -> void:
remove_control_from_container(CONTAINER_SPATIAL_EDITOR_MENU, _mesh_editor_button)
remove_control_from_container(CONTAINER_SPATIAL_EDITOR_MENU, _scene_editor_button)
_mesh_editor_button.queue_free()
_scene_editor_button.queue_free()
func _handles(object: Object) -> bool:
return object is PathMesh3D or object is PathExtrude3D or object is PathScene3D
func _edit(object: Object) -> void:
if object is PathMesh3D or object is PathExtrude3D and _mesh_editor_button:
_path_object = object
_mesh_editor_button.path_mesh = object
_mesh_editor_button.ur = get_undo_redo()
elif object is PathScene3D and _scene_editor_button:
_path_object = object
_scene_editor_button.path_scene = object
_scene_editor_button.ur = get_undo_redo()
func _make_visible(visible: bool) -> void:
if _path_object is PathMesh3D or _path_object is PathExtrude3D and visible:
_mesh_editor_button.visible = visible
elif _path_object is PathScene3D and visible:
_scene_editor_button.visible = visible
elif not visible:
_mesh_editor_button.visible = visible
_scene_editor_button.visible = visible

View File

@ -0,0 +1 @@
uid://ba3eavswdmx3m

View File

@ -0,0 +1,83 @@
[gd_scene load_steps=3 format=3 uid="uid://bf6p2xos0dryr"]
[ext_resource type="Script" uid="uid://k16bgqnrauft" path="res://addons/PathMesh3D/scripts/path_mesh_3d_options.gd" id="1_ljqft"]
[ext_resource type="Texture2D" uid="uid://bh5p7hkaa8hie" path="res://addons/PathMesh3D/icons/PathMesh3D.svg" id="1_sjiwc"]
[node name="MenuButton" type="MenuButton"]
offset_right = 155.0
offset_bottom = 146.0
text = "PathMesh3D"
icon = ExtResource("1_sjiwc")
switch_on_hover = true
item_count = 2
popup/item_0/text = "Bake Extruded Mesh"
popup/item_0/id = 1
popup/item_1/text = "Create Collision Shape..."
popup/item_1/id = 1
script = ExtResource("1_ljqft")
[node name="CollisionDialog" type="ConfirmationDialog" parent="."]
title = "Create Collision Shape"
size = Vector2i(220, 177)
ok_button_text = "Create"
[node name="VBoxContainer" type="VBoxContainer" parent="CollisionDialog"]
offset_left = 8.0
offset_top = 8.0
offset_right = 212.0
offset_bottom = 128.0
[node name="Label" type="Label" parent="CollisionDialog/VBoxContainer"]
layout_mode = 2
text = "Collision Shape Placement"
[node name="OptionButton" type="OptionButton" parent="CollisionDialog/VBoxContainer"]
layout_mode = 2
selected = 0
item_count = 2
popup/item_0/text = "Sibling"
popup/item_1/text = "Static Body Child"
popup/item_1/id = 1
[node name="Label2" type="Label" parent="CollisionDialog/VBoxContainer"]
layout_mode = 2
text = "Collision Shape Type"
[node name="OptionButton2" type="OptionButton" parent="CollisionDialog/VBoxContainer"]
layout_mode = 2
selected = 0
item_count = 4
popup/item_0/text = "Trimesh"
popup/item_1/text = "Single Convex"
popup/item_1/id = 1
popup/item_2/text = "Simplified Convex"
popup/item_2/id = 2
popup/item_3/text = "Multiple Convex"
popup/item_3/id = 3
popup/item_3/disabled = true
[node name="BakeDialog" type="ConfirmationDialog" parent="."]
title = "Bake Extruded Mesh"
position = Vector2i(0, 36)
size = Vector2i(200, 115)
ok_button_text = "Bake"
[node name="VBoxContainer" type="VBoxContainer" parent="BakeDialog"]
offset_left = 8.0
offset_top = 8.0
offset_right = 192.0
offset_bottom = 66.0
[node name="Label" type="Label" parent="BakeDialog/VBoxContainer"]
layout_mode = 2
text = "Baked Mesh Placement"
[node name="OptionButton" type="OptionButton" parent="BakeDialog/VBoxContainer"]
layout_mode = 2
selected = 0
item_count = 2
popup/item_0/text = "Sibling"
popup/item_1/text = "Child"
popup/item_1/id = 1
[node name="ErrDialog" type="AcceptDialog" parent="."]

View File

@ -0,0 +1,43 @@
[gd_scene load_steps=3 format=3 uid="uid://ti68eqdjrepf"]
[ext_resource type="Texture2D" uid="uid://chm4bonb3hjnw" path="res://addons/PathMesh3D/icons/PathScene3D.svg" id="1_gjelh"]
[ext_resource type="Script" uid="uid://cwc5u78hgi17j" path="res://addons/PathMesh3D/scripts/path_scene_3d_options.gd" id="2_jba24"]
[node name="MenuButton" type="MenuButton"]
offset_right = 155.0
offset_bottom = 146.0
text = "PathScene3D"
icon = ExtResource("1_gjelh")
switch_on_hover = true
item_count = 1
popup/item_0/text = "Bake Instances"
popup/item_0/id = 1
script = ExtResource("2_jba24")
[node name="BakeDialog" type="ConfirmationDialog" parent="."]
auto_translate_mode = 1
title = "Bake Instanced Scenes"
position = Vector2i(0, 36)
size = Vector2i(228, 115)
ok_button_text = "Bake"
[node name="VBoxContainer" type="VBoxContainer" parent="BakeDialog"]
offset_left = 8.0
offset_top = 8.0
offset_right = 220.0
offset_bottom = 66.0
[node name="Label" type="Label" parent="BakeDialog/VBoxContainer"]
layout_mode = 2
text = "Baked Instance Placement"
[node name="OptionButton" type="OptionButton" parent="BakeDialog/VBoxContainer"]
layout_mode = 2
selected = 0
item_count = 2
popup/item_0/text = "Sibling"
popup/item_1/text = "Child"
popup/item_1/id = 1
[node name="ErrDialog" type="AcceptDialog" parent="."]
auto_translate_mode = 1

View File

@ -0,0 +1,145 @@
@tool
extends MenuButton
enum Operation {BAKE, COLLISION}
enum Shape {TRIMESH, SINGLE_CONVEX, SIMPLE_CONVEX, MULTIPLE_CONVEX}
enum Placement {SIBLING, CHILD}
var path_mesh: Node
var ur: EditorUndoRedoManager
@onready var _err_dialog: AcceptDialog = $ErrDialog
@onready var _collision_dialog: ConfirmationDialog = $CollisionDialog
@onready var _shape_placement: OptionButton = $CollisionDialog/VBoxContainer/OptionButton
@onready var _shape_type: OptionButton = $CollisionDialog/VBoxContainer/OptionButton2
@onready var _bake_dialog: ConfirmationDialog = $BakeDialog
@onready var _bake_placement: OptionButton = $BakeDialog/VBoxContainer/OptionButton
func _ready() -> void:
get_popup().index_pressed.connect(_on_menu_pressed)
_bake_dialog.confirmed.connect(_on_bake_confirmed)
_collision_dialog.confirmed.connect(_on_collision_shape_confirmed)
func _on_menu_pressed(id: int) -> void:
match id:
Operation.BAKE:
_bake_dialog.popup_centered()
Operation.COLLISION:
_collision_dialog.popup_centered()
func _on_bake_confirmed() -> void:
if not (path_mesh is PathMesh3D or path_mesh is PathExtrude3D):
return
if not ur:
return
var placement := _bake_placement.selected
var p_owner := EditorInterface.get_edited_scene_root()
if p_owner == path_mesh and placement == Placement.SIBLING:
_err_dialog.dialog_text = "Can't add Mesh Instance as sibling of scene root."
_err_dialog.popup_centered()
return
var mesh: Mesh = path_mesh.get_baked_mesh()
if mesh == null:
_err_dialog.dialog_text = "No mesh to create Instance from."
_err_dialog.popup_centered()
return
var minstance := MeshInstance3D.new()
minstance.mesh = mesh
minstance.name = "MeshInstance3D"
if placement == Placement.SIBLING:
ur.add_do_method(path_mesh, "add_sibling", minstance, true)
ur.add_do_method(minstance, "set_owner", p_owner)
ur.add_do_reference(minstance)
ur.add_undo_method(path_mesh.get_parent(), "remove_child", minstance)
else:
ur.add_do_method(path_mesh, "add_child", minstance, true)
ur.add_do_method(minstance, "set_owner", p_owner)
ur.add_do_reference(minstance)
ur.add_undo_method(path_mesh, "remove_child", minstance)
ur.commit_action()
func _on_collision_shape_confirmed() -> void:
if not (path_mesh is PathMesh3D or path_mesh is PathExtrude3D):
return
if not ur:
return
var mesh: Mesh = path_mesh.get_baked_mesh()
if mesh == null:
_err_dialog.dialog_text = "No mesh to create Collision Shape from."
_err_dialog.popup_centered()
return
var placement := _shape_placement.selected
var shape_type := _shape_type.selected
var str := "Collision Shape Sibling" if placement == Placement.SIBLING else "Static Body"
match shape_type:
Shape.TRIMESH: ur.create_action("Create Trimesh " + str)
Shape.SINGLE_CONVEX: ur.create_action("Create Single Convex " + str)
Shape.SIMPLE_CONVEX: ur.create_action("Create Simplified Convex "+ str)
Shape.MULTIPLE_CONVEX: ur.create_action("Create Multiple Convex " + str)
_: return
if EditorInterface.get_edited_scene_root() == path_mesh and placement == 0:
_err_dialog.dialog_text = "Can't create a collision shape as sibling for the scene root."
_err_dialog.popup_centered()
return
var scene_owner := EditorInterface.get_edited_scene_root()
var shapes: Array[Shape3D] = []
match shape_type:
Shape.TRIMESH:
shapes.push_back(mesh.create_trimesh_shape())
Shape.SINGLE_CONVEX:
shapes.push_back(mesh.create_convex_shape(true, false))
Shape.SIMPLE_CONVEX:
shapes.push_back(mesh.create_convex_shape(true, true))
Shape.MULTIPLE_CONVEX:
var settings := MeshConvexDecompositionSettings.new()
settings.max_convex_hulls = 32
settings.max_concavity = 0.001
shapes = mesh.convex_decompose(settings)
if shapes.is_empty():
_err_dialog.dialog_text = "Cannot create collision shape."
_err_dialog.popup_centered()
return
var p_owner := EditorInterface.get_edited_scene_root()
if placement == Placement.CHILD:
var body := StaticBody3D.new()
ur.add_do_method(path_mesh, "add_child", body, true)
ur.add_do_method(body, "set_owner", p_owner)
for shape: Shape3D in shapes:
var cshape := CollisionShape3D.new()
cshape.shape = shape
ur.add_do_method(body, "add_child", cshape, true)
ur.add_do_method(cshape, "set_owner", p_owner)
ur.add_do_reference(body)
ur.add_undo_method(path_mesh, "remove_child", body)
else:
for shape: Shape3D in shapes:
var cshape := CollisionShape3D.new()
cshape.shape = shape
cshape.name = "CollisionShape3D"
cshape.transform = path_mesh.transform
ur.add_do_method(path_mesh, "add_sibling", cshape, true)
ur.add_do_method(cshape, "set_owner", p_owner)
ur.add_do_reference(cshape)
ur.add_undo_method(path_mesh.get_parent(), "remove_child", cshape)
ur.commit_action()

View File

@ -0,0 +1 @@
uid://k16bgqnrauft

View File

@ -0,0 +1,54 @@
@tool
extends MenuButton
enum Operation {BAKE}
enum Placement {SIBLING, CHILD}
var path_scene: Node
var ur: EditorUndoRedoManager
@onready var _err_dialog: AcceptDialog = $ErrDialog
@onready var _bake_dialog: ConfirmationDialog = $BakeDialog
@onready var _bake_placement: OptionButton = $BakeDialog/VBoxContainer/OptionButton
func _ready() -> void:
get_popup().index_pressed.connect(_on_menu_pressed)
_bake_dialog.confirmed.connect(_on_bake_confirmed)
func _on_menu_pressed(id: int) -> void:
match id:
Operation.BAKE:
_bake_dialog.popup_centered()
func _on_bake_confirmed() -> void:
if not (path_scene is PathScene3D):
return
if not ur:
return
var placement := _bake_placement.selected
var p_owner := EditorInterface.get_edited_scene_root()
if p_owner == path_scene and placement == Placement.SIBLING:
_err_dialog.dialog_text = "Can't add instances as siblings of scene root."
_err_dialog.popup_centered()
return
var instances: Array[Node3D] = path_scene.bake_instances()
for i: Node3D in instances:
if placement == Placement.SIBLING:
ur.add_do_method(path_scene, "add_sibling", i, true)
ur.add_do_method(i, "set_owner", p_owner)
ur.add_do_reference(i)
ur.add_undo_method(path_scene.get_parent(), "remove_child", i)
else:
ur.add_do_method(path_scene, "add_child", i, true)
ur.add_do_method(i, "set_owner", p_owner)
ur.add_do_reference(i)
ur.add_undo_method(path_scene, "remove_child", i)
ur.commit_action()

View File

@ -0,0 +1 @@
uid://cwc5u78hgi17j

44
addons/README.md Normal file
View File

@ -0,0 +1,44 @@
# ![](addons/PathMesh3D/icons/PathMesh3DIcon.png) PathMesh3D
A set of simple Godot 3D nodes for extruding and instancing 3D meshes along a Path3D. Implemented as a GDExtension in C++ for speed.
## Installation
### From Godot Asset Library in the Editor
Click the `AssetLib` button at the top of the Godot editor and search for `PathMesh3D`. When prompted where to install it, you can select only the folder named "addons". If you wish to modify or recompile the addon, then you'll need to include the "godot-cpp" and "src" folders along with the "SConstruct" file from this repository.
### From Godot Asset Library Web
Head over to [the PathMesh3D page on the asset library website](https://godotengine.org/asset-library/asset) and click the download button. Unzip the download into a location of your choosing. To put the addon in your project, just copy the "addons" folder into the project directory.
### From GitHub.com
You can download the full repository for PathMesh3D [here](https://github.com/iiMidknightii/PathMesh3D). You can clone this repository by doing `git clone https://github.com/iiMidknightii/PathMesh3D.git` in the directory of your choosing. If you want to compile your own binaries this is the best option. To put the addon in your project, just copy the "addons" folder into the project directory.
## Tutorial
> [!NOTE]
> `PathMesh3D` and `PathExtrude3D` both have a plugin button to generate baked meshes and collision shapes. In the editor, you can enable this button by enabling the `PathMesh3D` plugin.
### PathMesh3D
`PathMesh3D` is a great node if you want to take a 3D model and "tile" or "repeat" it along a `Path3D` node within your scene. The `Mesh` model provided will be duplicated along its Z axis according to the settings chosen for each surface. Since each surface has its own independent settings, there is a high degree of customization available.
Simply add the `PathMesh3D` node to the scene, set its `path_3d` property to a `Path3D` node, and set its `mesh` property to any `Mesh` derived resource. From there, you can tweak the settings for each surface to get your desired effect. If you want to create a permanent, separate node as a "snapshot" of the extruded mesh, hit the `PathMesh3D` button on the editor toolbar and select "Bake Mesh". You can also create collision shapes and static bodies similarly to `MeshInstance3D` with that same button.
![](screenshots/PathMesh3D.png)
### PathExtrude3D
`PathExtrude3D` works similarly to the `CSGPolygon` node when in path mode. First, you define the cross section using the `profile` property. This property uses any one of the `PathExtrudeProfileBase` classes, including rectangular, circular, etc. You can also create your own profile by creating a custom script inheriting from `PathExtrudeProfileBase` and overriding the virtual `_generate_cross_section` method. This resource stores the cross section vertices in arrays similar to `ArrayMesh` that will be used by the `PathExtrude3D`. Next, set the `path_3d` property to any `Path3D` node in the scene. From there, the cross section will be extruded according to the settings you have chosen.
![](screenshots/PathExtrude3D.png)
### PathMultiMesh3D
`PathMultiMesh3D` works similarly to `PathMesh3D`, but instead of creating one combined mesh, it generates the instances of a `MultiMesh` resource along the path. Just set the `mesh` property to a `MultiMesh` (and select a base mesh for it). Then, set the `path_3d` property to a `Path3D` node in the scene. The node will automatically set the `MultiMesh` `instance_count` property and distribute their transforms along the path according to the selected settings.
![](screenshots/PathMultiMesh3D.png)
### PathScene3D
`PathScene3D` creates instances of a `PackedScene` resource along the the path. It will automatically add the instances as internal children of itself and distribute their transforms according to selected settings. If it is desired, the instances can be "baked" by calling `bake_instances`, which unparents them from the `PathScene3D` node and returns them in an array. From there, they can be reparented as more permanent nodes.
## Latest Release - v1.3.0
* Fixed `PathExtrude3D` UV generation and material issues.
* Added the `PathScene3D` node.
* Applied the `Path3D` node transform to the generated meshes/instances, while un-applying the helper node's transform (meaning the mesh/instance will always follow the curve in the editor no matter the relative node transformations).
## Contributing
Feel free to leave any feedback, suggestions, bug reports, and contributions to the repository at [https://github.com/iiMidknightii/PathMesh3D](https://github.com/iiMidknightii/PathMesh3D).

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 DmitriySalnikov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the Software), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, andor sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,158 @@
![icon](/images/icon_3d_128.png)
# Debug drawing utility for Godot
This is an add-on for debug drawing in 3D and for some 2D overlays, which is written in `C++` and can be used with `GDScript` or `C#`.
Based on my previous addon, which was developed [only for C#](https://github.com/DmitriySalnikov/godot_debug_draw_cs), and which was inspired by [Zylann's GDScript addon](https://github.com/Zylann/godot_debug_draw)
## [Documentation](https://dd3d.dmitriysalnikov.ru/docs/)
## [Godot 3 version](https://github.com/DmitriySalnikov/godot_debug_draw_3d/tree/godot_3)
## Support me
Your support adds motivation to develop my public projects.
<a href="https://boosty.to/dmitriysalnikov/donate"><img src="/docs/images/boosty.png" alt="Boosty" width=150px/></a>
<a href="#"><img src="/docs/images/USDT-TRC20.png" alt="USDT-TRC20" width=150px/></a>
<b>USDT-TRC20 TEw934PrsffHsAn5M63SoHYRuZo984EF6v</b>
## Features
3D:
* Arrow
* Billboard opaque square
* Box
* Camera Frustum
* Cylinder
* Gizmo
* Grid
* Line
* Line Path
* Line with Arrow
* Plane
* Points
* Position 3D (3 crossing axes)
* Sphere
2D:
* **[Work in progress]**
Overlay:
* Text (with grouping and coloring)
* FPS Graph
* Custom Graphs
Precompiled for:
* Windows
* Linux (built on Ubuntu 22.04)
* macOS (10.15+)
* Android (5.0+)
* iOS
* Web (Firefox is supported by Godot 4.3+)
This addon supports working with several World3D and different Viewports.
There is also a no depth test mode and other settings that can be changed for each instance.
This library supports double-precision builds, for more information, [see the documentation](https://dd3d.dmitriysalnikov.ru/docs/?page=md_docs_2DoublePrecision.html).
## [Interactive Web Demo](https://dd3d.dmitriysalnikov.ru/demo/)
[![screenshot_web](/images/screenshot_web.png)](https://dd3d.dmitriysalnikov.ru/demo/)
## Download
To download, use the [Godot Asset Library](https://godotengine.org/asset-library/asset/1766) or use one of the stable versions from the [GitHub Releases](https://github.com/DmitriySalnikov/godot_debug_draw_3d/releases) page.
For versions prior to `1.4.5`, just download one of the `source codes` in the assets. For newer versions, download `debug-draw-3d_[version].zip`.
### Installation
* Close editor
* Copy `addons/debug_draw_3d` to your `addons` folder, create it if the folder doesn't exist
* Launch editor
## Examples
More examples can be found in the `examples_dd3d/` folder.
Simple test:
```gdscript
func _process(delta: float) -> void:
var _time = Time.get_ticks_msec() / 1000.0
var box_pos = Vector3(0, sin(_time * 4), 0)
var line_begin = Vector3(-1, sin(_time * 4), 0)
var line_end = Vector3(1, cos(_time * 4), 0)
DebugDraw3D.draw_box(box_pos, Quaternion.IDENTITY, Vector3(1, 2, 1), Color(0, 1, 0))
DebugDraw3D.draw_line(line_begin, line_end, Color(1, 1, 0))
DebugDraw2D.set_text("Time", _time)
DebugDraw2D.set_text("Frames drawn", Engine.get_frames_drawn())
DebugDraw2D.set_text("FPS", Engine.get_frames_per_second())
DebugDraw2D.set_text("delta", delta)
```
![screenshot_1](/images/screenshot_1.png)
An example of using scoped configs:
```gdscript
@tool
extends Node3D
func _ready():
# Set the base scoped_config.
# Each frame will be reset to these scoped values.
DebugDraw3D.scoped_config().set_thickness(0.1).set_center_brightness(0.6)
func _process(delta):
# Draw using the base scoped config.
DebugDraw3D.draw_box(Vector3.ZERO, Quaternion.IDENTITY, Vector3.ONE * 2, Color.CORNFLOWER_BLUE)
if true:
# Create a scoped config that will exist until exiting this if.
var _s = DebugDraw3D.new_scoped_config().set_thickness(0).set_center_brightness(0.1)
# Draw with a thickness of 0
DebugDraw3D.draw_box(Vector3.ZERO, Quaternion.IDENTITY, Vector3.ONE, Color.RED)
# If necessary, the values inside this scope can be changed
# even before each call to draw_*.
_s.set_thickness(0.05)
DebugDraw3D.draw_box(Vector3(1,0,1), Quaternion.IDENTITY, Vector3.ONE * 1, Color.BLUE_VIOLET)
```
![screenshot_5](/images/screenshot_5.png)
> [!TIP]
>
> If you want to use a non-standard Viewport for rendering a 3d scene, then do not forget to specify it in the scoped config!
## API
This project has a separate [documentation](https://dd3d.dmitriysalnikov.ru/docs/) page.
Also, a list of all functions is available in the documentation inside the editor (see `DebugDraw3D` and `DebugDraw2D`).
![screenshot_4](/images/screenshot_4.png)
## Known issues and limitations
The text in the keys and values of a text group cannot contain multi-line strings.
The entire text overlay can only be placed in one corner.
[Frustum of Camera3D does not take into account the window size from ProjectSettings](https://github.com/godotengine/godot/issues/70362).
## More screenshots
`DebugDrawDemoScene.tscn` in editor
![screenshot_2](/images/screenshot_2.png)
`DebugDrawDemoScene.tscn` in play mode
![screenshot_3](/images/screenshot_3.png)

View File

@ -0,0 +1,153 @@
[configuration]
entry_symbol = "debug_draw_3d_library_init"
compatibility_minimum = "4.2.2"
reloadable = false
[dependencies]
; example.x86_64 = { "relative or absolute path to the dependency" : "the path relative to the exported project", }
; -------------------------------------
; debug
macos = { }
windows.x86_64 = { }
linux.x86_64 = { }
; by default godot is using threads
web.wasm32.nothreads = {}
web.wasm32 = {}
android.arm32 = { }
android.arm64 = { }
android.x86_32 = { }
android.x86_64 = { }
ios = {}
; -------------------------------------
; release no debug draw
macos.template_release = { }
windows.template_release.x86_64 = { }
linux.template_release.x86_64 = { }
web.template_release.wasm32.nothreads = { }
web.template_release.wasm32 = { }
android.template_release.arm32 = { }
android.template_release.arm64 = { }
android.template_release.x86_32 = { }
android.template_release.x86_64 = { }
ios.template_release = {}
; -------------------------------------
; release forced debug draw
macos.template_release.forced_dd3d = { }
windows.template_release.x86_64.forced_dd3d = { }
linux.template_release.x86_64.forced_dd3d = { }
web.template_release.wasm32.nothreads.forced_dd3d = { }
web.template_release.wasm32.forced_dd3d = { }
ios.template_release.forced_dd3d = {}
[libraries]
; -------------------------------------
; debug
macos = "libs/libdd3d.macos.editor.universal.framework"
windows.x86_64 = "libs/libdd3d.windows.editor.x86_64.dll"
linux.x86_64 = "libs/libdd3d.linux.editor.x86_64.so"
web.wasm32.nothreads = "libs/libdd3d.web.template_debug.wasm32.wasm"
web.wasm32 = "libs/libdd3d.web.template_debug.wasm32.threads.wasm"
android.arm32 = "libs/libdd3d.android.template_debug.arm32.so"
android.arm64 = "libs/libdd3d.android.template_debug.arm64.so"
android.x86_32 = "libs/libdd3d.android.template_debug.x86_32.so"
android.x86_64 = "libs/libdd3d.android.template_debug.x86_64.so"
ios = "libs/libdd3d.ios.template_debug.universal.dylib"
; -------------------------------------
; release no debug draw
macos.template_release = "libs/libdd3d.macos.template_release.universal.framework"
windows.template_release.x86_64 = "libs/libdd3d.windows.template_release.x86_64.dll"
linux.template_release.x86_64 = "libs/libdd3d.linux.template_release.x86_64.so"
web.template_release.wasm32.nothreads = "libs/libdd3d.web.template_release.wasm32.wasm"
web.template_release.wasm32 = "libs/libdd3d.web.template_release.wasm32.threads.wasm"
android.template_release.arm32 = "libs/libdd3d.android.template_release.arm32.so"
android.template_release.arm64 = "libs/libdd3d.android.template_release.arm64.so"
android.template_release.x86_32 = "libs/libdd3d.android.template_release.x86_32.so"
android.template_release.x86_64 = "libs/libdd3d.android.template_release.x86_64.so"
ios.template_release = "libs/libdd3d.ios.template_release.universal.dylib"
; -------------------------------------
; release forced debug draw
macos.template_release.forced_dd3d = "libs/libdd3d.macos.template_release.universal.enabled.framework"
windows.template_release.x86_64.forced_dd3d = "libs/libdd3d.windows.template_release.x86_64.enabled.dll"
linux.template_release.x86_64.forced_dd3d = "libs/libdd3d.linux.template_release.x86_64.enabled.so"
web.template_release.wasm32.nothreads.forced_dd3d = "libs/libdd3d.web.template_release.wasm32.enabled.wasm"
web.template_release.wasm32.forced_dd3d = "libs/libdd3d.web.template_release.wasm32.threads.enabled.wasm"
ios.template_release.forced_dd3d = "libs/libdd3d.ios.template_release.universal.enabled.dylib"
; -------------------------------------
; DOUBLE PRECISION
; -------------------------------------
; -------------------------------------
; debug
macos.double = "libs/libdd3d.macos.editor.universal.double.framework"
windows.x86_64.double = "libs/libdd3d.windows.editor.x86_64.double.dll"
linux.x86_64.double = "libs/libdd3d.linux.editor.x86_64.double.so"
web.wasm32.nothreads.double = "libs/libdd3d.web.template_debug.wasm32.double.wasm"
web.wasm32.double = "libs/libdd3d.web.template_debug.wasm32.threads.double.wasm"
android.arm32.double = "libs/libdd3d.android.template_debug.arm32.double.so"
android.arm64.double = "libs/libdd3d.android.template_debug.arm64.double.so"
android.x86_32.double = "libs/libdd3d.android.template_debug.x86_32.double.so"
android.x86_64.double = "libs/libdd3d.android.template_debug.x86_64.double.so"
ios.double = "libs/libdd3d.ios.template_debug.universal.dylib"
; -------------------------------------
; release no debug draw
macos.template_release.double = "libs/libdd3d.macos.template_release.universal.double.framework"
windows.template_release.x86_64.double = "libs/libdd3d.windows.template_release.x86_64.double.dll"
linux.template_release.x86_64.double = "libs/libdd3d.linux.template_release.x86_64.double.so"
web.template_release.wasm32.nothreads.double = "libs/libdd3d.web.template_release.wasm32.double.wasm"
web.template_release.wasm32.double = "libs/libdd3d.web.template_release.wasm32.threads.double.wasm"
android.template_release.arm32.double = "libs/libdd3d.android.template_release.arm32.double.so"
android.template_release.arm64.double = "libs/libdd3d.android.template_release.arm64.double.so"
android.template_release.x86_32.double = "libs/libdd3d.android.template_release.x86_32.double.so"
android.template_release.x86_64.double = "libs/libdd3d.android.template_release.x86_64.double.so"
ios.template_release.double = "libs/libdd3d.ios.template_release.universal.double.dylib"
; -------------------------------------
; release forced debug draw
macos.template_release.forced_dd3d.double = "libs/libdd3d.macos.template_release.universal.enabled.double.framework"
windows.template_release.x86_64.forced_dd3d.double = "libs/libdd3d.windows.template_release.x86_64.enabled.double.dll"
linux.template_release.x86_64.forced_dd3d.double = "libs/libdd3d.linux.template_release.x86_64.enabled.double.so"
web.template_release.wasm32.nothreads.forced_dd3d.double = "libs/libdd3d.web.template_release.wasm32.enabled.double.wasm"
web.template_release.wasm32.forced_dd3d.double = "libs/libdd3d.web.template_release.wasm32.threads.enabled.double.wasm"
ios.template_release.forced_dd3d.double = "libs/libdd3d.ios.template_release.universal.enabled.double.dylib"

View File

@ -0,0 +1 @@
uid://svqaxfp5kyrl

View File

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>libdd3d.macos.editor.universal.dylib</string>
<key>CFBundleName</key>
<string>Debug Draw 3D</string>
<key>CFBundleDisplayName</key>
<string>Debug Draw 3D</string>
<key>CFBundleIdentifier</key>
<string>ru.dmitriysalnikov.dd3d</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright (c) Dmitriy Salnikov.</string>
<key>CFBundleVersion</key>
<string>1.5.0</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>DTPlatformName</key>
<string>macosx</string>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
</dict>
</plist>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>libdd3d.macos.template_release.universal.enabled.dylib</string>
<key>CFBundleName</key>
<string>Debug Draw 3D</string>
<key>CFBundleDisplayName</key>
<string>Debug Draw 3D</string>
<key>CFBundleIdentifier</key>
<string>ru.dmitriysalnikov.dd3d</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright (c) Dmitriy Salnikov.</string>
<key>CFBundleVersion</key>
<string>1.5.0</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>DTPlatformName</key>
<string>macosx</string>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
</dict>
</plist>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>libdd3d.macos.template_release.universal.dylib</string>
<key>CFBundleName</key>
<string>Debug Draw 3D</string>
<key>CFBundleDisplayName</key>
<string>Debug Draw 3D</string>
<key>CFBundleIdentifier</key>
<string>ru.dmitriysalnikov.dd3d</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright (c) Dmitriy Salnikov.</string>
<key>CFBundleVersion</key>
<string>1.5.0</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>DTPlatformName</key>
<string>macosx</string>
<key>LSMinimumSystemVersion</key>
<string>10.14</string>
</dict>
</plist>

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Joseph Michael Ware (zibetnu)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,7 @@
extends EditorDebuggerPlugin
var erase_describe_callable: Callable
func _setup_session(session_id: int) -> void:
get_session(session_id).stopped.connect(erase_describe_callable)

View File

@ -0,0 +1 @@
uid://bw5gogl4u1dv2

View File

@ -0,0 +1,21 @@
extends EditorExportPlugin
var set_describe_callable: Callable
var erase_describe_callable: Callable
func _get_name() -> String:
return "godot_git_describe_exporter"
func _export_begin(
_features: PackedStringArray,
_is_debug: bool,
_path: String,
_flags: int
) -> void:
set_describe_callable.call()
func _export_end() -> void:
erase_describe_callable.call()

View File

@ -0,0 +1 @@
uid://kfijvsqec6mn

View File

@ -0,0 +1,22 @@
@icon("icon.svg")
class_name GitDescribeLabel
extends Label
## A label for automatically displaying Git describe strings.
func _ready() -> void:
set_text_to_describe()
## Sets [member Label.text] to the describe string unless the string is empty.
## Called on [signal Node.ready].
func set_text_to_describe() -> void:
var describe_setting: String = ProjectSettings.get_setting(
"addons/git_describe/describe_setting_path",
"application/config/git_describe"
)
var describe: String = ProjectSettings.get_setting(describe_setting, "")
if describe.is_empty():
return
text = describe

View File

@ -0,0 +1 @@
uid://cwjb3x45e2r4k

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16" height="16" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="m6 2.9995a1 1 0 0 0-0.70704 0.29291l-3.9999 4.0003a1 1 0 0 0 0 1.414l3.9999 4.0003a1 1 0 0 0 0.70704 0.29291l8.0001 2.27e-4a1 1 0 0 0 0.99984-1.0001v-8.0001a1 1 0 0 0-0.99984-1.0001h-5.9701l0.98646 0.98646c0.38612-0.13115 0.8132-0.030236 1.1016 0.25663 0.29027 0.29027 0.38876 0.72076 0.25436 1.1085l1.552 1.5517c0.38789-0.13455 0.8188-0.034016 1.109 0.25474 0.419 0.41888 0.419 1.0981 0 1.517-0.41938 0.41896-1.0989 0.41896-1.5183 0-0.30576-0.30652-0.39768-0.76664-0.23282-1.167l-1.4475-1.4469v3.8086c0.65832 0.32542 0.80266 1.2008 0.28346 1.7201-0.41892 0.41896-1.0981 0.41896-1.517 0-0.41907-0.41892-0.41907-1.0983 0-1.5172 0.10054-0.10054 0.21959-0.18028 0.35112-0.23471v-3.8434c-0.5503-0.22677-0.81139-0.85773-0.58205-1.4069l-1.5873-1.5877zm-1.0001 3.9999a1.0001 1.0001 0 0 1 0 2.0002 1.0001 1.0001 0 0 1 0-2.0002z" fill="#8eef97" stroke-width=".99999"/></svg>

After

Width:  |  Height:  |  Size: 1012 B

View File

@ -0,0 +1,38 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cwdtl2gnx5fs1"
path="res://.godot/imported/icon.svg-a1143e7d78a969bea3b43f8481309a20.ctex"
metadata={
"has_editor_variant": true,
"vram_texture": false
}
[deps]
source_file="res://addons/git_describe/label/icon.svg"
dest_files=["res://.godot/imported/icon.svg-a1143e7d78a969bea3b43f8481309a20.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=true
editor/convert_colors_with_editor_theme=true

View File

@ -0,0 +1,18 @@
[Linux]
path="bash"
arguments=["-c"]
which="which"
[Steam Linux Runtime]
; https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/slr-for-game-developers.md#running-commands-outside-the-container
path="steam-runtime-launch-client"
arguments=["--alongside-steam", "--host", "-c"]
which="which"
[Windows]
path="cmd.exe"
arguments=["/C"]
which="where"

View File

@ -0,0 +1,7 @@
[plugin]
name="Godot Git Describe"
description="Seamlessly display in-game versions based on your Git tags."
author="zibetnu"
version="0.4.0"
script="plugin.gd"

View File

@ -0,0 +1,49 @@
@tool
extends EditorPlugin
const Debugger = preload("debugger.gd")
const Exporter = preload("exporter.gd")
const Settings = preload("settings.gd")
const Utilities = preload("utilities.gd")
var debugger := Debugger.new()
var exporter := Exporter.new()
func _enter_tree() -> void:
debugger.erase_describe_callable = _erase_describe
exporter.erase_describe_callable = _erase_describe
exporter.set_describe_callable = _set_describe
add_debugger_plugin(debugger)
add_export_plugin(exporter)
Settings.init_settings()
Utilities.push_status()
func _build() -> bool:
_set_describe()
return true
func _disable_plugin() -> void:
remove_debugger_plugin(debugger)
remove_export_plugin(exporter)
_erase_describe()
func _exit_tree() -> void:
_disable_plugin()
func _set_describe() -> void:
var describe: String = Utilities.get_git_describe(
Settings.get_command_options()
)
Settings.set_describe_setting(describe)
Settings.append_project_name(describe, true)
func _erase_describe() -> void:
Settings.set_describe_setting(null)
Settings.append_project_name(Settings.cached_describe, false)

View File

@ -0,0 +1 @@
uid://dl32ptguu3hex

View File

@ -0,0 +1,71 @@
@tool
extends RefCounted
const BASE = "addons/git_describe/"
const SETTING_PATH_SETTING = BASE + "describe_setting_path"
const DEFAULT_SETTING_PATH = "application/config/git_describe"
const APPEND_PROJECT_NAME_SETTING = BASE + "append_describe_to_project_name"
const DEFAULT_APPEND_PROJECT_NAME = false
const PROJECT_NAME_SETTING = "application/config/name"
const COMMAND_OPTIONS_SETTING = BASE + "command_options"
const DEFAULT_COMMAND_OPTIONS = "--always"
static var cached_describe: String
static func init_setting(
setting_name: String,
initial_value: Variant,
basic := true
) -> void:
if not ProjectSettings.has_setting(setting_name):
ProjectSettings.set_setting(setting_name, initial_value)
ProjectSettings.set_as_basic(setting_name, basic)
ProjectSettings.set_initial_value(setting_name, initial_value)
static func init_settings() -> void:
init_setting(SETTING_PATH_SETTING, DEFAULT_SETTING_PATH)
init_setting(APPEND_PROJECT_NAME_SETTING, DEFAULT_APPEND_PROJECT_NAME)
init_setting(COMMAND_OPTIONS_SETTING, DEFAULT_COMMAND_OPTIONS, false)
static func append_project_name(describe: String, append: bool) -> void:
if not ProjectSettings.get_setting(APPEND_PROJECT_NAME_SETTING, false):
return
var project_name: String = ProjectSettings.get_setting(
PROJECT_NAME_SETTING
)
var separated_describe: String = " " + describe
match [append, project_name.ends_with(separated_describe)]:
[false, true]:
cached_describe = ""
project_name = project_name.replace(separated_describe, "")
[true, false]:
cached_describe = describe
project_name += separated_describe
ProjectSettings.set_setting(PROJECT_NAME_SETTING, project_name)
ProjectSettings.save()
static func get_command_options() -> String:
return ProjectSettings.get_setting(
COMMAND_OPTIONS_SETTING,
DEFAULT_COMMAND_OPTIONS
)
static func set_describe_setting(value: Variant) -> void:
var describe_setting: String = ProjectSettings.get_setting(
SETTING_PATH_SETTING,
DEFAULT_SETTING_PATH
)
ProjectSettings.set_setting(describe_setting, value)
ProjectSettings.save()

View File

@ -0,0 +1 @@
uid://3xjrlqx5le22

View File

@ -0,0 +1,111 @@
@tool
extends RefCounted
const CONFIG_PATH = "res://addons/git_describe/platforms.cfg"
const REPOSITORY_PATH = "res://"
static var platform_config: ConfigFile = load_platform_config()
static func execute(command: String) -> Results:
var platform_name: String = get_platform_name()
var path: String = platform_config.get_value(platform_name, "path", "")
var arguments: Array[String] = []
arguments.assign(
platform_config.get_value(platform_name, "arguments", "") as Array
)
arguments.append(command)
var output: Array[String] = []
var exit_code: int = OS.execute(path, arguments, output, true)
return Results.new(output, exit_code)
static func get_git_describe(options := "") -> String:
const DEFAULT_GIT_DESCRIBE = ""
if not is_git_repository_found():
return DEFAULT_GIT_DESCRIBE
if not is_git_found():
return DEFAULT_GIT_DESCRIBE
var results: Results = execute("git describe " + options)
if results.exit_code != 0:
return DEFAULT_GIT_DESCRIBE
return results.output[0].strip_edges()
static func get_platform_name() -> String:
if is_in_steam_runtime():
return "Steam Linux Runtime"
return OS.get_name()
static func is_git_found() -> bool:
var which: String = platform_config.get_value(
get_platform_name(), "which", ""
)
var results: Results = execute(" ".join([which, "git"]))
return results.exit_code == 0 and not results.output[0].is_empty()
static func is_git_repository_found() -> bool:
return DirAccess.dir_exists_absolute(REPOSITORY_PATH.path_join(".git"))
# gdlint:ignore = max-line-length
# https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/slr-for-game-developers.md#detecting-the-container-environment
static func is_in_steam_runtime() -> bool:
if OS.get_name() != "Linux":
return false
const CAT_COMMAND = "cat"
var output: Array[String] = []
OS.execute(CAT_COMMAND, ["/etc/os-release"], output)
OS.execute(CAT_COMMAND, ["/run/host/container-manager"], output)
return "steamrt" in output[0] or "pressure-vessel" in output[1]
static func is_platform_configured() -> bool:
return get_platform_name() in platform_config.get_sections()
static func load_platform_config() -> ConfigFile:
var config := ConfigFile.new()
config.load(CONFIG_PATH)
return config
static func push_status() -> void:
const PRINT_ID = "Godot Git Describe: "
if not is_platform_configured():
push_error(
PRINT_ID,
"\"%s\" configuration not found in \"%s\"." % [
get_platform_name(),
CONFIG_PATH
]
)
elif not is_git_repository_found():
push_error(
PRINT_ID,
"Git repository not found in \"%s\"."
% ProjectSettings.globalize_path(REPOSITORY_PATH)
)
elif not is_git_found():
push_error(PRINT_ID, "Git not found.")
class Results:
var output: Array[String]
var exit_code: int
@warning_ignore("shadowed_variable")
func _init(output: Array[String] = [], exit_code := 0) -> void:
self.output = output
self.exit_code = exit_code

View File

@ -0,0 +1 @@
uid://1gbfdpfhngs1

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016-2023 The Godot Engine community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
[configuration]
entry_symbol = "git_plugin_init"
compatibility_minimum = "4.1.0"
[libraries]
macos.editor = "macos/libgit_plugin.macos.editor.universal.dylib"
windows.editor.x86_64 = "win64/libgit_plugin.windows.editor.x86_64.dll"
linux.editor.x86_64 = "linux/libgit_plugin.linux.editor.x86_64.so"
linux.editor.arm64 = "linux/libgit_plugin.linux.editor.arm64.so"
linux.editor.rv64 = ""

View File

@ -0,0 +1 @@
uid://gmi3jeghe2j8

View File

@ -0,0 +1,7 @@
[plugin]
name="Godot Git Plugin"
description="This plugin lets you interact with Git without leaving the Godot editor. More information can be found at https://github.com/godotengine/godot-git-plugin/wiki"
author="twaritwaikar"
version="v3.1.1"
script="godot-git-plugin.gd"

View File

@ -0,0 +1,9 @@
# MIT License
Copyright 2022 Gennady "Don Tnowe" Krupenyov
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,6 @@
@tool
extends Control
func _ready():
modulate = get_theme_color("accent_color", "Editor")

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