diff options
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/environment.cpp | 5 | ||||
-rw-r--r-- | scene/resources/environment.h | 1 | ||||
-rw-r--r-- | scene/resources/material.cpp | 6 | ||||
-rw-r--r-- | scene/resources/material.h | 1 | ||||
-rw-r--r-- | scene/resources/mesh.cpp | 4 | ||||
-rw-r--r-- | scene/resources/multimesh.cpp | 8 | ||||
-rw-r--r-- | scene/resources/multimesh.h | 2 |
7 files changed, 18 insertions, 9 deletions
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 285b11fefd..6790f02128 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -815,6 +815,7 @@ float Environment::get_fog_height_curve() const { } #ifndef DISABLE_DEPRECATED +// Kept for compatibility from 3.x to 4.0. bool Environment::_set(const StringName &p_name, const Variant &p_value) { if (p_name == "background_sky") { set_sky(p_value); @@ -822,6 +823,10 @@ bool Environment::_set(const StringName &p_name, const Variant &p_value) { } else if (p_name == "background_sky_custom_fov") { set_sky_custom_fov(p_value); return true; + } else if (p_name == "background_sky_orientation") { + Vector3 euler = p_value.operator Basis().get_euler(); + set_sky_rotation(euler); + return true; } else { return false; } diff --git a/scene/resources/environment.h b/scene/resources/environment.h index 4360ceeca3..f9fe26f792 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -170,6 +170,7 @@ protected: static void _bind_methods(); virtual void _validate_property(PropertyInfo &property) const; #ifndef DISABLE_DEPRECATED + // Kept for compatibility from 3.x to 4.0. bool _set(const StringName &p_name, const Variant &p_value); #endif diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index 1255bb8a87..01e3c4c930 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -2598,8 +2598,9 @@ BaseMaterial3D::~BaseMaterial3D() { } ////////////////////// -#ifndef DISABLE_DEPRECATED +#ifndef DISABLE_DEPRECATED +// Kept for compatibility from 3.x to 4.0. bool StandardMaterial3D::_set(const StringName &p_name, const Variant &p_value) { if (p_name == "flags_transparent") { bool transparent = p_value; @@ -2686,5 +2687,4 @@ bool StandardMaterial3D::_set(const StringName &p_name, const Variant &p_value) return false; } - -#endif +#endif // DISABLE_DEPRECATED diff --git a/scene/resources/material.h b/scene/resources/material.h index 328c868f2a..8c5a648058 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -697,6 +697,7 @@ class StandardMaterial3D : public BaseMaterial3D { GDCLASS(StandardMaterial3D, BaseMaterial3D) protected: #ifndef DISABLE_DEPRECATED + // Kept for compatibility from 3.x to 4.0. bool _set(const StringName &p_name, const Variant &p_value); #endif diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 6049d96fee..58463abad8 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -743,6 +743,7 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { } #ifndef DISABLE_DEPRECATED + // Kept for compatibility from 3.x to 4.0. if (!sname.begins_with("surfaces")) return false; @@ -841,8 +842,7 @@ bool ArrayMesh::_set(const StringName &p_name, const Variant &p_value) { return true; } - -#endif +#endif // DISABLE_DEPRECATED return false; } diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp index 946511c766..9c34ae0504 100644 --- a/scene/resources/multimesh.cpp +++ b/scene/resources/multimesh.cpp @@ -29,9 +29,11 @@ /*************************************************************************/ #include "multimesh.h" + #include "servers/visual_server.h" #ifndef DISABLE_DEPRECATED +// Kept for compatibility from 3.x to 4.0. void MultiMesh::_set_transform_array(const PoolVector<Vector3> &p_array) { if (transform_format != TRANSFORM_3D) @@ -193,8 +195,8 @@ PoolVector<Color> MultiMesh::_get_custom_data_array() const { return custom_datas; } +#endif // DISABLE_DEPRECATED -#endif void MultiMesh::set_buffer(const PoolVector<float> &p_buffer) { VS::get_singleton()->multimesh_set_buffer(multimesh, p_buffer); } @@ -351,8 +353,7 @@ void MultiMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::POOL_REAL_ARRAY, "buffer", PROPERTY_HINT_NONE), "set_buffer", "get_buffer"); #ifndef DISABLE_DEPRECATED - //kept for compatibility - + // Kept for compatibility from 3.x to 4.0. ClassDB::bind_method(D_METHOD("_set_transform_array"), &MultiMesh::_set_transform_array); ClassDB::bind_method(D_METHOD("_get_transform_array"), &MultiMesh::_get_transform_array); ClassDB::bind_method(D_METHOD("_set_transform_2d_array"), &MultiMesh::_set_transform_2d_array); @@ -367,6 +368,7 @@ void MultiMesh::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "color_array", PROPERTY_HINT_NONE, "", 0), "_set_color_array", "_get_color_array"); ADD_PROPERTY(PropertyInfo(Variant::POOL_COLOR_ARRAY, "custom_data_array", PROPERTY_HINT_NONE, "", 0), "_set_custom_data_array", "_get_custom_data_array"); #endif + BIND_ENUM_CONSTANT(TRANSFORM_2D); BIND_ENUM_CONSTANT(TRANSFORM_3D); } diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h index e7d62d0993..5423e66358 100644 --- a/scene/resources/multimesh.h +++ b/scene/resources/multimesh.h @@ -58,7 +58,7 @@ protected: static void _bind_methods(); #ifndef DISABLE_DEPRECATED - + // Kept for compatibility from 3.x to 4.0. void _set_transform_array(const PoolVector<Vector3> &p_array); PoolVector<Vector3> _get_transform_array() const; |