Merge pull request #72513 from TokageItLab/remove-rename-param-anim
Remove the meaningless API `rename_parameter()` in AnimationTree
This commit is contained in:
commit
d8037528f0
@ -92,13 +92,6 @@
|
|||||||
[/codeblocks]
|
[/codeblocks]
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="rename_parameter">
|
|
||||||
<return type="void" />
|
|
||||||
<param index="0" name="old_name" type="String" />
|
|
||||||
<param index="1" name="new_name" type="String" />
|
|
||||||
<description>
|
|
||||||
</description>
|
|
||||||
</method>
|
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="active" type="bool" setter="set_active" getter="is_active" default="false">
|
<member name="active" type="bool" setter="set_active" getter="is_active" default="false">
|
||||||
|
@ -985,8 +985,6 @@ void AnimationNodeBlendTreeEditor::_node_renamed(const String &p_text, Ref<Anima
|
|||||||
undo_redo->create_action(TTR("Node Renamed"));
|
undo_redo->create_action(TTR("Node Renamed"));
|
||||||
undo_redo->add_do_method(blend_tree.ptr(), "rename_node", prev_name, name);
|
undo_redo->add_do_method(blend_tree.ptr(), "rename_node", prev_name, name);
|
||||||
undo_redo->add_undo_method(blend_tree.ptr(), "rename_node", name, prev_name);
|
undo_redo->add_undo_method(blend_tree.ptr(), "rename_node", name, prev_name);
|
||||||
undo_redo->add_do_method(tree, "rename_parameter", base_path + prev_name, base_path + name);
|
|
||||||
undo_redo->add_undo_method(tree, "rename_parameter", base_path + name, base_path + prev_name);
|
|
||||||
undo_redo->add_do_method(this, "update_graph");
|
undo_redo->add_do_method(this, "update_graph");
|
||||||
undo_redo->add_undo_method(this, "update_graph");
|
undo_redo->add_undo_method(this, "update_graph");
|
||||||
undo_redo->commit_action();
|
undo_redo->commit_action();
|
||||||
|
@ -2084,20 +2084,6 @@ void AnimationTree::_get_property_list(List<PropertyInfo> *p_list) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationTree::rename_parameter(const String &p_base, const String &p_new_base) {
|
|
||||||
//rename values first
|
|
||||||
for (const PropertyInfo &E : properties) {
|
|
||||||
if (E.name.begins_with(p_base)) {
|
|
||||||
String new_name = E.name.replace_first(p_base, p_new_base);
|
|
||||||
property_map[new_name] = property_map[E.name];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//update tree second
|
|
||||||
properties_dirty = true;
|
|
||||||
_update_properties();
|
|
||||||
}
|
|
||||||
|
|
||||||
real_t AnimationTree::get_connection_activity(const StringName &p_path, int p_connection) const {
|
real_t AnimationTree::get_connection_activity(const StringName &p_path, int p_connection) const {
|
||||||
if (!input_activity_map_get.has(p_path)) {
|
if (!input_activity_map_get.has(p_path)) {
|
||||||
return 0;
|
return 0;
|
||||||
@ -2143,8 +2129,6 @@ void AnimationTree::_bind_methods() {
|
|||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("_update_properties"), &AnimationTree::_update_properties);
|
ClassDB::bind_method(D_METHOD("_update_properties"), &AnimationTree::_update_properties);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("rename_parameter", "old_name", "new_name"), &AnimationTree::rename_parameter);
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationTree::advance);
|
ClassDB::bind_method(D_METHOD("advance", "delta"), &AnimationTree::advance);
|
||||||
|
|
||||||
GDVIRTUAL_BIND(_post_process_key_value, "animation", "track", "value", "object", "object_idx");
|
GDVIRTUAL_BIND(_post_process_key_value, "animation", "track", "value", "object", "object_idx");
|
||||||
|
@ -389,8 +389,6 @@ public:
|
|||||||
real_t get_connection_activity(const StringName &p_path, int p_connection) const;
|
real_t get_connection_activity(const StringName &p_path, int p_connection) const;
|
||||||
void advance(double p_time);
|
void advance(double p_time);
|
||||||
|
|
||||||
void rename_parameter(const String &p_base, const String &p_new_base);
|
|
||||||
|
|
||||||
uint64_t get_last_process_pass() const;
|
uint64_t get_last_process_pass() const;
|
||||||
AnimationTree();
|
AnimationTree();
|
||||||
~AnimationTree();
|
~AnimationTree();
|
||||||
|
Loading…
Reference in New Issue
Block a user