diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/animation_track_editor.cpp | 10 | ||||
-rw-r--r-- | editor/doc_tools.cpp | 7 | ||||
-rw-r--r-- | editor/editor_inspector.cpp | 2 | ||||
-rw-r--r-- | editor/editor_node.cpp | 1 | ||||
-rw-r--r-- | editor/editor_node.h | 1 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 5 | ||||
-rw-r--r-- | editor/inspector_dock.cpp | 34 | ||||
-rw-r--r-- | editor/inspector_dock.h | 4 | ||||
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 30 | ||||
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.h | 4 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 74 | ||||
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.h | 14 | ||||
-rw-r--r-- | editor/plugins/mesh_library_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 1 | ||||
-rw-r--r-- | editor/plugins/skeleton_3d_editor_plugin.cpp | 3 |
15 files changed, 113 insertions, 87 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 13e9d58744..973f74d6cc 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -3375,7 +3375,13 @@ Node *AnimationTrackEditor::get_root() const { } void AnimationTrackEditor::update_keying() { - bool keying_enabled = is_visible_in_tree() && animation.is_valid(); + bool keying_enabled = false; + + EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history(); + if (is_visible_in_tree() && animation.is_valid() && editor_history->get_path_size() > 0) { + Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0)); + keying_enabled = Object::cast_to<Node>(obj) != nullptr; + } if (keying_enabled == keying) { return; @@ -4525,8 +4531,6 @@ void AnimationTrackEditor::_notification(int p_what) { if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { update_keying(); - EditorNode::get_singleton()->update_keying(); - emit_signal(SNAME("keying_changed")); } } diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 6804ec32ac..6acf654b04 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -350,7 +350,7 @@ void DocTools::generate(bool p_basic_types) { List<PropertyInfo> properties; List<PropertyInfo> own_properties; if (name == "ProjectSettings") { - //special case for project settings, so settings can be documented + // Special case for project settings, so settings can be documented. ProjectSettings::get_singleton()->get_property_list(&properties); own_properties = properties; } else { @@ -358,9 +358,12 @@ void DocTools::generate(bool p_basic_types) { ClassDB::get_property_list(name, &own_properties, true); } + properties.sort(); + own_properties.sort(); + List<PropertyInfo>::Element *EO = own_properties.front(); for (const PropertyInfo &E : properties) { - bool inherited = EO == nullptr; + bool inherited = true; if (EO && EO->get() == E) { inherited = false; EO = EO->next(); diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 75e518e050..1e1f25b6d1 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -2905,6 +2905,7 @@ void EditorInspector::edit(Object *p_object) { object->connect("property_list_changed", callable_mp(this, &EditorInspector::_changed_callback)); update_tree(); } + emit_signal("edited_object_changed"); } void EditorInspector::set_keying(bool p_active) { @@ -3543,6 +3544,7 @@ void EditorInspector::_bind_methods() { ADD_SIGNAL(MethodInfo("object_id_selected", PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("property_edited", PropertyInfo(Variant::STRING, "property"))); ADD_SIGNAL(MethodInfo("property_toggled", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::BOOL, "checked"))); + ADD_SIGNAL(MethodInfo("edited_object_changed")); ADD_SIGNAL(MethodInfo("restart_requested")); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index cc92d391d9..e64f60c58d 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2307,7 +2307,6 @@ void EditorNode::_edit_current(bool p_skip_foreign) { } inspector_dock->update(current_obj); - inspector_dock->update_keying(); } void EditorNode::_run(bool p_current, const String &p_custom) { diff --git a/editor/editor_node.h b/editor/editor_node.h index ff56040297..487bde3cb4 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -884,7 +884,6 @@ public: void edit_current() { _edit_current(); }; - void update_keying() const { inspector_dock->update_keying(); }; bool has_scenes_in_session(); int execute_and_show_output(const String &p_title, const String &p_path, const List<String> &p_arguments, bool p_close_on_ok = true, bool p_close_on_errors = false); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 35aad36db5..8e87ddee80 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1442,6 +1442,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_info_3d_viewport->set_border_width_all(0); theme->set_stylebox("Information3dViewport", "EditorStyles", style_info_3d_viewport); + // Asset Library. + theme->set_stylebox("panel", "AssetLib", style_content_panel); + theme->set_color("status_color", "AssetLib", Color(0.5, 0.5, 0.5)); + theme->set_icon("dismiss", "AssetLib", theme->get_icon("Close", "EditorIcons")); + // Theme editor. theme->set_color("preview_picker_overlay_color", "ThemeEditor", Color(0.1, 0.1, 0.1, 0.25)); Color theme_preview_picker_bg_color = accent_color; diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index f56e868286..ce4e51e54c 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -382,20 +382,6 @@ void InspectorDock::_menu_expandall() { inspector->expand_all_folding(); } -void InspectorDock::_property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance) { - AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance); -} - -void InspectorDock::_transform_keyed(Object *sp, const String &p_sub, const Transform3D &p_key) { - Node3D *s = Object::cast_to<Node3D>(sp); - if (!s) { - return; - } - AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_POSITION_3D, p_key.origin); - AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_ROTATION_3D, p_key.basis.get_rotation_quaternion()); - AnimationPlayerEditor::get_singleton()->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_SCALE_3D, p_key.basis.get_scale()); -} - void InspectorDock::_warning_pressed() { warning_dialog->popup_centered(); } @@ -440,9 +426,6 @@ void InspectorDock::_notification(int p_what) { } void InspectorDock::_bind_methods() { - ClassDB::bind_method("update_keying", &InspectorDock::update_keying); - ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); // Still used by some connect_compat. - ClassDB::bind_method("_unref_resource", &InspectorDock::_unref_resource); ClassDB::bind_method("_paste_resource", &InspectorDock::_paste_resource); ClassDB::bind_method("_copy_resource", &InspectorDock::_copy_resource); @@ -547,22 +530,6 @@ void InspectorDock::go_back() { _edit_back(); } -void InspectorDock::update_keying() { - bool valid = false; - - if (AnimationPlayerEditor::get_singleton()->get_track_editor()->has_keying()) { - EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history(); - if (editor_history->get_path_size() >= 1) { - Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0)); - if (Object::cast_to<Node>(obj)) { - valid = true; - } - } - } - - inspector->set_keying(valid); -} - InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { set_name("Inspector"); @@ -716,7 +683,6 @@ InspectorDock::InspectorDock(EditorNode *p_editor, EditorData &p_editor_data) { inspector->set_use_filter(true); // TODO: check me inspector->connect("resource_selected", callable_mp(this, &InspectorDock::_resource_selected)); - inspector->connect("property_keyed", callable_mp(this, &InspectorDock::_property_keyed)); } InspectorDock::~InspectorDock() { diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h index 94e4f67348..2f120c93b4 100644 --- a/editor/inspector_dock.h +++ b/editor/inspector_dock.h @@ -117,16 +117,12 @@ class InspectorDock : public VBoxContainer { void _select_history(int p_idx); void _prepare_history(); - void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance); - void _transform_keyed(Object *sp, const String &p_sub, const Transform3D &p_key); - protected: static void _bind_methods(); void _notification(int p_what); public: void go_back(); - void update_keying(); void edit_resource(const Ref<Resource> &p_resource); void open_resource(const String &p_type); void clear(); diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index d7c0ba7540..dcc549ec2a 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -301,7 +301,6 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { autoplay->set_pressed(current == player->get_autoplay()); AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying(); - EditorNode::get_singleton()->update_keying(); _animation_key_editor_seek(timeline_position, false); } @@ -829,7 +828,6 @@ void AnimationPlayerEditor::_update_player() { if (!player) { AnimationPlayerEditor::get_singleton()->get_track_editor()->update_keying(); - EditorNode::get_singleton()->update_keying(); return; } @@ -1795,11 +1793,39 @@ AnimationPlayerEditor::~AnimationPlayerEditor() { void AnimationPlayerEditorPlugin::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { + Node3DEditor::get_singleton()->connect("transform_key_request", callable_mp(this, &AnimationPlayerEditorPlugin::_transform_key_request)); + editor->get_inspector()->connect("property_keyed", callable_mp(this, &AnimationPlayerEditorPlugin::_property_keyed)); + anim_editor->get_track_editor()->connect("keying_changed", callable_mp(this, &AnimationPlayerEditorPlugin::_update_keying)); + editor->get_inspector()->connect("edited_object_changed", callable_mp(anim_editor->get_track_editor(), &AnimationTrackEditor::update_keying)); set_force_draw_over_forwarding_enabled(); } break; } } +void AnimationPlayerEditorPlugin::_property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance) { + if (!anim_editor->get_track_editor()->has_keying()) { + return; + } + anim_editor->get_track_editor()->insert_value_key(p_keyed, p_value, p_advance); +} + +void AnimationPlayerEditorPlugin::_transform_key_request(Object *sp, const String &p_sub, const Transform3D &p_key) { + if (!anim_editor->get_track_editor()->has_keying()) { + return; + } + Node3D *s = Object::cast_to<Node3D>(sp); + if (!s) { + return; + } + anim_editor->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_POSITION_3D, p_key.origin); + anim_editor->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_ROTATION_3D, p_key.basis.get_rotation_quaternion()); + anim_editor->get_track_editor()->insert_transform_key(s, p_sub, Animation::TYPE_SCALE_3D, p_key.basis.get_scale()); +} + +void AnimationPlayerEditorPlugin::_update_keying() { + editor->get_inspector()->set_keying(anim_editor->get_track_editor()->has_keying()); +} + void AnimationPlayerEditorPlugin::edit(Object *p_object) { anim_editor->set_undo_redo(&get_undo_redo()); if (!p_object) { diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h index 626d31f439..06dca11aff 100644 --- a/editor/plugins/animation_player_editor_plugin.h +++ b/editor/plugins/animation_player_editor_plugin.h @@ -255,6 +255,10 @@ class AnimationPlayerEditorPlugin : public EditorPlugin { protected: void _notification(int p_what); + void _property_keyed(const String &p_keyed, const Variant &p_value, bool p_advance); + void _transform_key_request(Object *sp, const String &p_sub, const Transform3D &p_key); + void _update_keying(); + public: virtual Dictionary get_state() const override { return anim_editor->get_state(); } virtual void set_state(const Dictionary &p_state) override { anim_editor->set_state(p_state); } diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 31ef13a2eb..5fb3040b75 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -369,11 +369,11 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int download_error->set_text(TTR("Asset Download Error:") + "\n" + error_text); download_error->popup_centered(); // Let the user retry the download. - retry->show(); + retry_button->show(); return; } - install->set_disabled(false); + install_button->set_disabled(false); status->set_text(TTR("Success!")); // Make the progress bar invisible but don't reflow other Controls around it. progress->set_modulate(Color(0, 0, 0, 0)); @@ -381,7 +381,7 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int set_process(false); // Automatically prompt for installation once the download is completed. - _install(); + install(); } void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asset_id, const Ref<Texture2D> &p_preview, const String &p_download_url, const String &p_sha256_hash) { @@ -400,8 +400,9 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("TabContainer"))); - dismiss->set_normal_texture(get_theme_icon(SNAME("Close"), SNAME("EditorIcons"))); + panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("panel"), SNAME("AssetLib"))); + status->add_theme_color_override("font_color", get_theme_color(SNAME("status_color"), SNAME("AssetLib"))); + dismiss_button->set_normal_texture(get_theme_icon(SNAME("dismiss"), SNAME("AssetLib"))); } break; case NOTIFICATION_PROCESS: { // Make the progress bar visible again when retrying the download. @@ -461,7 +462,7 @@ void EditorAssetLibraryItemDownload::_close() { queue_delete(); } -void EditorAssetLibraryItemDownload::_install() { +void EditorAssetLibraryItemDownload::install() { String file = download->get_download_file(); if (external_install) { @@ -475,7 +476,7 @@ void EditorAssetLibraryItemDownload::_install() { void EditorAssetLibraryItemDownload::_make_request() { // Hide the Retry button if we've just pressed it. - retry->hide(); + retry_button->hide(); download->cancel_request(); download->set_download_file(EditorPaths::get_singleton()->get_cache_dir().plus_file("tmp_asset_" + itos(asset_id)) + ".zip"); @@ -499,6 +500,8 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { HBoxContainer *hb = memnew(HBoxContainer); panel->add_child(hb); icon = memnew(TextureRect); + icon->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED); + icon->set_v_size_flags(0); hb->add_child(icon); VBoxContainer *vb = memnew(VBoxContainer); @@ -511,9 +514,9 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { title_hb->add_child(title); title->set_h_size_flags(Control::SIZE_EXPAND_FILL); - dismiss = memnew(TextureButton); - dismiss->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_close)); - title_hb->add_child(dismiss); + dismiss_button = memnew(TextureButton); + dismiss_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_close)); + title_hb->add_child(dismiss_button); title->set_clip_text(true); @@ -521,7 +524,6 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { status = memnew(Label(TTR("Idle"))); vb->add_child(status); - status->add_theme_color_override("font_color", Color(0.5, 0.5, 0.5)); progress = memnew(ProgressBar); vb->add_child(progress); @@ -529,19 +531,19 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() { vb->add_child(hb2); hb2->add_spacer(); - install = memnew(Button); - install->set_text(TTR("Install...")); - install->set_disabled(true); - install->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_install)); + install_button = memnew(Button); + install_button->set_text(TTR("Install...")); + install_button->set_disabled(true); + install_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::install)); - retry = memnew(Button); - retry->set_text(TTR("Retry")); - retry->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request)); + retry_button = memnew(Button); + retry_button->set_text(TTR("Retry")); + retry_button->connect("pressed", callable_mp(this, &EditorAssetLibraryItemDownload::_make_request)); // Only show the Retry button in case of a failure. - retry->hide(); + retry_button->hide(); - hb2->add_child(retry); - hb2->add_child(install); + hb2->add_child(retry_button); + hb2->add_child(install_button); set_custom_minimum_size(Size2(310, 0) * EDSCALE); download = memnew(HTTPRequest); @@ -640,14 +642,10 @@ void EditorAssetLibrary::unhandled_key_input(const Ref<InputEvent> &p_event) { void EditorAssetLibrary::_install_asset() { ERR_FAIL_COND(!description); - for (int i = 0; i < downloads_hb->get_child_count(); i++) { - EditorAssetLibraryItemDownload *d = Object::cast_to<EditorAssetLibraryItemDownload>(downloads_hb->get_child(i)); - if (d && d->get_asset_id() == description->get_asset_id()) { - if (EditorNode::get_singleton() != nullptr) { - EditorNode::get_singleton()->show_warning(TTR("Download for this asset is already in progress!")); - } - return; - } + EditorAssetLibraryItemDownload *d = _get_asset_in_progress(description->get_asset_id()); + if (d) { + d->install(); + return; } EditorAssetLibraryItemDownload *download = memnew(EditorAssetLibraryItemDownload); @@ -1265,6 +1263,13 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const description->configure(r["title"], r["asset_id"], category_map[r["category_id"]], r["category_id"], r["author"], r["author_id"], r["cost"], r["version"], r["version_string"], r["description"], r["download_url"], r["browse_url"], r["download_hash"]); + EditorAssetLibraryItemDownload *download_item = _get_asset_in_progress(description->get_asset_id()); + if (download_item) { + description->get_ok_button()->set_text(TTR("Install")); + } else { + description->get_ok_button()->set_text(TTR("Download")); + } + if (r.has("icon_url") && !r["icon_url"].operator String().is_empty()) { _request_image(description->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0); } @@ -1322,6 +1327,17 @@ void EditorAssetLibrary::_manage_plugins() { ProjectSettingsEditor::get_singleton()->set_plugins_page(); } +EditorAssetLibraryItemDownload *EditorAssetLibrary::_get_asset_in_progress(int p_asset_id) const { + for (int i = 0; i < downloads_hb->get_child_count(); i++) { + EditorAssetLibraryItemDownload *d = Object::cast_to<EditorAssetLibraryItemDownload>(downloads_hb->get_child(i)); + if (d && d->get_asset_id() == p_asset_id) { + return d; + } + } + + return nullptr; +} + void EditorAssetLibrary::_install_external_asset(String p_zip_path, String p_title) { emit_signal(SNAME("install_asset"), p_zip_path, p_title); } diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index 8d6c0eb76e..058aafc221 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -39,6 +39,7 @@ #include "scene/gui/grid_container.h" #include "scene/gui/line_edit.h" #include "scene/gui/link_button.h" +#include "scene/gui/margin_container.h" #include "scene/gui/option_button.h" #include "scene/gui/panel_container.h" #include "scene/gui/progress_bar.h" @@ -126,16 +127,16 @@ public: EditorAssetLibraryItemDescription(); }; -class EditorAssetLibraryItemDownload : public Control { - GDCLASS(EditorAssetLibraryItemDownload, Control); +class EditorAssetLibraryItemDownload : public MarginContainer { + GDCLASS(EditorAssetLibraryItemDownload, MarginContainer); PanelContainer *panel; TextureRect *icon; Label *title; ProgressBar *progress; - Button *install; - Button *retry; - TextureButton *dismiss; + Button *install_button; + Button *retry_button; + TextureButton *dismiss_button; AcceptDialog *download_error; HTTPRequest *download; @@ -152,7 +153,6 @@ class EditorAssetLibraryItemDownload : public Control { EditorAssetInstaller *asset_installer; void _close(); - void _install(); void _make_request(); void _http_download_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); @@ -164,6 +164,7 @@ public: void set_external_install(bool p_enable) { external_install = p_enable; } int get_asset_id() { return asset_id; } void configure(const String &p_title, int p_asset_id, const Ref<Texture2D> &p_preview, const String &p_download_url, const String &p_sha256_hash); + void install(); EditorAssetLibraryItemDownload(); }; @@ -287,6 +288,7 @@ class EditorAssetLibrary : public PanelContainer { void _api_request(const String &p_request, RequestType p_request_type, const String &p_arguments = ""); void _http_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data); void _filter_debounce_timer_timeout(); + EditorAssetLibraryItemDownload *_get_asset_in_progress(int p_asset_id) const; void _repository_changed(int p_repository_id); void _support_toggled(int p_support); diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index d82d0c6ffc..95786176ee 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -136,9 +136,11 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, continue; } - //Transform3D shape_transform = sb->shape_owner_get_transform(E); - - //shape_transform.set_origin(shape_transform.get_origin() - phys_offset); + Transform3D shape_transform; + if (p_apply_xforms) { + shape_transform = mi->get_transform(); + } + shape_transform *= sb->get_transform() * sb->shape_owner_get_transform(E); for (int k = 0; k < sb->shape_owner_get_shape_count(E); k++) { Ref<Shape3D> collision = sb->shape_owner_get_shape(E, k); @@ -147,7 +149,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, } MeshLibrary::ShapeData shape_data; shape_data.shape = collision; - shape_data.local_transform = sb->get_transform() * sb->shape_owner_get_transform(E); + shape_data.local_transform = shape_transform; collisions.push_back(shape_data); } } diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 20f86c6a81..44f8d1a2bb 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -8043,7 +8043,6 @@ Node3DEditorPlugin::Node3DEditorPlugin(EditorNode *p_node) { editor->get_main_control()->add_child(spatial_editor); spatial_editor->hide(); - spatial_editor->connect("transform_key_request", Callable(editor->get_inspector_dock(), "_transform_keyed")); } Node3DEditorPlugin::~Node3DEditorPlugin() { diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index e1b27cb045..169ce29438 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -149,6 +149,9 @@ void BoneTransformEditor::set_target(const String &p_prop) { void BoneTransformEditor::_property_keyed(const String &p_path, bool p_advance) { AnimationTrackEditor *te = AnimationPlayerEditor::get_singleton()->get_track_editor(); + if (!te->has_keying()) { + return; + } PackedStringArray split = p_path.split("/"); if (split.size() == 3 && split[0] == "bones") { int bone_idx = split[1].to_int(); |