update anita model and revise export procedure
This commit is contained in:
parent
ea038776f3
commit
4bf97a1b76
7 changed files with 46 additions and 98 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,7 +5,6 @@
|
||||||
# Godot-specific ignores
|
# Godot-specific ignores
|
||||||
.import/
|
.import/
|
||||||
export.cfg
|
export.cfg
|
||||||
export_presets.cfg
|
|
||||||
|
|
||||||
# Imported translations (automatically generated from CSV files)
|
# Imported translations (automatically generated from CSV files)
|
||||||
*.translation
|
*.translation
|
||||||
|
|
Binary file not shown.
|
@ -38,7 +38,7 @@ spot_angle_attenuation = 0.15
|
||||||
environment = SubResource("Environment_45het")
|
environment = SubResource("Environment_45het")
|
||||||
|
|
||||||
[node name="Angle 1" type="Camera3D" parent="."]
|
[node name="Angle 1" type="Camera3D" parent="."]
|
||||||
transform = Transform3D(-1, -2.26267e-08, 8.44439e-08, 0, 0.965926, 0.258819, -8.74228e-08, 0.258819, -0.965926, 0, 1.75, -2)
|
transform = Transform3D(-1, -2.26267e-08, 8.44439e-08, -6.91205e-10, 0.967942, 0.251174, -8.742e-08, 0.251174, -0.967942, 0, 1.66627, -2.04987)
|
||||||
current = true
|
current = true
|
||||||
fov = 60.0
|
fov = 60.0
|
||||||
|
|
||||||
|
|
|
@ -1,93 +1,3 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
var animation_player : AnimationPlayer
|
# stub script
|
||||||
var animation_tree : AnimationTree
|
|
||||||
var blend_tree : AnimationNodeBlendTree
|
|
||||||
|
|
||||||
var movement_states : Dictionary
|
|
||||||
|
|
||||||
func _ready():
|
|
||||||
animation_player = $AnimationPlayer
|
|
||||||
|
|
||||||
animation_tree = AnimationTree.new()
|
|
||||||
animation_tree.anim_player = animation_player.get_path()
|
|
||||||
add_child(animation_tree)
|
|
||||||
|
|
||||||
animation_tree.tree_root = AnimationNodeBlendTree.new()
|
|
||||||
animation_tree.active = true
|
|
||||||
blend_tree = animation_tree.tree_root as AnimationNodeBlendTree
|
|
||||||
|
|
||||||
animation_player.speed_scale = 0
|
|
||||||
|
|
||||||
var animations = animation_player.get_animation_list()
|
|
||||||
|
|
||||||
for animation in animations:
|
|
||||||
movement_states[animation] = [false, 0.0, 0.0, 0.0]
|
|
||||||
|
|
||||||
var prev_name = "Anim_" + animations[0]
|
|
||||||
var old_time_name = "Time_" + animations[0]
|
|
||||||
var old_seek_name = "Seek_" + animations[0]
|
|
||||||
|
|
||||||
var prev_anim_node := AnimationNodeAnimation.new()
|
|
||||||
prev_anim_node.animation = animations[0]
|
|
||||||
blend_tree.add_node(prev_name, prev_anim_node)
|
|
||||||
|
|
||||||
var old_time_node := AnimationNodeTimeScale.new()
|
|
||||||
blend_tree.add_node(old_time_name,old_time_node)
|
|
||||||
|
|
||||||
var _old_seek_node := AnimationNodeTimeSeek.new()
|
|
||||||
blend_tree.add_node(old_seek_name,_old_seek_node)
|
|
||||||
|
|
||||||
blend_tree.connect_node(old_time_name,0,prev_name)
|
|
||||||
blend_tree.connect_node(old_seek_name,0,old_time_name)
|
|
||||||
prev_name = old_seek_name
|
|
||||||
|
|
||||||
for i in range(1, animations.size()):
|
|
||||||
var anim_name = "Anim_" + animations[i]
|
|
||||||
var add_name = "Add_" + animations[i]
|
|
||||||
var time_name = "Time_" + animations[i]
|
|
||||||
var seek_name = "Seek_" + animations[i]
|
|
||||||
|
|
||||||
var new_anim_node := AnimationNodeAnimation.new()
|
|
||||||
new_anim_node.animation = animations[i]
|
|
||||||
blend_tree.add_node(anim_name, new_anim_node)
|
|
||||||
|
|
||||||
var time_node := AnimationNodeTimeScale.new()
|
|
||||||
blend_tree.add_node(time_name,time_node)
|
|
||||||
|
|
||||||
var seek_node := AnimationNodeTimeSeek.new()
|
|
||||||
blend_tree.add_node(seek_name,seek_node)
|
|
||||||
|
|
||||||
var add_node := AnimationNodeAdd2.new()
|
|
||||||
blend_tree.add_node(add_name, add_node)
|
|
||||||
|
|
||||||
blend_tree.connect_node(time_name, 0, anim_name)
|
|
||||||
blend_tree.connect_node(seek_name, 0, time_name)
|
|
||||||
blend_tree.connect_node(add_name, 0, prev_name)
|
|
||||||
blend_tree.connect_node(add_name, 1, seek_name)
|
|
||||||
prev_name = add_name
|
|
||||||
|
|
||||||
blend_tree.connect_node("output", 0, prev_name)
|
|
||||||
|
|
||||||
for i in range(0, animations.size()):
|
|
||||||
animation_tree.set("parameters/Add_" + str(animations[i]) + "/add_amount", 1.0)
|
|
||||||
animation_tree.set("parameters/Seek_" + str(animations[i]) + "/seek_request", 0)
|
|
||||||
animation_tree.set("parameters/Time_" + str(animations[i]) + "/scale", 0)
|
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
|
||||||
for key in movement_states:
|
|
||||||
var anim_path = "parameters/Seek_" + key + "/seek_request"
|
|
||||||
var state = movement_states[key]
|
|
||||||
if (state[0]):
|
|
||||||
state[1] = clamp(float(state[1]) + (delta * state[2]), 0, 1)
|
|
||||||
else:
|
|
||||||
state[1] = clamp(float(state[1]) - (delta * state[3]), 0, 1)
|
|
||||||
animation_tree.set(anim_path, state[1])
|
|
||||||
|
|
||||||
func _movement_in(movement, rate):
|
|
||||||
movement_states[movement][0] = true
|
|
||||||
movement_states[movement][2] = rate
|
|
||||||
|
|
||||||
func _movement_out(movement, rate):
|
|
||||||
movement_states[movement][0] = false
|
|
||||||
movement_states[movement][3] = rate
|
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
func _movement_in(movement, _rate):
|
# stub script
|
||||||
get_node(movement).visible = true
|
|
||||||
|
|
||||||
func _movement_out(movement, _rate):
|
|
||||||
get_node(movement).visible = false
|
|
||||||
|
|
42
export_presets.cfg
Normal file
42
export_presets.cfg
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="ExportPCK"
|
||||||
|
platform="Linux"
|
||||||
|
runnable=true
|
||||||
|
advanced_options=false
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="exclude"
|
||||||
|
export_files=PackedStringArray("res://Scripts/AnimatronicController.gd", "res://Scripts/LightController.gd")
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path=""
|
||||||
|
patches=PackedStringArray()
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
seed=0
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
script_export_mode=2
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
texture_format/s3tc_bptc=true
|
||||||
|
texture_format/etc2_astc=false
|
||||||
|
binary_format/architecture="x86_64"
|
||||||
|
ssh_remote_deploy/enabled=false
|
||||||
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
ssh_remote_deploy/port="22"
|
||||||
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
|
ssh_remote_deploy/run_script="#!/usr/bin/env bash
|
||||||
|
export DISPLAY=:0
|
||||||
|
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
|
||||||
|
\"{temp_dir}/{exe_name}\" {cmd_args}"
|
||||||
|
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
|
||||||
|
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
|
||||||
|
rm -rf \"{temp_dir}\""
|
|
@ -11,6 +11,7 @@ config_version=5
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="PneuMod-GreatTransformation"
|
config/name="PneuMod-GreatTransformation"
|
||||||
|
config/version="1.0"
|
||||||
config/features=PackedStringArray("4.4", "GL Compatibility")
|
config/features=PackedStringArray("4.4", "GL Compatibility")
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue