Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed assets/font/SourceCodePro-VariableFont_wght.ttf
Binary file not shown.
36 changes: 0 additions & 36 deletions assets/font/SourceCodePro-VariableFont_wght.ttf.import

This file was deleted.

12 changes: 6 additions & 6 deletions assets/icons/PlayAlt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 39 additions & 1 deletion assets/icons/PlayPause.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/RandomMode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions assets/icons/RandomMode.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cfdxexemm7766"
path="res://.godot/imported/RandomMode.svg-0e6de5f36ee5ae23b97ec7abca32de16.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/icons/RandomMode.svg"
dest_files=["res://.godot/imported/RandomMode.svg-0e6de5f36ee5ae23b97ec7abca32de16.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
1 change: 1 addition & 0 deletions assets/icons/Zone.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions assets/icons/Zone.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bc0acgx0we044"
path="res://.godot/imported/Zone.svg-4ee6a3e7c2a26955050d813c1a1ed98d.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/icons/Zone.svg"
dest_files=["res://.godot/imported/Zone.svg-4ee6a3e7c2a26955050d813c1a1ed98d.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
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/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
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
44 changes: 44 additions & 0 deletions components/DataInputs/DataInputColor/DataInputColor.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2026 Liam Sherwin. All rights reserved.
# This file is part of the Spectrum Lighting Controller, licensed under the GPL v3.0 or later.
# See the LICENSE file for details.

class_name DataInputColor extends DataInput
## DataInput for Data.Type.COLOR


## The LineEdit
var _button: ColorPickerButton


## Ready
func _ready() -> void:
_data_type = Data.Type.COLOR
_button = $HBox/Button
_label = $HBox/Label
_outline = $HBox/Button/Outline
_focus_node = _button


## Resets this DataInputString
func _reset() -> void:
_button.set_pick_color(Color.WHITE)


## Override this function to provide a SettingsModule to display
func _settings_module_changed(p_module: SettingsModule) -> void:
_button.set_pick_color(p_module.get_getter().call())


## Called when the editable state is changed
func _set_editable(p_editable: bool) -> void:
_button.set_disabled(not p_editable)


## Called when the button is pressed down
func _on_button_button_down() -> void:
_update_outline_feedback(_module.get_setter().call())


## Called when the color is changed on the color picker
func _on_button_color_changed(p_color: Color) -> void:
_update_outline_feedback(_module.get_setter().call(p_color))
1 change: 1 addition & 0 deletions components/DataInputs/DataInputColor/DataInputColor.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://cgohncgxj4a8f
35 changes: 35 additions & 0 deletions components/DataInputs/DataInputColor/DataInputColor.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[gd_scene load_steps=3 format=3 uid="uid://rac2xe1lsdhe"]

[ext_resource type="Script" uid="uid://cgohncgxj4a8f" path="res://components/DataInputs/DataInputColor/DataInputColor.gd" id="1_0hx11"]
[ext_resource type="StyleBox" uid="uid://cftl4b5dnt57b" path="res://assets/styles/ResolveBoxBGLess.tres" id="2_v7583"]

[node name="DataInputColor" type="PanelContainer"]
custom_minimum_size = Vector2(0, 50)
offset_right = 86.5625
offset_bottom = 49.0
script = ExtResource("1_0hx11")

[node name="HBox" type="HBoxContainer" parent="."]
layout_mode = 2

[node name="Label" type="Label" parent="HBox"]
visible = false
layout_mode = 2

[node name="Button" type="ColorPickerButton" parent="HBox"]
custom_minimum_size = Vector2(150, 0)
layout_mode = 2
size_flags_horizontal = 10

[node name="Outline" type="Panel" parent="HBox/Button"]
modulate = Color(1, 1, 1, 0)
layout_mode = 0
offset_top = 721.0
offset_right = 298.0
offset_bottom = 721.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 1
theme_override_styles/panel = ExtResource("2_v7583")

[connection signal="color_changed" from="HBox/Button" to="." method="_on_button_color_changed"]
2 changes: 1 addition & 1 deletion components/TO_BE_SORTED/PlaybackRow/PlaybackRow.gd
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func load_auto_config(component: EngineComponent) -> void:
slider.deserialize(config)


set_label(component.name)
set_label(component.name())


## Saves this PlayBack row into a dict
Expand Down
18 changes: 13 additions & 5 deletions core/components/FixtureManifest.gd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class_name FixtureManifest extends EngineComponent
## Info: This FixtureManifest contains basic info for a given manifest file.
enum Type {Manifest, Info}


## Current type of this FixtureManifest
var type: Type = Type.Manifest

Expand Down Expand Up @@ -37,7 +38,7 @@ func _init(p_uuid: String = UUID_Util.v4(), p_name: String = _name) -> void:
super._init(p_uuid, p_name)

_set_self_class("FixtureManifest")
_set_name("FixtureManifest")
set_name("FixtureManifest")


## Creates a new mode
Expand Down Expand Up @@ -65,13 +66,14 @@ func create_zone(p_mode: String, p_zone: String) -> bool:


## Creates a parameter in the given mode and zone
func add_parameter(p_mode: String, p_zone: String, p_parameter: String, p_channels: Array[int], p_category: String = "") -> bool:
func add_parameter(p_mode: String, p_zone: String, p_parameter: String, p_channels: Array[int], p_category: String = "", p_default_function: String = "") -> bool:
if not _modes.has(p_mode) or not _modes[p_mode].zones.has(p_zone):
return false

_modes[p_mode].zones[p_zone][p_parameter] = {
"attribute": p_parameter,
"offsets": p_channels.duplicate(),
"default_function": p_default_function,
"functions": {}
}

Expand Down Expand Up @@ -103,7 +105,7 @@ func remove_parameter(p_mode: String, p_zone: String, p_parameter: String) -> bo


## Adds a funtion to the given parameter
func add_parameter_function(p_mode: String, p_zone: String, p_parameter: String, p_function: String, p_name: String, p_default: int, p_range: Array[int], p_can_fade: bool, p_vdim_effected: bool) -> bool:
func add_parameter_function(p_mode: String, p_zone: String, p_parameter: String, p_function: String, p_name: String, p_default: int, p_range: Array[int], p_can_fade: bool, p_vdim_effected: bool, p_control_type: Fixture.ControlType) -> bool:
if not _modes.has(p_mode) or not _modes[p_mode].zones.has(p_zone) or not _modes[p_mode].zones[p_zone].has(p_parameter):
return false

Expand All @@ -113,6 +115,7 @@ func add_parameter_function(p_mode: String, p_zone: String, p_parameter: String,
"default": p_default,
"can_fade": p_can_fade,
"vdim_effected": p_vdim_effected,
"control_type": p_control_type,
"dmx_range": p_range.duplicate(),
"sets": []
}
Expand Down Expand Up @@ -168,9 +171,14 @@ func function_can_vdim(p_mode: String, p_zone: String, p_parameter: String, p_fu
return _modes.get(p_mode, {}).get("zones", {}).get(p_zone, {}).get(p_parameter, {}).get("functions", {}).get(p_function, {}).get("vdim_effected", false)


## Checks if this FixtureManifest has a function that can vdim
func function_control_type(p_mode: String, p_zone: String, p_parameter: String, p_function: String) -> Fixture.ControlType:
return _modes.get(p_mode, {}).get("zones", {}).get(p_zone, {}).get(p_parameter, {}).get("functions", {}).get(p_function, {}).get("control_type", Fixture.ControlType.VALUE)


## Returns the given mode
func get_mode(p_mode: String) -> Dictionary:
return _modes.get(p_mode, {}).duplicate(true)
return _modes.get(p_mode, {})


## Returns all the modes in this manifest
Expand Down Expand Up @@ -245,7 +253,7 @@ func deserialize(p_serialized_data: Dictionary) -> void:
manufacturer = type_convert(p_serialized_data.get("manufacturer"), TYPE_STRING)
importer = type_convert(p_serialized_data.get("importer"), TYPE_STRING)
file_path = type_convert(p_serialized_data.get("file_path"), TYPE_STRING)

_modes = type_convert(p_serialized_data.get("modes"), TYPE_DICTIONARY)
_categorys = type_convert(p_serialized_data.get("categorys"), TYPE_DICTIONARY)
_force_defaults = Array(type_convert(p_serialized_data.get("force_defaults"), TYPE_ARRAY), TYPE_STRING, "", null)
2 changes: 1 addition & 1 deletion core/components/Universe.gd
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func _remove_output(p_output: DMXOutput, p_no_signal: bool = false, p_delete: bo
outputs_removed.emit([p_output])

if p_delete:
p_output.local_delete()
p_output.delete()

return true

Expand Down
Loading