diff options
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/node_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/node_3d.h | 2 | ||||
-rw-r--r-- | scene/3d/remote_transform_3d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/shape_cast_3d.cpp | 6 | ||||
-rw-r--r-- | scene/3d/shape_cast_3d.h | 1 | ||||
-rw-r--r-- | scene/3d/sprite_3d.cpp | 5 |
6 files changed, 16 insertions, 4 deletions
diff --git a/scene/3d/node_3d.cpp b/scene/3d/node_3d.cpp index 1743fa1838..e2d68c36ff 100644 --- a/scene/3d/node_3d.cpp +++ b/scene/3d/node_3d.cpp @@ -393,7 +393,7 @@ Node3D::RotationEditMode Node3D::get_rotation_edit_mode() const { } void Node3D::set_rotation_order(RotationOrder p_order) { - Basis::EulerOrder order = Basis::EulerOrder(p_order); + EulerOrder order = EulerOrder(p_order); if (data.euler_rotation_order == order) { return; diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h index 457f634c34..f6868209bb 100644 --- a/scene/3d/node_3d.h +++ b/scene/3d/node_3d.h @@ -100,7 +100,7 @@ private: struct Data { mutable Transform3D global_transform; mutable Transform3D local_transform; - mutable Basis::EulerOrder euler_rotation_order = Basis::EULER_ORDER_YXZ; + mutable EulerOrder euler_rotation_order = EulerOrder::YXZ; mutable Vector3 euler_rotation; mutable Vector3 scale = Vector3(1, 1, 1); mutable RotationEditMode rotation_edit_mode = ROTATION_EDIT_MODE_EULER; diff --git a/scene/3d/remote_transform_3d.cpp b/scene/3d/remote_transform_3d.cpp index ff05e88241..817ffbfec8 100644 --- a/scene/3d/remote_transform_3d.cpp +++ b/scene/3d/remote_transform_3d.cpp @@ -68,7 +68,7 @@ void RemoteTransform3D::_update_remote() { Transform3D our_trans = get_global_transform(); if (update_remote_rotation) { - n->set_rotation(our_trans.basis.get_euler_normalized(Basis::EulerOrder(n->get_rotation_order()))); + n->set_rotation(our_trans.basis.get_euler_normalized(EulerOrder(n->get_rotation_order()))); } if (update_remote_scale) { @@ -90,7 +90,7 @@ void RemoteTransform3D::_update_remote() { Transform3D our_trans = get_transform(); if (update_remote_rotation) { - n->set_rotation(our_trans.basis.get_euler_normalized(Basis::EulerOrder(n->get_rotation_order()))); + n->set_rotation(our_trans.basis.get_euler_normalized(EulerOrder(n->get_rotation_order()))); } if (update_remote_scale) { diff --git a/scene/3d/shape_cast_3d.cpp b/scene/3d/shape_cast_3d.cpp index 03cbd984cd..267139c7d0 100644 --- a/scene/3d/shape_cast_3d.cpp +++ b/scene/3d/shape_cast_3d.cpp @@ -115,6 +115,7 @@ void ShapeCast3D::_bind_methods() { ClassDB::bind_method(D_METHOD("force_shapecast_update"), &ShapeCast3D::force_shapecast_update); ClassDB::bind_method(D_METHOD("get_collider", "index"), &ShapeCast3D::get_collider); + ClassDB::bind_method(D_METHOD("get_collider_rid", "index"), &ShapeCast3D::get_collider_rid); ClassDB::bind_method(D_METHOD("get_collider_shape", "index"), &ShapeCast3D::get_collider_shape); ClassDB::bind_method(D_METHOD("get_collision_point", "index"), &ShapeCast3D::get_collision_point); ClassDB::bind_method(D_METHOD("get_collision_normal", "index"), &ShapeCast3D::get_collision_normal); @@ -282,6 +283,11 @@ Object *ShapeCast3D::get_collider(int p_idx) const { return ObjectDB::get_instance(result[p_idx].collider_id); } +RID ShapeCast3D::get_collider_rid(int p_idx) const { + ERR_FAIL_INDEX_V_MSG(p_idx, result.size(), RID(), "No collider RID found."); + return result[p_idx].rid; +} + int ShapeCast3D::get_collider_shape(int p_idx) const { ERR_FAIL_INDEX_V_MSG(p_idx, result.size(), -1, "No collider shape found."); return result[p_idx].shape; diff --git a/scene/3d/shape_cast_3d.h b/scene/3d/shape_cast_3d.h index 2526d8d32c..abe10c9b24 100644 --- a/scene/3d/shape_cast_3d.h +++ b/scene/3d/shape_cast_3d.h @@ -120,6 +120,7 @@ public: int get_collision_count() const; Object *get_collider(int p_idx) const; + RID get_collider_rid(int p_idx) const; int get_collider_shape(int p_idx) const; Vector3 get_collision_point(int p_idx) const; Vector3 get_collision_normal(int p_idx) const; diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index be6eab2178..d69953fee5 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -680,6 +680,7 @@ void Sprite3D::set_region_enabled(bool p_region) { region = p_region; _queue_redraw(); + notify_property_list_changed(); } bool Sprite3D::is_region_enabled() const { @@ -781,6 +782,10 @@ void Sprite3D::_validate_property(PropertyInfo &p_property) const { if (p_property.name == "frame_coords") { p_property.usage |= PROPERTY_USAGE_KEYING_INCREMENTS; } + + if (!region && (p_property.name == "region_rect")) { + p_property.usage = PROPERTY_USAGE_NO_EDITOR; + } } void Sprite3D::_bind_methods() { |