Parchment props, make an editable instance scene
This commit is contained in:
committed by
VAILLANT Jeremy
parent
a43be5179d
commit
d9bd8c5ec3
Binary file not shown.
@@ -1,15 +1,18 @@
|
||||
tool
|
||||
extends Spatial
|
||||
|
||||
export(bool) var paper = false setget activatePaper
|
||||
export(bool) var paper
|
||||
|
||||
func activatePaper(showPaper):
|
||||
if Engine.editor_hint:
|
||||
paper = showPaper
|
||||
|
||||
print("[Parchment] Editor value " +String(showPaper))
|
||||
$sm_paperparchment_lod0.set_visible(paper)
|
||||
|
||||
var parent = get_node(".").name
|
||||
print("[Parchment] Editor value " +String(showPaper) +" | " +String(parent))
|
||||
|
||||
$paper.set_visible(paper)
|
||||
$paper.use_in_baked_light(true)
|
||||
|
||||
|
||||
func _ready():
|
||||
print("[Parchment] Paper bool " +String(paper))
|
||||
$sm_paperparchment_lod0.set_visible(paper)
|
||||
activatePaper(paper)
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -12,8 +12,7 @@ use_in_baked_light = true
|
||||
mesh = ExtResource( 1 )
|
||||
material/0 = null
|
||||
|
||||
[node name="sm_paperparchment_lod0" type="MeshInstance" parent="."]
|
||||
visible = false
|
||||
[node name="paper" type="MeshInstance" parent="."]
|
||||
use_in_baked_light = true
|
||||
mesh = ExtResource( 3 )
|
||||
material/0 = null
|
||||
|
||||
Reference in New Issue
Block a user