diff options
-rw-r--r-- | doc/classes/Camera.xml | 20 | ||||
-rw-r--r-- | doc/classes/InterpolatedCamera.xml | 8 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 15 | ||||
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | modules/bullet/godot_result_callbacks.cpp | 13 |
5 files changed, 40 insertions, 19 deletions
diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index 0b7cd4ef7a..9451ee959f 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -22,7 +22,7 @@ <return type="Transform"> </return> <description> - Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform. + Gets the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform. </description> </method> <method name="is_position_behind" qualifiers="const"> @@ -31,14 +31,14 @@ <argument index="0" name="world_point" type="Vector3"> </argument> <description> - Returns [code]true[/code] if the given position is behind the Camera. + Returns [code]true[/code] if the given position is behind the Camera. Note that a position which returns [code]false[/code] may still be outside the Camera's field of view. </description> </method> <method name="make_current"> <return type="void"> </return> <description> - Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. + Makes this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. </description> </method> <method name="project_local_ray_normal" qualifiers="const"> @@ -56,7 +56,7 @@ <argument index="0" name="screen_point" type="Vector2"> </argument> <description> - Returns how a 2D coordinate in the Viewport rectangle maps to a 3D point in worldspace. + Returns the 3D point in worldspace that maps to the given 2D coordinate in the [Viewport] rectangle. </description> </method> <method name="project_ray_normal" qualifiers="const"> @@ -87,7 +87,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) + Sets the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) </description> </method> <method name="set_perspective"> @@ -100,7 +100,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. + Sets the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. </description> </method> <method name="unproject_position" qualifiers="const"> @@ -109,7 +109,7 @@ <argument index="0" name="world_point" type="Vector3"> </argument> <description> - Returns how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle. + Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in worldspace. </description> </method> </methods> @@ -124,7 +124,7 @@ If not [code]DOPPLER_TRACKING_DISABLED[/code] this Camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. Default value: [code]DOPPLER_TRACKING_DISABLED[/code]. </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> - Set the [Environment] to use for this Camera. + The [Environment] to use for this Camera. </member> <member name="far" type="float" setter="set_zfar" getter="get_zfar"> The distance to the far culling boundary for this Camera relative to its local z-axis. @@ -136,7 +136,7 @@ The horizontal (X) offset of the Camera viewport. </member> <member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect"> - The axis to lock during [member fov]/[member size] adjustments. + The axis to lock during [member fov]/[member size] adjustments. Can be either [code]KEEP_WIDTH[/code] or [code]KEEP_HEIGHT[/code]. </member> <member name="near" type="float" setter="set_znear" getter="get_znear"> The distance to the near culling boundary for this Camera relative to its local z-axis. @@ -148,7 +148,7 @@ The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length. </member> <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset"> - The horizontal (Y) offset of the Camera viewport. + The vertical (Y) offset of the Camera viewport. </member> </members> <constants> diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml index d47df796a2..1ac7b5107e 100644 --- a/doc/classes/InterpolatedCamera.xml +++ b/doc/classes/InterpolatedCamera.xml @@ -5,7 +5,7 @@ </brief_description> <description> InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation. - If it is not [member enabled], or does not have a valid target set, InterpolatedCamera acts like a normal Camera. + If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera. </description> <tutorials> </tutorials> @@ -18,16 +18,16 @@ <argument index="0" name="target" type="Object"> </argument> <description> - Set the node to move toward. + Sets the node to move toward and orient with. </description> </method> </methods> <members> <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled"> - If [code]true[/code], and a target is set, the camera will move automatically. + If [code]true[/code] and a target is set, the camera will move automatically. </member> <member name="speed" type="float" setter="set_speed" getter="get_speed"> - How quickly the camera moves. + How quickly the camera moves toward its target. Higher values will result in tighter camera motion. </member> <member name="target" type="NodePath" setter="set_target_path" getter="get_target_path"> The target's [NodePath]. diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 9bfa50148f..f847382995 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1034,8 +1034,19 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path) { void FileSystemDock::_file_option(int p_option) { switch (p_option) { case FILE_SHOW_IN_EXPLORER: { - String dir = ProjectSettings::get_singleton()->globalize_path(this->path); - OS::get_singleton()->shell_open(String("file://") + dir); + + String path = this->path; + + // first try to grab directory from selected file, so that it works for searched files + int idx = files->get_current(); + + if (idx >= 0 && idx < files->get_item_count()) { + path = files->get_item_metadata(idx); + path = path.get_base_dir(); + } + + path = ProjectSettings::get_singleton()->globalize_path(path); + OS::get_singleton()->shell_open(String("file://") + path); } break; case FILE_OPEN: { for (int i = 0; i < files->get_item_count(); i++) { diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 89aa79527e..14c584fa35 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -1209,18 +1209,21 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (ED_IS_SHORTCUT("tile_map_editor/mirror_x", p_event)) { flip_h = !flip_h; mirror_x->set_pressed(flip_h); + _update_transform_buttons(); canvas_item_editor->update(); return true; } if (ED_IS_SHORTCUT("tile_map_editor/mirror_y", p_event)) { flip_v = !flip_v; mirror_y->set_pressed(flip_v); + _update_transform_buttons(); canvas_item_editor->update(); return true; } if (ED_IS_SHORTCUT("tile_map_editor/transpose", p_event)) { transpose = !transpose; transp->set_pressed(transpose); + _update_transform_buttons(); canvas_item_editor->update(); return true; } diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp index 0aa4c142a6..caa3d677dd 100644 --- a/modules/bullet/godot_result_callbacks.cpp +++ b/modules/bullet/godot_result_callbacks.cpp @@ -63,6 +63,9 @@ bool GodotClosestRayResultCallback::needsCollision(btBroadphaseProxy *proxy0) co } bool GodotAllConvexResultCallback::needsCollision(btBroadphaseProxy *proxy0) const { + if (count >= m_resultMax) + return false; + const bool needs = GodotFilterCallback::test_collision_filters(m_collisionFilterGroup, m_collisionFilterMask, proxy0->m_collisionFilterGroup, proxy0->m_collisionFilterMask); if (needs) { btCollisionObject *btObj = static_cast<btCollisionObject *>(proxy0->m_clientObject); @@ -70,6 +73,7 @@ bool GodotAllConvexResultCallback::needsCollision(btBroadphaseProxy *proxy0) con if (m_exclude->has(gObj->get_self())) { return false; } + return true; } else { return false; @@ -87,7 +91,7 @@ btScalar GodotAllConvexResultCallback::addSingleResult(btCollisionWorld::LocalCo result.collider = 0 == result.collider_id ? NULL : ObjectDB::get_instance(result.collider_id); ++count; - return count < m_resultMax; + return 1; // not used by bullet } bool GodotKinClosestConvexResultCallback::needsCollision(btBroadphaseProxy *proxy0) const { @@ -181,6 +185,9 @@ btScalar GodotAllContactResultCallback::addSingleResult(btManifoldPoint &cp, con } bool GodotContactPairContactResultCallback::needsCollision(btBroadphaseProxy *proxy0) const { + if (m_count >= m_resultMax) + return false; + const bool needs = GodotFilterCallback::test_collision_filters(m_collisionFilterGroup, m_collisionFilterMask, proxy0->m_collisionFilterGroup, proxy0->m_collisionFilterMask); if (needs) { btCollisionObject *btObj = static_cast<btCollisionObject *>(proxy0->m_clientObject); @@ -206,7 +213,7 @@ btScalar GodotContactPairContactResultCallback::addSingleResult(btManifoldPoint ++m_count; - return m_count < m_resultMax; + return 1; // Not used by bullet } bool GodotRestInfoContactResultCallback::needsCollision(btBroadphaseProxy *proxy0) const { @@ -252,7 +259,7 @@ btScalar GodotRestInfoContactResultCallback::addSingleResult(btManifoldPoint &cp m_collided = true; } - return cp.getDistance(); + return 1; // Not used by bullet } void GodotDeepPenetrationContactResultCallback::addContactPoint(const btVector3 &normalOnBInWorld, const btVector3 &pointInWorldOnB, btScalar depth) { |