|
@@ -161,7 +161,7 @@ AnimationTree *AnimationNode::get_animation_tree() const {
|
|
|
}
|
|
|
|
|
|
AnimationNode::NodeTimeInfo AnimationNode::blend_input(int p_input, AnimationMixer::PlaybackInfo p_playback_info, FilterAction p_filter, bool p_sync, bool p_test_only) {
|
|
|
- ERR_FAIL_INDEX_V(p_input, inputs.size(), NodeTimeInfo());
|
|
|
+ ERR_FAIL_INDEX_V(p_input, (int64_t)inputs.size(), NodeTimeInfo());
|
|
|
|
|
|
AnimationNodeBlendTree *blend_tree = Object::cast_to<AnimationNodeBlendTree>(node_state.parent);
|
|
|
ERR_FAIL_NULL_V(blend_tree, NodeTimeInfo());
|
|
@@ -181,12 +181,12 @@ AnimationNode::NodeTimeInfo AnimationNode::blend_input(int p_input, AnimationMix
|
|
|
ERR_FAIL_COND_V(node.is_null(), NodeTimeInfo());
|
|
|
|
|
|
real_t activity = 0.0;
|
|
|
- Vector<AnimationTree::Activity> *activity_ptr = process_state->tree->input_activity_map.getptr(node_state.base_path);
|
|
|
+ LocalVector<AnimationTree::Activity> *activity_ptr = process_state->tree->input_activity_map.getptr(node_state.base_path);
|
|
|
NodeTimeInfo nti = _blend_node(node, node_name, nullptr, p_playback_info, p_filter, p_sync, p_test_only, &activity);
|
|
|
|
|
|
- if (activity_ptr && p_input < activity_ptr->size()) {
|
|
|
- activity_ptr->write[p_input].last_pass = process_state->last_pass;
|
|
|
- activity_ptr->write[p_input].activity = activity;
|
|
|
+ if (activity_ptr && p_input < (int64_t)activity_ptr->size()) {
|
|
|
+ (*activity_ptr)[p_input].last_pass = process_state->last_pass;
|
|
|
+ (*activity_ptr)[p_input].activity = activity;
|
|
|
}
|
|
|
return nti;
|
|
|
}
|
|
@@ -202,11 +202,11 @@ AnimationNode::NodeTimeInfo AnimationNode::_blend_node(Ref<AnimationNode> p_node
|
|
|
|
|
|
int blend_count = node_state.track_weights.size();
|
|
|
|
|
|
- if (p_node->node_state.track_weights.size() != blend_count) {
|
|
|
+ if ((int64_t)p_node->node_state.track_weights.size() != blend_count) {
|
|
|
p_node->node_state.track_weights.resize(blend_count);
|
|
|
}
|
|
|
|
|
|
- real_t *blendw = p_node->node_state.track_weights.ptrw();
|
|
|
+ real_t *blendw = p_node->node_state.track_weights.ptr();
|
|
|
const real_t *blendr = node_state.track_weights.ptr();
|
|
|
|
|
|
bool any_valid = false;
|
|
@@ -333,21 +333,21 @@ bool AnimationNode::add_input(const String &p_name) {
|
|
|
}
|
|
|
|
|
|
void AnimationNode::remove_input(int p_index) {
|
|
|
- ERR_FAIL_INDEX(p_index, inputs.size());
|
|
|
+ ERR_FAIL_INDEX(p_index, (int64_t)inputs.size());
|
|
|
inputs.remove_at(p_index);
|
|
|
emit_changed();
|
|
|
}
|
|
|
|
|
|
bool AnimationNode::set_input_name(int p_input, const String &p_name) {
|
|
|
- ERR_FAIL_INDEX_V(p_input, inputs.size(), false);
|
|
|
+ ERR_FAIL_INDEX_V(p_input, (int64_t)inputs.size(), false);
|
|
|
ERR_FAIL_COND_V(p_name.contains_char('.') || p_name.contains_char('/'), false);
|
|
|
- inputs.write[p_input].name = p_name;
|
|
|
+ inputs[p_input].name = p_name;
|
|
|
emit_changed();
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
String AnimationNode::get_input_name(int p_input) const {
|
|
|
- ERR_FAIL_INDEX_V(p_input, inputs.size(), String());
|
|
|
+ ERR_FAIL_INDEX_V(p_input, (int64_t)inputs.size(), String());
|
|
|
return inputs[p_input].name;
|
|
|
}
|
|
|
|
|
@@ -357,7 +357,7 @@ int AnimationNode::get_input_count() const {
|
|
|
|
|
|
int AnimationNode::find_input(const String &p_name) const {
|
|
|
int idx = -1;
|
|
|
- for (int i = 0; i < inputs.size(); i++) {
|
|
|
+ for (int i = 0; i < (int64_t)inputs.size(); i++) {
|
|
|
if (inputs[i].name == p_name) {
|
|
|
idx = i;
|
|
|
break;
|
|
@@ -653,7 +653,7 @@ bool AnimationTree::_blend_pre_process(double p_delta, int p_track_count, const
|
|
|
|
|
|
// Init node state for root AnimationNode.
|
|
|
root_animation_node->node_state.track_weights.resize(p_track_count);
|
|
|
- real_t *src_blendsw = root_animation_node->node_state.track_weights.ptrw();
|
|
|
+ real_t *src_blendsw = root_animation_node->node_state.track_weights.ptr();
|
|
|
for (int i = 0; i < p_track_count; i++) {
|
|
|
src_blendsw[i] = 1.0; // By default all go to 1 for the root input.
|
|
|
}
|
|
@@ -769,7 +769,7 @@ void AnimationTree::_update_properties_for_node(const String &p_base_path, Ref<A
|
|
|
}
|
|
|
|
|
|
if (p_node->get_input_count() && !input_activity_map.has(p_base_path)) {
|
|
|
- Vector<Activity> activity;
|
|
|
+ LocalVector<Activity> activity;
|
|
|
for (int i = 0; i < p_node->get_input_count(); i++) {
|
|
|
Activity a;
|
|
|
a.activity = 0;
|
|
@@ -964,9 +964,9 @@ real_t AnimationTree::get_connection_activity(const StringName &p_path, int p_co
|
|
|
if (!input_activity_map_get.has(p_path)) {
|
|
|
return 0;
|
|
|
}
|
|
|
- const Vector<Activity> *activity = input_activity_map_get[p_path];
|
|
|
+ const LocalVector<Activity> *activity = input_activity_map_get[p_path];
|
|
|
|
|
|
- if (!activity || p_connection < 0 || p_connection >= activity->size()) {
|
|
|
+ if (!activity || p_connection < 0 || p_connection >= (int64_t)activity->size()) {
|
|
|
return 0;
|
|
|
}
|
|
|
|