chore: continued style test
This commit is contained in:
parent
cb7138353e
commit
33b088c315
30 changed files with 302 additions and 95 deletions
14
project/assets/style/base_outline_material.tres
Normal file
14
project/assets/style/base_outline_material.tres
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[gd_resource type="StandardMaterial3D" format=3 uid="uid://cd4vnmrmj8cj7"]
|
||||
|
||||
[resource]
|
||||
cull_mode = 1
|
||||
shading_mode = 0
|
||||
diffuse_mode = 3
|
||||
specular_mode = 2
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_color = Color(0.1836955, 0.1836955, 0.18369544, 1)
|
||||
grow = true
|
||||
grow_amount = 0.015
|
||||
proximity_fade_enabled = true
|
||||
stencil_mode = 3
|
||||
stencil_outline_thickness = 0.029
|
||||
16
project/assets/style/model_importer.gd
Normal file
16
project/assets/style/model_importer.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
@tool
|
||||
extends EditorScenePostImport
|
||||
|
||||
var outline_material : StandardMaterial3D
|
||||
|
||||
func _post_import(root : Node):
|
||||
outline_material = ResourceLoader.load("res://assets/style/base_outline_material.tres") as StandardMaterial3D
|
||||
apply_outline_recursive(root)
|
||||
return root
|
||||
|
||||
func apply_outline_recursive(node : Node):
|
||||
if node != null:
|
||||
if node is MeshInstance3D and outline_material:
|
||||
(node as MeshInstance3D).material_overlay = outline_material
|
||||
for child in node.get_children():
|
||||
apply_outline_recursive(child)
|
||||
1
project/assets/style/model_importer.gd.uid
Normal file
1
project/assets/style/model_importer.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ba7qlhj5ylm3d
|
||||
Loading…
Add table
Add a link
Reference in a new issue