add ability to disable bone flattener in editor
This commit is contained in:
parent
cedce3eef8
commit
73f5d6564c
@ -122,7 +122,6 @@ bones/6/rotation = Quaternion(-0.0323581, 2.46001e-07, 8.00608e-09, 0.999476)
|
||||
bones/7/rotation = Quaternion(0.123965, -2.40098e-07, -2.92456e-09, 0.992287)
|
||||
bones/7/scale = Vector3(1, 1, 1)
|
||||
bones/8/rotation = Quaternion(-0.0917916, -2.67583e-15, 2.18848e-08, 0.995778)
|
||||
bones/9/position = Vector3(-0.074, 0.011816, 0.0814253)
|
||||
bones/9/rotation = Quaternion(1.15202e-07, 0.707107, 0.707107, -5.33851e-08)
|
||||
bones/9/scale = Vector3(1, 1, 1)
|
||||
bones/21/rotation = Quaternion(0.19747, 0.678974, 0.678974, -0.19747)
|
||||
@ -136,7 +135,6 @@ bones/45/scale = Vector3(1, 1, 1)
|
||||
bones/46/rotation = Quaternion(-0.0181733, 2.38379e-07, 1.14098e-08, 0.999835)
|
||||
bones/47/rotation = Quaternion(-1.20807e-07, 0.993087, -0.117383, 7.85287e-07)
|
||||
bones/49/rotation = Quaternion(-0.034235, -3.57418e-07, 8.86969e-08, 0.999414)
|
||||
bones/50/rotation = Quaternion(0.0858328, -0.701878, -0.701878, -0.0858328)
|
||||
bones/51/rotation = Quaternion(0.403888, -2.98082e-07, -3.85178e-07, 0.914808)
|
||||
bones/51/scale = Vector3(1, 1, 1)
|
||||
bones/52/rotation = Quaternion(-0.512846, 3.82068e-07, 4.27952e-07, 0.858481)
|
||||
|
||||
@ -5,6 +5,7 @@ extends Node3D
|
||||
@export var skeleton: Skeleton3D
|
||||
@export var bones_to_flatten: Array[BoneToFlatten] = []
|
||||
@export var mirror_y_angle: float
|
||||
@export var editor_preview: bool = false
|
||||
|
||||
@export_group("Bone names")
|
||||
@export var head_bone_name: String = "Head"
|
||||
@ -102,7 +103,7 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if skeleton == null:
|
||||
if skeleton == null or (Engine.is_editor_hint() and not editor_preview):
|
||||
return
|
||||
|
||||
_get_angle()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user