Parchment props, make an editable instance scene

This commit is contained in:
stilobique-i7
2021-05-25 19:24:19 +02:00
parent 51e94757c5
commit 52f9372469
9 changed files with 29 additions and 14 deletions
+8 -5
View File
@@ -1,15 +1,18 @@
tool tool
extends Spatial extends Spatial
export(bool) var paper = false setget activatePaper export(bool) var paper
func activatePaper(showPaper): func activatePaper(showPaper):
if Engine.editor_hint: if Engine.editor_hint:
paper = showPaper paper = showPaper
print("[Parchment] Editor value " +String(showPaper)) var parent = get_node(".").name
$sm_paperparchment_lod0.set_visible(paper) print("[Parchment] Editor value " +String(showPaper) +" | " +String(parent))
$paper.set_visible(paper)
$paper.use_in_baked_light(true)
func _ready(): func _ready():
print("[Parchment] Paper bool " +String(paper)) activatePaper(paper)
$sm_paperparchment_lod0.set_visible(paper)
File diff suppressed because one or more lines are too long
Binary file not shown.
+1 -2
View File
@@ -12,8 +12,7 @@ use_in_baked_light = true
mesh = ExtResource( 1 ) mesh = ExtResource( 1 )
material/0 = null material/0 = null
[node name="sm_paperparchment_lod0" type="MeshInstance" parent="."] [node name="paper" type="MeshInstance" parent="."]
visible = false
use_in_baked_light = true use_in_baked_light = true
mesh = ExtResource( 3 ) mesh = ExtResource( 3 )
material/0 = null material/0 = null
Binary file not shown.
+1 -1
View File
@@ -21,4 +21,4 @@ flags/filter=true
flags/mipmaps=false flags/mipmaps=false
flags/srgb=false flags/srgb=false
slices/horizontal=1 slices/horizontal=1
slices/vertical=1 slices/vertical=4
Binary file not shown.
+1
View File
@@ -159,6 +159,7 @@ script = ExtResource( 2 )
[node name="BakedLightmap" type="BakedLightmap" parent="."] [node name="BakedLightmap" type="BakedLightmap" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06928, 2.35676, -0.183365 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06928, 2.35676, -0.183365 )
extents = Vector3( 6.50885, 3.63237, 10 ) extents = Vector3( 6.50885, 3.63237, 10 )
quality = 2
bounces = 5 bounces = 5
environment_mode = 1 environment_mode = 1
light_data = ExtResource( 16 ) light_data = ExtResource( 16 )