mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Revert "Replace many uses of is_class with derives_from."
This reverts commit 78b743cf4a.
This commit is contained in:
parent
6e4e8072e1
commit
bd65cfa876
43 changed files with 82 additions and 82 deletions
|
|
@ -1936,7 +1936,7 @@ AnimationMixer *AnimationPlayerEditor::fetch_mixer_for_library() const {
|
|||
return nullptr;
|
||||
}
|
||||
// Does AnimationTree have AnimationPlayer?
|
||||
if (original_node->derives_from<AnimationTree>()) {
|
||||
if (original_node->is_class("AnimationTree")) {
|
||||
AnimationTree *src_tree = Object::cast_to<AnimationTree>(original_node);
|
||||
Node *src_player = src_tree->get_node_or_null(src_tree->get_animation_player());
|
||||
if (src_player) {
|
||||
|
|
@ -2339,7 +2339,7 @@ void AnimationPlayerEditorPlugin::edit(Object *p_object) {
|
|||
|
||||
AnimationMixer *src_node = Object::cast_to<AnimationMixer>(p_object);
|
||||
bool is_dummy = false;
|
||||
if (!p_object->derives_from<AnimationPlayer>()) {
|
||||
if (!p_object->is_class("AnimationPlayer")) {
|
||||
// If it needs dummy AnimationPlayer, assign original AnimationMixer to LibraryEditor.
|
||||
_update_dummy_player(src_node);
|
||||
|
||||
|
|
@ -2409,7 +2409,7 @@ void AnimationPlayerEditorPlugin::_update_dummy_player(AnimationMixer *p_mixer)
|
|||
}
|
||||
|
||||
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const {
|
||||
return p_object->derives_from<AnimationPlayer>() || p_object->derives_from<AnimationTree>() || p_object->derives_from<AnimationMixer>();
|
||||
return p_object->is_class("AnimationPlayer") || p_object->is_class("AnimationTree") || p_object->is_class("AnimationMixer");
|
||||
}
|
||||
|
||||
void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
|
||||
|
|
@ -2455,7 +2455,7 @@ AnimationTrackKeyEditEditorPlugin::AnimationTrackKeyEditEditorPlugin() {
|
|||
}
|
||||
|
||||
bool AnimationTrackKeyEditEditorPlugin::handles(Object *p_object) const {
|
||||
return p_object->derives_from<AnimationTrackKeyEdit>();
|
||||
return p_object->is_class("AnimationTrackKeyEdit");
|
||||
}
|
||||
|
||||
bool EditorInspectorPluginAnimationMarkerKeyEdit::can_handle(Object *p_object) {
|
||||
|
|
@ -2476,5 +2476,5 @@ AnimationMarkerKeyEditEditorPlugin::AnimationMarkerKeyEditEditorPlugin() {
|
|||
}
|
||||
|
||||
bool AnimationMarkerKeyEditEditorPlugin::handles(Object *p_object) const {
|
||||
return p_object->derives_from<AnimationMarkerKeyEdit>();
|
||||
return p_object->is_class("AnimationMarkerKeyEdit");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue