mirror of
				https://github.com/nefrace/godot-camera-preview.git
				synced 2025-11-04 15:59:18 +03:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			8a22cb6533
			...
			eff4641547
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| eff4641547 | |||
| 2255903ab2 | 
@ -1,7 +1,7 @@
 | 
			
		||||
[gd_scene load_steps=4 format=2]
 | 
			
		||||
 | 
			
		||||
[ext_resource path="res://addons/camera_preview/cam_preview.gd" type="Script" id=1]
 | 
			
		||||
[ext_resource path="res://addons/camera_preview/window.gd" type="Script" id=2]
 | 
			
		||||
[ext_resource path="./cam_preview.gd" type="Script" id=1]
 | 
			
		||||
[ext_resource path="./window.gd" type="Script" id=2]
 | 
			
		||||
 | 
			
		||||
[sub_resource type="StyleBoxFlat" id=1]
 | 
			
		||||
bg_color = Color( 0, 0, 0, 0.164706 )
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										35
									
								
								icon.png.import
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								icon.png.import
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,35 @@
 | 
			
		||||
[remap]
 | 
			
		||||
 | 
			
		||||
importer="texture"
 | 
			
		||||
type="StreamTexture"
 | 
			
		||||
path="res://.import/icon.png-37a5d2293e9438a3a40c69269d7ba52b.stex"
 | 
			
		||||
metadata={
 | 
			
		||||
"vram_texture": false
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
[deps]
 | 
			
		||||
 | 
			
		||||
source_file="res://addons/camera_preview/icon.png"
 | 
			
		||||
dest_files=[ "res://.import/icon.png-37a5d2293e9438a3a40c69269d7ba52b.stex" ]
 | 
			
		||||
 | 
			
		||||
[params]
 | 
			
		||||
 | 
			
		||||
compress/mode=0
 | 
			
		||||
compress/lossy_quality=0.7
 | 
			
		||||
compress/hdr_mode=0
 | 
			
		||||
compress/bptc_ldr=0
 | 
			
		||||
compress/normal_map=0
 | 
			
		||||
flags/repeat=0
 | 
			
		||||
flags/filter=true
 | 
			
		||||
flags/mipmaps=false
 | 
			
		||||
flags/anisotropic=false
 | 
			
		||||
flags/srgb=2
 | 
			
		||||
process/fix_alpha_border=true
 | 
			
		||||
process/premult_alpha=false
 | 
			
		||||
process/HDR_as_SRGB=false
 | 
			
		||||
process/invert_color=false
 | 
			
		||||
process/normal_map_invert_y=false
 | 
			
		||||
stream=false
 | 
			
		||||
size_limit=0
 | 
			
		||||
detect_3d=true
 | 
			
		||||
svg/scale=1.0
 | 
			
		||||
@ -3,5 +3,5 @@
 | 
			
		||||
name="CameraPreview"
 | 
			
		||||
description="Allows user to create a small window inside the main editor view to preview selected Camera in 3d scene"
 | 
			
		||||
author="Nefrace"
 | 
			
		||||
version="0.4"
 | 
			
		||||
version="0.5"
 | 
			
		||||
script="plugin.gd"
 | 
			
		||||
 | 
			
		||||
@ -36,6 +36,12 @@ func _exit_tree():
 | 
			
		||||
	if button_instance:
 | 
			
		||||
		button_instance.queue_free()
 | 
			
		||||
		
 | 
			
		||||
func _process(_delta):
 | 
			
		||||
	if cam_selected and pcam:
 | 
			
		||||
		pcam.fov = cam_selected.fov
 | 
			
		||||
		pcam.projection = cam_selected.projection
 | 
			
		||||
		pcam.size = cam_selected.size
 | 
			
		||||
		
 | 
			
		||||
func find_a_camera(root) -> Camera:
 | 
			
		||||
	if root is Camera:
 | 
			
		||||
		return root
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
[gd_scene load_steps=2 format=2]
 | 
			
		||||
 | 
			
		||||
[ext_resource path="res://addons/camera_preview/toggle_button.gd" type="Script" id=1]
 | 
			
		||||
[ext_resource path="./toggle_button.gd" type="Script" id=1]
 | 
			
		||||
 | 
			
		||||
[node name="ToolButton" type="MenuButton"]
 | 
			
		||||
margin_right = 114.0
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user