diff options
-rw-r--r-- | doc/classes/Control.xml | 1 | ||||
-rw-r--r-- | doc/classes/Node2D.xml | 1 | ||||
-rw-r--r-- | doc/classes/Node3D.xml | 1 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 12 | ||||
-rw-r--r-- | editor/editor_settings.h | 1 | ||||
-rw-r--r-- | modules/gltf/editor/editor_scene_importer_fbx.cpp | 2 |
6 files changed, 14 insertions, 4 deletions
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index f45ddf2738..5693876194 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1001,6 +1001,7 @@ </member> <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> The node's rotation around its pivot, in radians. See [member pivot_offset] to change the pivot's position. + [b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees]. </member> <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> Helper property to access [member rotation] in degrees instead of radians. diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 9d224f09b1..3b2c52c5bf 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -116,6 +116,7 @@ </member> <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> Rotation in radians, relative to the node's parent. + [b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees]. </member> <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> Helper property to access [member rotation] in degrees instead of radians. diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index c199c1aae6..61e5c44251 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -289,6 +289,7 @@ <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" default="Vector3(0, 0, 0)"> Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the [member rotation_order] property. [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. + [b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees]. </member> <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees"> Helper property to access [member rotation] in degrees instead of radians. diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 0868de4a11..b4f5eeda84 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1384,8 +1384,13 @@ float EditorSettings::get_auto_display_scale() const { // Shortcuts +void EditorSettings::_add_shortcut_default(const String &p_name, const Ref<Shortcut> &p_shortcut) { + shortcuts[p_name] = p_shortcut; +} + void EditorSettings::add_shortcut(const String &p_name, const Ref<Shortcut> &p_shortcut) { shortcuts[p_name] = p_shortcut; + shortcuts[p_name]->set_meta("customized", true); } bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const { @@ -1489,8 +1494,8 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c } } - // Override the existing shortcut only if it wasn't customized by the user (i.e. still "original"). - if (sc->has_meta("original") && Shortcut::is_event_array_equal(sc->get_events(), sc->get_meta("original"))) { + // Override the existing shortcut only if it wasn't customized by the user. + if (!sc->has_meta("customized")) { sc->set_events(events); } @@ -1535,6 +1540,7 @@ Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, cons Ref<Shortcut> sc = EditorSettings::get_singleton()->get_shortcut(p_path); if (sc.is_valid()) { sc->set_name(p_name); //keep name (the ones that come from disk have no name) + sc->set_meta("original", events.duplicate(true)); //to compare against changes return sc; } @@ -1542,7 +1548,7 @@ Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, cons sc->set_name(p_name); sc->set_events(events); sc->set_meta("original", events.duplicate(true)); //to compare against changes - EditorSettings::get_singleton()->add_shortcut(p_path, sc); + EditorSettings::get_singleton()->_add_shortcut_default(p_path, sc); return sc; } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index e8775636a3..e1d3e757e0 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -170,6 +170,7 @@ public: String get_editor_layouts_config() const; float get_auto_display_scale() const; + void _add_shortcut_default(const String &p_name, const Ref<Shortcut> &p_shortcut); void add_shortcut(const String &p_name, const Ref<Shortcut> &p_shortcut); bool is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const; Ref<Shortcut> get_shortcut(const String &p_name) const; diff --git a/modules/gltf/editor/editor_scene_importer_fbx.cpp b/modules/gltf/editor/editor_scene_importer_fbx.cpp index f8f458fcc7..5e7a8f4e69 100644 --- a/modules/gltf/editor/editor_scene_importer_fbx.cpp +++ b/modules/gltf/editor/editor_scene_importer_fbx.cpp @@ -93,7 +93,7 @@ Node *EditorSceneFormatImporterFBX::import_scene(const String &p_path, uint32_t Ref<GLTFState> state; state.instantiate(); print_verbose(vformat("glTF path: %s", sink)); - Error err = gltf->append_from_file(sink, state, p_flags); + Error err = gltf->append_from_file(sink, state, p_flags, p_path.get_base_dir()); if (err != OK) { if (r_err) { *r_err = FAILED; |