convert to addon

This commit is contained in:
Holly Stubbs 2025-04-24 21:27:10 +01:00
parent f2a9da7ce9
commit a2901aec3a
Signed by: tgpholly
GPG key ID: B8583C4B7D18119E
25 changed files with 49 additions and 64 deletions

View file

@ -0,0 +1,12 @@
@tool
extends EditorPlugin
func _enter_tree() -> void:
# Initialization of the plugin goes here.
pass
func _exit_tree() -> void:
# Clean-up of the plugin goes here.
pass

View file

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

View file

@ -0,0 +1,7 @@
[plugin]
name="Godot SSTV"
description="A plugin that allows you to generate SSTV in your project."
author="tgpholly"
version="0.1.0"
script="godot-sstv.gd"

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://doprjuugw7ga7" uid="uid://doprjuugw7ga7"
path="res://.godot/imported/checker.png-92fa9be0ae7ebdef80a2df49e06c564e.ctex" path="res://.godot/imported/checker.png-61e4037b29eb0c32a72983d949d6df28.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://tests/checker.png" source_file="res://addons/godot-sstv/tests/checker.png"
dest_files=["res://.godot/imported/checker.png-92fa9be0ae7ebdef80a2df49e06c564e.ctex"] dest_files=["res://.godot/imported/checker.png-61e4037b29eb0c32a72983d949d6df28.ctex"]
[params] [params]

View file

@ -1,8 +1,8 @@
extends Node3D extends Node3D
func encode_sstv(): func encode_sstv():
#var encoder = Martin1.new() var encoder = Martin1.new()
var encoder = RobotBW8.new() #var encoder = RobotBW8.new()
var cameraImage = get_viewport().get_texture().get_image() var cameraImage = get_viewport().get_texture().get_image()
#var cameraImage = load("res://tests/checker.png").get_image() #var cameraImage = load("res://tests/checker.png").get_image()
#var cameraImage = load("res://tests/spiral.png").get_image() #var cameraImage = load("res://tests/spiral.png").get_image()
@ -10,15 +10,15 @@ func encode_sstv():
#var cameraImage = load("res://tests/testtest2.png").get_image() #var cameraImage = load("res://tests/testtest2.png").get_image()
#var cameraImage = load("res://tests/testtest3.png").get_image() #var cameraImage = load("res://tests/testtest3.png").get_image()
var audioBuffer = encoder.EncodeSSTV(cameraImage, false) var audioBuffer = encoder.EncodeSSTV(cameraImage, false)
encoder.SaveAsWav("res://../sstv.wav") #encoder.SaveAsWav("res://../sstv.wav")
# Spew that audio yo. # Spew that audio yo.
#$AudioStreamPlayer.stream.mix_rate = SSTVEncoder.SAMPLE_RATE $AudioStreamPlayer.stream.mix_rate = SSTVEncoder.SAMPLE_RATE
#$AudioStreamPlayer.stream.buffer_length = 120 $AudioStreamPlayer.stream.buffer_length = 120
#$AudioStreamPlayer.play() $AudioStreamPlayer.play()
#var player = $AudioStreamPlayer.get_stream_playback() var player = $AudioStreamPlayer.get_stream_playback()
#for i in range(0, audioBuffer.size()): for i in range(0, audioBuffer.size()):
#player.push_frame(Vector2(audioBuffer[i], audioBuffer[i])) player.push_frame(Vector2(audioBuffer[i], audioBuffer[i]))
# a lil hacky delay so sdfgi can settle lol. # a lil hacky delay so sdfgi can settle lol.
var startTimer = 0 var startTimer = 0

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=8 format=3 uid="uid://dt230shblncgx"] [gd_scene load_steps=8 format=3 uid="uid://dt230shblncgx"]
[ext_resource type="Script" uid="uid://bx4xg8k3m1wos" path="res://node_3d.gd" id="1_a202f"] [ext_resource type="Script" uid="uid://bx4xg8k3m1wos" path="res://addons/godot-sstv/tests/node_3d.gd" id="1_a202f"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_a202f"] [sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_a202f"]

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://c7ayqic8e3l60" uid="uid://c7ayqic8e3l60"
path="res://.godot/imported/spiral.png-22b5746c0fb32849d6990602fdefbcc8.ctex" path="res://.godot/imported/spiral.png-517cd1ba00a0fd1b4b06a3657d7aa467.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://tests/spiral.png" source_file="res://addons/godot-sstv/tests/spiral.png"
dest_files=["res://.godot/imported/spiral.png-22b5746c0fb32849d6990602fdefbcc8.ctex"] dest_files=["res://.godot/imported/spiral.png-517cd1ba00a0fd1b4b06a3657d7aa467.ctex"]
[params] [params]

View file

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://b44c511u6oile" uid="uid://b44c511u6oile"
path="res://.godot/imported/testtest.png-5867611cf1f138e6707d303cad402dab.ctex" path="res://.godot/imported/testtest.png-53e8a4b15b30c59462dbaaacad53b832.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://tests/testtest.png" source_file="res://addons/godot-sstv/tests/testtest.png"
dest_files=["res://.godot/imported/testtest.png-5867611cf1f138e6707d303cad402dab.ctex"] dest_files=["res://.godot/imported/testtest.png-53e8a4b15b30c59462dbaaacad53b832.ctex"]
[params] [params]

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://t5rtcbk8u7yo" uid="uid://t5rtcbk8u7yo"
path="res://.godot/imported/testtest2.png-e9060202f6a513b94a63dcc46f5ebdaf.ctex" path="res://.godot/imported/testtest2.png-602ec7d716183786be501e15fe0a5979.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://tests/testtest2.png" source_file="res://addons/godot-sstv/tests/testtest2.png"
dest_files=["res://.godot/imported/testtest2.png-e9060202f6a513b94a63dcc46f5ebdaf.ctex"] dest_files=["res://.godot/imported/testtest2.png-602ec7d716183786be501e15fe0a5979.ctex"]
[params] [params]

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -3,15 +3,15 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://cqyo3c1lqmrf5" uid="uid://cqyo3c1lqmrf5"
path="res://.godot/imported/testtest3.png-5bfd47758621c96c5da213ca5fc277aa.ctex" path="res://.godot/imported/testtest3.png-d35b5c59a1d9fa6f638ef1743c65ce4b.ctex"
metadata={ metadata={
"vram_texture": false "vram_texture": false
} }
[deps] [deps]
source_file="res://tests/testtest3.png" source_file="res://addons/godot-sstv/tests/testtest3.png"
dest_files=["res://.godot/imported/testtest3.png-5bfd47758621c96c5da213ca5fc277aa.ctex"] dest_files=["res://.godot/imported/testtest3.png-d35b5c59a1d9fa6f638ef1743c65ce4b.ctex"]
[params] [params]

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

Before

Width:  |  Height:  |  Size: 994 B

View file

@ -1,37 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ditahryq1qbup"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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

@ -13,4 +13,7 @@ config_version=5
config/name="SSTV" config/name="SSTV"
run/main_scene="uid://dt230shblncgx" run/main_scene="uid://dt230shblncgx"
config/features=PackedStringArray("4.4", "Forward Plus") config/features=PackedStringArray("4.4", "Forward Plus")
config/icon="res://icon.svg"
[editor_plugins]
enabled=PackedStringArray("res://addons/godot-sstv/plugin.cfg")