csg插件
This commit is contained in:
@@ -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_blockout/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")
|
||||
@@ -0,0 +1,243 @@
|
||||
[gd_scene format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/csg_blockout/scripts/csg_side_blockout_bar.gd" id="1_awo4p"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/box.svg" id="2_p4f7r"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/cyliner.svg" id="3_j7s68"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/mesh.svg" id="4_328ee"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/polygon.svg" id="5_0os5t"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/sphere.svg" id="6_ju1pi"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/torus.svg" id="7_6hoxg"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/union.svg" id="8_gmt87"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/intersection.svg" id="9_55ipi"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/subtraction.svg" id="10_8u5xb"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/empty-material.svg" id="11_ten1m"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/grid_light.svg" id="12_light"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/grid_dark.svg" id="13_dark"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/grid_orange.svg" id="14_orange"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/material_none.svg" id="15_none"]
|
||||
[ext_resource type="Texture2D" path="res://addons/csg_blockout/res/icons/apply_material.svg" id="16_apply"]
|
||||
|
||||
[sub_resource type="ButtonGroup" id="ButtonGroup_2ipgb"]
|
||||
|
||||
[sub_resource type="ButtonGroup" id="ButtonGroup_mat"]
|
||||
|
||||
[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 = 12
|
||||
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 = "立方体"
|
||||
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 = "圆柱体"
|
||||
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 = "网格"
|
||||
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 = "多边形"
|
||||
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 = "球体"
|
||||
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 = "圆环"
|
||||
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 = "并集"
|
||||
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 = "交集"
|
||||
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 = "差集"
|
||||
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="PresetLight" type="Button" parent="ScrollContainer/HBoxContainer/Material"]
|
||||
custom_minimum_size = Vector2(42, 36)
|
||||
layout_mode = 2
|
||||
tooltip_text = "灰白网格"
|
||||
theme_override_constants/icon_max_width = 22
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_mat")
|
||||
icon = ExtResource("12_light")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="PresetDark" type="Button" parent="ScrollContainer/HBoxContainer/Material"]
|
||||
custom_minimum_size = Vector2(42, 36)
|
||||
layout_mode = 2
|
||||
tooltip_text = "深灰网格"
|
||||
theme_override_constants/icon_max_width = 22
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_mat")
|
||||
icon = ExtResource("13_dark")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="PresetOrange" type="Button" parent="ScrollContainer/HBoxContainer/Material"]
|
||||
custom_minimum_size = Vector2(42, 36)
|
||||
layout_mode = 2
|
||||
tooltip_text = "橙色网格"
|
||||
theme_override_constants/icon_max_width = 22
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_mat")
|
||||
icon = ExtResource("14_orange")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="PresetNone" type="Button" parent="ScrollContainer/HBoxContainer/Material"]
|
||||
custom_minimum_size = Vector2(42, 36)
|
||||
layout_mode = 2
|
||||
tooltip_text = "无材质(白模)"
|
||||
theme_override_constants/icon_max_width = 22
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_mat")
|
||||
icon = ExtResource("15_none")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="MaterialPicker" type="Button" parent="ScrollContainer/HBoxContainer/Material"]
|
||||
custom_minimum_size = Vector2(42, 36)
|
||||
layout_mode = 2
|
||||
tooltip_text = "自定义材质"
|
||||
theme_override_constants/icon_max_width = 22
|
||||
toggle_mode = true
|
||||
button_group = SubResource("ButtonGroup_mat")
|
||||
icon = ExtResource("11_ten1m")
|
||||
icon_alignment = 1
|
||||
expand_icon = true
|
||||
|
||||
[node name="ApplyToSelected" type="Button" parent="ScrollContainer/HBoxContainer/Material"]
|
||||
custom_minimum_size = Vector2(42, 36)
|
||||
layout_mode = 2
|
||||
tooltip_text = "应用材质到选中节点"
|
||||
theme_override_constants/icon_max_width = 22
|
||||
icon = ExtResource("16_apply")
|
||||
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="LanguageToggle" type="OptionButton" parent="ScrollContainer/HBoxContainer"]
|
||||
custom_minimum_size = Vector2(36, 22)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
tooltip_text = "Language / 语言"
|
||||
theme_override_font_sizes/font_size = 11
|
||||
alignment = 1
|
||||
flat = true
|
||||
fit_to_longest_item = false
|
||||
|
||||
[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/PresetLight" to="." method="_on_preset_light_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Material/PresetDark" to="." method="_on_preset_dark_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Material/PresetOrange" to="." method="_on_preset_orange_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Material/PresetNone" to="." method="_on_preset_none_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Material/MaterialPicker" to="." method="_on_material_picker_pressed"]
|
||||
[connection signal="pressed" from="ScrollContainer/HBoxContainer/Material/ApplyToSelected" to="." method="_on_apply_to_selected_pressed"]
|
||||
[connection signal="item_selected" from="ScrollContainer/HBoxContainer/LanguageToggle" to="." method="_on_language_toggle_item_selected"]
|
||||
@@ -0,0 +1,22 @@
|
||||
[gd_scene format=3 uid="uid://dgldacs362p7g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dk6dt8fk1s43s" path="res://addons/csg_blockout/scripts/csg_top_blockout_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 = "刷新"
|
||||
flat = true
|
||||
|
||||
[node name="Bake" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
text = "烘焙"
|
||||
flat = true
|
||||
|
||||
[connection signal="pressed" from="Refresh" to="." method="_on_refresh_pressed"]
|
||||
[connection signal="pressed" from="Bake" to="." method="_on_bake_pressed"]
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user