Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Meta-Ben committed Sep 24, 2024
2 parents 73d66cc + 1cc96c9 commit ffea889
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 1 addition & 3 deletions addons/Previewer_2D_3D/Previewer2D3D.gd
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ func _setup_viewports():
pass

#UPDATE_ALWAYS allow us to modify the viewport even if the view it refer is no more visible
current_subviewport.render_target_update_mode = SubViewport.UPDATE_WHEN_VISIBLE
current_subviewport.render_target_update_mode = SubViewport.UPDATE_ALWAYS
current_subviewport.size.y = size.y
current_subviewport.size.x = size.x

subviewport_texture.texture = current_subviewport.get_texture()
subviewport_texture.size.x = size.x

Expand Down Expand Up @@ -201,4 +200,3 @@ func _on_preview_container_gui_input(event):
_manage_zoom_out()
pass
pass # Replace with function body.

13 changes: 6 additions & 7 deletions addons/Previewer_2D_3D/Previewer2D3D.tscn
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ load_path = "res://.godot/imported/right.png-9cc6d7d936785b805dc429437a2f4ab7.ct
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_8di4p"]
load_path = "res://.godot/imported/botom.png-80a435593c6bac454efb141a994fa9d3.ctex"

[sub_resource type="ViewportTexture" id="ViewportTexture_b6fjb"]
viewport_path = NodePath("Container/PreviewContainer/2D_Viewport")
[sub_resource type="ViewportTexture" id="ViewportTexture_ffsvy"]
viewport_path = NodePath("Container/PreviewContainer/Current_Viewport")

[node name="Preview" type="Control"]
z_index = 999
Expand All @@ -22,7 +22,8 @@ layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -1280.0
offset_left = -384.0
offset_right = -896.0
offset_bottom = 1078.0
grow_horizontal = 2
grow_vertical = 2
Expand Down Expand Up @@ -61,7 +62,6 @@ clip_text = true
item_count = 3
popup/item_0/text = "Left"
popup/item_0/icon = SubResource("CompressedTexture2D_q3rui")
popup/item_0/id = 0
popup/item_1/text = "Right"
popup/item_1/icon = SubResource("CompressedTexture2D_8crud")
popup/item_1/id = 1
Expand All @@ -82,19 +82,18 @@ offset_right = 640.0
offset_bottom = 2158.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("ViewportTexture_b6fjb")
texture = SubResource("ViewportTexture_ffsvy")
stretch_mode = 6

[node name="3D_Viewport" type="SubViewport" parent="Container/PreviewContainer"]
transparent_bg = true

[node name="Current_Viewport" type="SubViewport" parent="Container/PreviewContainer"]
transparent_bg = true
handle_input_locally = false

[node name="2D_Viewport" type="SubViewport" parent="Container/PreviewContainer"]
transparent_bg = true
size = Vector2i(640, 2158)
size = Vector2i(640, 1726)
render_target_update_mode = 4

[connection signal="gui_input" from="Container/PreviewContainer" to="." method="_on_preview_container_gui_input"]
2 changes: 1 addition & 1 deletion addons/Previewer_2D_3D/plugin.cfg
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="Previewer_2D_3D"
description="Allow user to visualise 2D world during editing 3D and visualise 3D world during editing 2D"
author="Amealky"
version="0.0.1"
version="1.0.0"
script="Previewer2D3D_Plugin.gd"

0 comments on commit ffea889

Please sign in to comment.