summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/world_environment.cpp7
-rw-r--r--scene/main/instance_placeholder.cpp6
-rw-r--r--scene/main/instance_placeholder.h1
-rw-r--r--scene/main/node.cpp5
-rw-r--r--scene/register_scene_types.cpp1
-rw-r--r--scene/resources/environment.cpp5
-rw-r--r--scene/resources/environment.h1
-rw-r--r--scene/resources/material.cpp6
-rw-r--r--scene/resources/material.h1
-rw-r--r--scene/resources/mesh.cpp4
-rw-r--r--scene/resources/multimesh.cpp8
-rw-r--r--scene/resources/multimesh.h2
12 files changed, 19 insertions, 28 deletions
diff --git a/scene/3d/world_environment.cpp b/scene/3d/world_environment.cpp
index a4c990c81d..83a7243906 100644
--- a/scene/3d/world_environment.cpp
+++ b/scene/3d/world_environment.cpp
@@ -121,7 +121,7 @@ String WorldEnvironment::get_configuration_warning() const {
return TTR("WorldEnvironment requires its \"Environment\" property to contain an Environment to have a visible effect.");
}
- if (/*!is_visible_in_tree() ||*/ !is_inside_tree())
+ if (!is_inside_tree())
return String();
List<Node *> nodes;
@@ -131,11 +131,6 @@ String WorldEnvironment::get_configuration_warning() const {
return TTR("Only one WorldEnvironment is allowed per scene (or set of instanced scenes).");
}
- // Commenting this warning for now, I think it makes no sense. If anyone can figure out what its supposed to do, feedback welcome. Else it should be deprecated.
- //if (environment.is_valid() && get_viewport() && !get_viewport()->get_camera() && environment->get_background() != Environment::BG_CANVAS) {
- // return TTR("This WorldEnvironment is ignored. Either add a Camera (for 3D scenes) or set this environment's Background Mode to Canvas (for 2D scenes).");
- //}
-
return String();
}
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp
index 0128d1a218..f1b3f91920 100644
--- a/scene/main/instance_placeholder.cpp
+++ b/scene/main/instance_placeholder.cpp
@@ -112,11 +112,6 @@ Node *InstancePlaceholder::create_instance(bool p_replace, const Ref<PackedScene
return scene;
}
-void InstancePlaceholder::replace_by_instance(const Ref<PackedScene> &p_custom_scene) {
- //Deprecated by
- create_instance(true, p_custom_scene);
-}
-
Dictionary InstancePlaceholder::get_stored_values(bool p_with_order) {
Dictionary ret;
@@ -138,7 +133,6 @@ void InstancePlaceholder::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_stored_values", "with_order"), &InstancePlaceholder::get_stored_values, DEFVAL(false));
ClassDB::bind_method(D_METHOD("create_instance", "replace", "custom_scene"), &InstancePlaceholder::create_instance, DEFVAL(false), DEFVAL(Variant()));
- ClassDB::bind_method(D_METHOD("replace_by_instance", "custom_scene"), &InstancePlaceholder::replace_by_instance, DEFVAL(Variant()));
ClassDB::bind_method(D_METHOD("get_instance_path"), &InstancePlaceholder::get_instance_path);
}
diff --git a/scene/main/instance_placeholder.h b/scene/main/instance_placeholder.h
index d570b8c247..9f7b84716d 100644
--- a/scene/main/instance_placeholder.h
+++ b/scene/main/instance_placeholder.h
@@ -61,7 +61,6 @@ public:
Dictionary get_stored_values(bool p_with_order = false);
Node *create_instance(bool p_replace = false, const Ref<PackedScene> &p_custom_scene = Ref<PackedScene>());
- void replace_by_instance(const Ref<PackedScene> &p_custom_scene = Ref<PackedScene>());
InstancePlaceholder();
};
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 6a7971ddb3..8ceac74bb8 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2998,11 +2998,6 @@ void Node::_bind_methods() {
ADD_GROUP("Pause", "pause_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "pause_mode", PROPERTY_HINT_ENUM, "Inherit,Stop,Process"), "set_pause_mode", "get_pause_mode");
-#ifdef ENABLE_DEPRECATED
- //no longer exists, but remains for compatibility (keep previous scenes folded
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor/display_folded", PROPERTY_HINT_NONE, "", 0), "set_display_folded", "is_displayed_folded");
-#endif
-
ADD_PROPERTY(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "", 0), "set_name", "get_name");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "filename", PROPERTY_HINT_NONE, "", 0), "set_filename", "get_filename");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "owner", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_owner", "get_owner");
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 779c63111a..40f24ece87 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -734,7 +734,6 @@ void register_scene_types() {
ClassDB::register_virtual_class<SceneTreeTimer>(); //sorry, you can't create it
#ifndef DISABLE_DEPRECATED
- ClassDB::add_compatibility_class("ImageSkyBox", "PanoramaSky");
ClassDB::add_compatibility_class("SpatialMaterial", "StandardMaterial3D");
ClassDB::add_compatibility_class("Mesh", "ArrayMesh");
ClassDB::add_compatibility_class("AnimationTreePlayer", "AnimationTree");
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;