added CSG toolkit
This commit is contained in:
125
addons/csg_toolkit/scenes/config_window.tscn
Normal file
125
addons/csg_toolkit/scenes/config_window.tscn
Normal file
@@ -0,0 +1,125 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dts41g6camqwq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b7isqiq2asnu6" path="res://addons/csg_toolkit/scripts/config_window.gd" id="1_pigko"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ng5lh"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_vj6tm"]
|
||||
|
||||
[node name="ConfigWindow" type="Window"]
|
||||
oversampling_override = 1.0
|
||||
title = "CSG Toolit Configuration"
|
||||
initial_position = 1
|
||||
size = Vector2i(480, 360)
|
||||
popup_window = true
|
||||
script = ExtResource("1_pigko")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 8
|
||||
theme_override_constants/margin_top = 8
|
||||
theme_override_constants/margin_right = 8
|
||||
theme_override_constants/margin_bottom = 8
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Default Behavior"
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_ng5lh")
|
||||
|
||||
[node name="OptionButton" type="OptionButton" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
selected = 0
|
||||
item_count = 2
|
||||
popup/item_0/text = "Sibling"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "Child"
|
||||
popup/item_1/id = 1
|
||||
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Action Key"
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_ng5lh")
|
||||
|
||||
[node name="Button" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
text = "Shift"
|
||||
|
||||
[node name="HBoxContainer4" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
text = "Behvaior Toggle"
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="MarginContainer/VBoxContainer/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_ng5lh")
|
||||
|
||||
[node name="Button" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer4"]
|
||||
layout_mode = 2
|
||||
text = "Shift"
|
||||
|
||||
[node name="HBoxContainer3" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
|
||||
layout_mode = 2
|
||||
text = "Auto Hide"
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_ng5lh")
|
||||
|
||||
[node name="CheckButton" type="CheckBox" parent="MarginContainer/VBoxContainer/HBoxContainer3"]
|
||||
layout_mode = 2
|
||||
button_pressed = true
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_vj6tm")
|
||||
|
||||
[node name="Save" type="Button" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Save"
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Ko-Fi" type="LinkButton" parent="MarginContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "Support me on Ko-Fi"
|
||||
underline = 1
|
||||
uri = "https://ko-fi.com/luckyteapot"
|
||||
|
||||
[connection signal="item_selected" from="MarginContainer/VBoxContainer/HBoxContainer/OptionButton" to="." method="_on_option_button_item_selected"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer2/Button" to="." method="_on_button_pressed"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/HBoxContainer4/Button" to="." method="_on_second_button_pressed"]
|
||||
[connection signal="toggled" from="MarginContainer/VBoxContainer/HBoxContainer3/CheckButton" to="." method="_on_check_box_toggled"]
|
||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/Save" to="." method="_on_save_pressed"]
|
||||
20
addons/csg_toolkit/scenes/csg_quick_actions.tscn
Normal file
20
addons/csg_toolkit/scenes/csg_quick_actions.tscn
Normal file
@@ -0,0 +1,20 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dhpjubljm0tf0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cjxx30pcamj36" path="res://addons/csg_toolkit/res/icons/box.svg" id="1_n1dqv"]
|
||||
|
||||
[node name="CsgQuickActions" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="Box" type="TextureButton" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
texture_normal = ExtResource("1_n1dqv")
|
||||
179
addons/csg_toolkit/scenes/csg_side_toolkit_bar.tscn
Normal file
179
addons/csg_toolkit/scenes/csg_side_toolkit_bar.tscn
Normal file
@@ -0,0 +1,179 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://cdjxmp0p1bbup"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dr5f1egll7hdq" path="res://addons/csg_toolkit/scripts/csg_side_toolkit_bar.gd" id="1_awo4p"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjxx30pcamj36" path="res://addons/csg_toolkit/res/icons/box.svg" id="2_p4f7r"]
|
||||
[ext_resource type="Texture2D" uid="uid://dioxt3oaqvsi3" path="res://addons/csg_toolkit/res/icons/cyliner.svg" id="3_j7s68"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnpu878eanspj" path="res://addons/csg_toolkit/res/icons/mesh.svg" id="4_328ee"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjps2pofcsfc0" path="res://addons/csg_toolkit/res/icons/polygon.svg" id="5_0os5t"]
|
||||
[ext_resource type="Texture2D" uid="uid://kpld1ou63wlf" path="res://addons/csg_toolkit/res/icons/sphere.svg" id="6_ju1pi"]
|
||||
[ext_resource type="Texture2D" uid="uid://gbgmyv4bknqo" path="res://addons/csg_toolkit/res/icons/torus.svg" id="7_6hoxg"]
|
||||
[ext_resource type="Texture2D" uid="uid://sc7itwu80oi3" path="res://addons/csg_toolkit/res/icons/union.svg" id="8_gmt87"]
|
||||
[ext_resource type="Texture2D" uid="uid://2kohi3tb3c70" path="res://addons/csg_toolkit/res/icons/intersection.svg" id="9_55ipi"]
|
||||
[ext_resource type="Texture2D" uid="uid://snbhkpq6sh4j" path="res://addons/csg_toolkit/res/icons/subtraction.svg" id="10_8u5xb"]
|
||||
[ext_resource type="Texture2D" uid="uid://cg5jbylrlg00x" path="res://addons/csg_toolkit/res/icons/empty-material.svg" id="11_ten1m"]
|
||||
[ext_resource type="Texture2D" uid="uid://clgooji83dl4u" path="res://addons/csg_toolkit/res/icons/config.svg" id="12_3gawg"]
|
||||
|
||||
[sub_resource type="ButtonGroup" id="ButtonGroup_2ipgb"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ixko7"]
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(52, 0)
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_right = -2.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_top = 8
|
||||
theme_override_constants/margin_bottom = 8
|
||||
script = ExtResource("1_awo4p")
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="."]
|
||||
layout_mode = 2
|
||||
horizontal_scroll_mode = 0
|
||||
|
||||
[node name="HBoxContainer" type="VBoxContainer" parent="ScrollContainer"]
|
||||
custom_minimum_size = Vector2(0, 120)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 6
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 16
|
||||
alignment = 1
|
||||
|
||||
[node name="CSG" type="VBoxContainer" parent="ScrollContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Box" type="Button" parent="ScrollContainer/HBoxContainer/CSG"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Box"
|
||||
icon = ExtResource("2_p4f7r")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Cylinder" type="Button" parent="ScrollContainer/HBoxContainer/CSG"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Cylinder"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
icon = ExtResource("3_j7s68")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Mesh" type="Button" parent="ScrollContainer/HBoxContainer/CSG"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Mesh"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
icon = ExtResource("4_328ee")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Polygon" type="Button" parent="ScrollContainer/HBoxContainer/CSG"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Polygon"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
icon = ExtResource("5_0os5t")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Sphere" type="Button" parent="ScrollContainer/HBoxContainer/CSG"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Sphere"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
icon = ExtResource("6_ju1pi")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Torus" type="Button" parent="ScrollContainer/HBoxContainer/CSG"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Torus"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
icon = ExtResource("7_6hoxg")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Operation" type="VBoxContainer" parent="ScrollContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Union" type="Button" parent="ScrollContainer/HBoxContainer/Operation"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Union"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_2ipgb")
|
||||
icon = ExtResource("8_gmt87")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Intersection" type="Button" parent="ScrollContainer/HBoxContainer/Operation"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Intersection"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_2ipgb")
|
||||
icon = ExtResource("9_55ipi")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Subtraction" type="Button" parent="ScrollContainer/HBoxContainer/Operation"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Subtraction"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_2ipgb")
|
||||
icon = ExtResource("10_8u5xb")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="Material" type="VBoxContainer" parent="ScrollContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="MaterialPicker" type="Button" parent="ScrollContainer/HBoxContainer/Material"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Material"
|
||||
icon = ExtResource("11_ten1m")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="ScrollContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_styles/separator = SubResource("StyleBoxEmpty_ixko7")
|
||||
|
||||
[node name="Options" type="VBoxContainer" parent="ScrollContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
alignment = 1
|
||||
|
||||
[node name="Config" type="Button" parent="ScrollContainer/HBoxContainer/Options"]
|
||||
custom_minimum_size = Vector2(42, 42)
|
||||
layout_mode = 2
|
||||
tooltip_text = "Config"
|
||||
theme_override_constants/icon_max_width = 24
|
||||
icon = ExtResource("12_3gawg")
|
||||
icon_alignment = 1
|
||||
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/CSG/Box" to="." method="_on_box_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/CSG/Cylinder" to="." method="_on_cylinder_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/CSG/Mesh" to="." method="_on_mesh_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/CSG/Polygon" to="." method="_on_polygon_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/CSG/Sphere" to="." method="_on_sphere_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/CSG/Torus" to="." method="_on_torus_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Operation/Union" to="." method="_on_operation_pressed" binds= [0]]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Operation/Intersection" to="." method="_on_operation_pressed" binds= [1]]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Operation/Subtraction" to="." method="_on_operation_pressed" binds= [2]]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Material/MaterialPicker" to="." method="_on_material_picker_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Options/Config" to="." method="_on_config_pressed"]
|
||||
16
addons/csg_toolkit/scenes/csg_top_toolkit_bar.tscn
Normal file
16
addons/csg_toolkit/scenes/csg_top_toolkit_bar.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dgldacs362p7g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dk6dt8fk1s43s" path="res://addons/csg_toolkit/scripts/csg_top_toolkit_bar.gd" id="1_154hl"]
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer"]
|
||||
visible = false
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("1_154hl")
|
||||
|
||||
[node name="Refresh" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
text = "Refresh"
|
||||
flat = true
|
||||
|
||||
[connection signal="pressed" from="Refresh" to="." method="_on_refresh_pressed"]
|
||||
5
addons/csg_toolkit/scenes/demo.tscn
Normal file
5
addons/csg_toolkit/scenes/demo.tscn
Normal file
@@ -0,0 +1,5 @@
|
||||
[gd_scene format=3 uid="uid://b6adrnqobv5fi"]
|
||||
|
||||
[node name="Demo" type="Node3D"]
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
||||
Reference in New Issue
Block a user