mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Remove more deprecated methods and code
This commit is contained in:
parent
f1ac292084
commit
54ac8eaba6
12
SConstruct
12
SConstruct
@ -418,17 +418,7 @@ if selected_platform in platform_list:
|
||||
sys.path.insert(0, tmppath)
|
||||
env.current_module = x
|
||||
import config
|
||||
# can_build changed number of arguments between 3.0 (1) and 3.1 (2),
|
||||
# so try both to preserve compatibility for 3.0 modules
|
||||
can_build = False
|
||||
try:
|
||||
can_build = config.can_build(env, selected_platform)
|
||||
except TypeError:
|
||||
print("Warning: module '%s' uses a deprecated `can_build` "
|
||||
"signature in its config.py file, it should be "
|
||||
"`can_build(env, platform)`." % x)
|
||||
can_build = config.can_build(selected_platform)
|
||||
if can_build:
|
||||
if config.can_build(env, selected_platform):
|
||||
config.configure(env)
|
||||
env.module_list.append(x)
|
||||
|
||||
|
@ -108,13 +108,6 @@ PoolStringArray _ResourceLoader::get_dependencies(const String &p_path) {
|
||||
return ret;
|
||||
};
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
bool _ResourceLoader::has(const String &p_path) {
|
||||
WARN_PRINT("ResourceLoader.has() is deprecated, please replace it with the equivalent has_cached() or the new exists().");
|
||||
return has_cached(p_path);
|
||||
}
|
||||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
bool _ResourceLoader::has_cached(const String &p_path) {
|
||||
|
||||
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
|
||||
@ -134,9 +127,6 @@ void _ResourceLoader::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_dependencies", "path"), &_ResourceLoader::get_dependencies);
|
||||
ClassDB::bind_method(D_METHOD("has_cached", "path"), &_ResourceLoader::has_cached);
|
||||
ClassDB::bind_method(D_METHOD("exists", "path", "type_hint"), &_ResourceLoader::exists, DEFVAL(""));
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
ClassDB::bind_method(D_METHOD("has", "path"), &_ResourceLoader::has);
|
||||
#endif // DISABLE_DEPRECATED
|
||||
}
|
||||
|
||||
_ResourceLoader::_ResourceLoader() {
|
||||
|
@ -55,9 +55,6 @@ public:
|
||||
PoolVector<String> get_recognized_extensions_for_type(const String &p_type);
|
||||
void set_abort_on_missing_resources(bool p_abort);
|
||||
PoolStringArray get_dependencies(const String &p_path);
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
bool has(const String &p_path);
|
||||
#endif // DISABLE_DEPRECATED
|
||||
bool has_cached(const String &p_path);
|
||||
bool exists(const String &p_path, const String &p_type_hint = "");
|
||||
|
||||
|
@ -203,8 +203,7 @@ Error JSON::_get_token(const CharType *p_str, int &index, int p_len, Token &r_to
|
||||
case 'f': res = 12; break;
|
||||
case 'r': res = 13; break;
|
||||
case 'u': {
|
||||
//hexnumbarh - oct is deprecated
|
||||
|
||||
// hex number
|
||||
for (int j = 0; j < 4; j++) {
|
||||
CharType c = p_str[index + j + 1];
|
||||
if (c == 0) {
|
||||
@ -226,7 +225,7 @@ Error JSON::_get_token(const CharType *p_str, int &index, int p_len, Token &r_to
|
||||
v = c - 'A';
|
||||
v += 10;
|
||||
} else {
|
||||
ERR_PRINT("BUG");
|
||||
ERR_PRINT("Bug parsing hex constant.");
|
||||
v = 0;
|
||||
}
|
||||
|
||||
@ -236,13 +235,8 @@ Error JSON::_get_token(const CharType *p_str, int &index, int p_len, Token &r_to
|
||||
index += 4; //will add at the end anyway
|
||||
|
||||
} break;
|
||||
//case '\"': res='\"'; break;
|
||||
//case '\\': res='\\'; break;
|
||||
//case '/': res='/'; break;
|
||||
default: {
|
||||
res = next;
|
||||
//r_err_str="Invalid escape sequence";
|
||||
//return ERR_PARSE_ERROR;
|
||||
} break;
|
||||
}
|
||||
|
||||
|
@ -73,13 +73,6 @@ enum {
|
||||
VARIANT_VECTOR2_ARRAY = 37,
|
||||
VARIANT_INT64 = 40,
|
||||
VARIANT_DOUBLE = 41,
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
VARIANT_IMAGE = 21, // - no longer variant type
|
||||
IMAGE_ENCODING_EMPTY = 0,
|
||||
IMAGE_ENCODING_RAW = 1,
|
||||
IMAGE_ENCODING_LOSSLESS = 2,
|
||||
IMAGE_ENCODING_LOSSY = 3,
|
||||
#endif
|
||||
OBJECT_EMPTY = 0,
|
||||
OBJECT_EXTERNAL_RESOURCE = 1,
|
||||
OBJECT_INTERNAL_RESOURCE = 2,
|
||||
@ -549,69 +542,6 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
|
||||
w.release();
|
||||
r_v = array;
|
||||
} break;
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
case VARIANT_IMAGE: {
|
||||
uint32_t encoding = f->get_32();
|
||||
if (encoding == IMAGE_ENCODING_EMPTY) {
|
||||
r_v = Ref<Image>();
|
||||
break;
|
||||
} else if (encoding == IMAGE_ENCODING_RAW) {
|
||||
uint32_t width = f->get_32();
|
||||
uint32_t height = f->get_32();
|
||||
uint32_t mipmaps = f->get_32();
|
||||
uint32_t format = f->get_32();
|
||||
const uint32_t format_version_shift = 24;
|
||||
const uint32_t format_version_mask = format_version_shift - 1;
|
||||
|
||||
uint32_t format_version = format >> format_version_shift;
|
||||
|
||||
const uint32_t current_version = 0;
|
||||
if (format_version > current_version) {
|
||||
|
||||
ERR_PRINT("Format version for encoded binary image is too new.");
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
Image::Format fmt = Image::Format(format & format_version_mask); //if format changes, we can add a compatibility bit on top
|
||||
|
||||
uint32_t datalen = f->get_32();
|
||||
|
||||
PoolVector<uint8_t> imgdata;
|
||||
imgdata.resize(datalen);
|
||||
PoolVector<uint8_t>::Write w = imgdata.write();
|
||||
f->get_buffer(w.ptr(), datalen);
|
||||
_advance_padding(datalen);
|
||||
w.release();
|
||||
|
||||
Ref<Image> image;
|
||||
image.instance();
|
||||
image->create(width, height, mipmaps, fmt, imgdata);
|
||||
r_v = image;
|
||||
|
||||
} else {
|
||||
//compressed
|
||||
PoolVector<uint8_t> data;
|
||||
data.resize(f->get_32());
|
||||
PoolVector<uint8_t>::Write w = data.write();
|
||||
f->get_buffer(w.ptr(), data.size());
|
||||
w.release();
|
||||
|
||||
Ref<Image> image;
|
||||
|
||||
if (encoding == IMAGE_ENCODING_LOSSY && Image::lossy_unpacker) {
|
||||
|
||||
image = Image::lossy_unpacker(data);
|
||||
} else if (encoding == IMAGE_ENCODING_LOSSLESS && Image::lossless_unpacker) {
|
||||
|
||||
image = Image::lossless_unpacker(data);
|
||||
}
|
||||
_advance_padding(data.size());
|
||||
|
||||
r_v = image;
|
||||
}
|
||||
|
||||
} break;
|
||||
#endif
|
||||
default: {
|
||||
ERR_FAIL_V(ERR_FILE_CORRUPT);
|
||||
} break;
|
||||
|
@ -51,7 +51,6 @@ class ResourceInteractiveLoaderBinary : public ResourceInteractiveLoader {
|
||||
Vector<char> str_buf;
|
||||
List<RES> resource_cache;
|
||||
|
||||
//Map<int,StringName> string_map;
|
||||
Vector<StringName> string_map;
|
||||
|
||||
StringName _get_string();
|
||||
|
@ -1029,8 +1029,7 @@ Error Expression::_get_token(Token &r_token) {
|
||||
case 'f': res = 12; break;
|
||||
case 'r': res = 13; break;
|
||||
case 'u': {
|
||||
//hexnumbarh - oct is deprecated
|
||||
|
||||
// hex number
|
||||
for (int j = 0; j < 4; j++) {
|
||||
CharType c = GET_CHAR();
|
||||
|
||||
@ -1055,7 +1054,7 @@ Error Expression::_get_token(Token &r_token) {
|
||||
v = c - 'A';
|
||||
v += 10;
|
||||
} else {
|
||||
ERR_PRINT("BUG");
|
||||
ERR_PRINT("Bug parsing hex constant.");
|
||||
v = 0;
|
||||
}
|
||||
|
||||
@ -1064,13 +1063,8 @@ Error Expression::_get_token(Token &r_token) {
|
||||
}
|
||||
|
||||
} break;
|
||||
//case '\"': res='\"'; break;
|
||||
//case '\\': res='\\'; break;
|
||||
//case '/': res='/'; break;
|
||||
default: {
|
||||
res = next;
|
||||
//r_err_str="Invalid escape sequence";
|
||||
//return ERR_PARSE_ERROR;
|
||||
} break;
|
||||
}
|
||||
|
||||
|
@ -235,8 +235,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
|
||||
case 'f': res = 12; break;
|
||||
case 'r': res = 13; break;
|
||||
case 'u': {
|
||||
//hexnumbarh - oct is deprecated
|
||||
|
||||
//hex number
|
||||
for (int j = 0; j < 4; j++) {
|
||||
CharType c = p_stream->get_char();
|
||||
if (c == 0) {
|
||||
@ -260,7 +259,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
|
||||
v = c - 'A';
|
||||
v += 10;
|
||||
} else {
|
||||
ERR_PRINT("BUG");
|
||||
ERR_PRINT("Bug parsing hex constant.");
|
||||
v = 0;
|
||||
}
|
||||
|
||||
@ -269,13 +268,8 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
|
||||
}
|
||||
|
||||
} break;
|
||||
//case '\"': res='\"'; break;
|
||||
//case '\\': res='\\'; break;
|
||||
//case '/': res='/'; break;
|
||||
default: {
|
||||
res = next;
|
||||
//r_err_str="Invalid escape sequence";
|
||||
//return ERR_PARSE_ERROR;
|
||||
} break;
|
||||
}
|
||||
|
||||
@ -866,198 +860,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
}
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
} else if (id == "InputEvent") {
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_PARENTHESIS_OPEN) {
|
||||
r_err_str = "Expected '('";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
|
||||
if (token.type != TK_IDENTIFIER) {
|
||||
r_err_str = "Expected identifier";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
String id2 = token.value;
|
||||
|
||||
Ref<InputEvent> ie;
|
||||
|
||||
if (id2 == "NONE") {
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
|
||||
if (token.type != TK_PARENTHESIS_CLOSE) {
|
||||
r_err_str = "Expected ')'";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
} else if (id2 == "KEY") {
|
||||
|
||||
Ref<InputEventKey> key;
|
||||
key.instance();
|
||||
ie = key;
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_COMMA) {
|
||||
r_err_str = "Expected ','";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type == TK_IDENTIFIER) {
|
||||
String name = token.value;
|
||||
key->set_scancode(find_keycode(name));
|
||||
} else if (token.type == TK_NUMBER) {
|
||||
|
||||
key->set_scancode(token.value);
|
||||
} else {
|
||||
|
||||
r_err_str = "Expected string or integer for keycode";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
|
||||
if (token.type == TK_COMMA) {
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
|
||||
if (token.type != TK_IDENTIFIER) {
|
||||
r_err_str = "Expected identifier with modifier flas";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
String mods = token.value;
|
||||
|
||||
if (mods.findn("C") != -1)
|
||||
key->set_control(true);
|
||||
if (mods.findn("A") != -1)
|
||||
key->set_alt(true);
|
||||
if (mods.findn("S") != -1)
|
||||
key->set_shift(true);
|
||||
if (mods.findn("M") != -1)
|
||||
key->set_metakey(true);
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_PARENTHESIS_CLOSE) {
|
||||
r_err_str = "Expected ')'";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
} else if (token.type != TK_PARENTHESIS_CLOSE) {
|
||||
|
||||
r_err_str = "Expected ')' or modifier flags.";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
} else if (id2 == "MBUTTON") {
|
||||
|
||||
Ref<InputEventMouseButton> mb;
|
||||
mb.instance();
|
||||
ie = mb;
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_COMMA) {
|
||||
r_err_str = "Expected ','";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_NUMBER) {
|
||||
r_err_str = "Expected button index";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
mb->set_button_index(token.value);
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_PARENTHESIS_CLOSE) {
|
||||
r_err_str = "Expected ')'";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
} else if (id2 == "JBUTTON") {
|
||||
|
||||
Ref<InputEventJoypadButton> jb;
|
||||
jb.instance();
|
||||
ie = jb;
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_COMMA) {
|
||||
r_err_str = "Expected ','";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_NUMBER) {
|
||||
r_err_str = "Expected button index";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
jb->set_button_index(token.value);
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_PARENTHESIS_CLOSE) {
|
||||
r_err_str = "Expected ')'";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
} else if (id2 == "JAXIS") {
|
||||
|
||||
Ref<InputEventJoypadMotion> jm;
|
||||
jm.instance();
|
||||
ie = jm;
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_COMMA) {
|
||||
r_err_str = "Expected ','";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_NUMBER) {
|
||||
r_err_str = "Expected axis index";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
jm->set_axis(token.value);
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
|
||||
if (token.type != TK_COMMA) {
|
||||
r_err_str = "Expected ',' after axis index";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
if (token.type != TK_NUMBER) {
|
||||
r_err_str = "Expected axis sign";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
jm->set_axis_value(token.value);
|
||||
|
||||
get_token(p_stream, token, line, r_err_str);
|
||||
|
||||
if (token.type != TK_PARENTHESIS_CLOSE) {
|
||||
r_err_str = "Expected ')' for jaxis";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
r_err_str = "Invalid input event type.";
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
value = ie;
|
||||
|
||||
return OK;
|
||||
#endif
|
||||
} else if (id == "PoolByteArray" || id == "ByteArray") {
|
||||
|
||||
Vector<uint8_t> args;
|
||||
|
@ -4,8 +4,8 @@
|
||||
Placeholder for the root [Node] of a [PackedScene].
|
||||
</brief_description>
|
||||
<description>
|
||||
Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an InstancePlaceholder when running the game. This makes it possible to delay actually loading the scene until calling [method replace_by_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
|
||||
The InstancePlaceholder does not have a transform. This causes any child nodes to be positioned relatively to the Viewport from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
|
||||
Turning on the option [b]Load As Placeholder[/b] for an instanced scene in the editor causes it to be replaced by an [InstancePlaceholder] when running the game. This makes it possible to delay actually loading the scene until calling [method create_instance]. This is useful to avoid loading large scenes all at once by loading parts of it selectively.
|
||||
The [InstancePlaceholder] does not have a transform. This causes any child nodes to be positioned relatively to the [Viewport] from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@ -24,7 +24,7 @@
|
||||
<return type="String">
|
||||
</return>
|
||||
<description>
|
||||
Gets the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance].
|
||||
Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_stored_values">
|
||||
@ -35,15 +35,6 @@
|
||||
<description>
|
||||
</description>
|
||||
</method>
|
||||
<method name="replace_by_instance">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="custom_scene" type="PackedScene" default="null">
|
||||
</argument>
|
||||
<description>
|
||||
Replaces this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
|
@ -41,15 +41,6 @@
|
||||
Returns the list of recognized extensions for a resource type.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<argument index="0" name="path" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
[i]Deprecated method.[/i] Use [method has_cached] or [method exists] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_cached">
|
||||
<return type="bool">
|
||||
</return>
|
||||
|
@ -592,17 +592,6 @@
|
||||
To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID.
|
||||
</description>
|
||||
</method>
|
||||
<method name="draw">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="swap_buffers" type="bool" default="true">
|
||||
</argument>
|
||||
<argument index="1" name="frame_step" type="float" default="0.0">
|
||||
</argument>
|
||||
<description>
|
||||
Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="environment_create">
|
||||
<return type="RID">
|
||||
</return>
|
||||
@ -942,7 +931,7 @@
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns [code]true[/code] if changes have been made to the VisualServer's data. [method draw] is usually called if this happens.
|
||||
Returns [code]true[/code] if changes have been made to the VisualServer's data. [method force_draw] is usually called if this happens.
|
||||
</description>
|
||||
</method>
|
||||
<method name="has_feature" qualifiers="const">
|
||||
@ -2750,13 +2739,6 @@
|
||||
To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID.
|
||||
</description>
|
||||
</method>
|
||||
<method name="sync">
|
||||
<return type="void">
|
||||
</return>
|
||||
<description>
|
||||
Not implemented in Godot 3.x.
|
||||
</description>
|
||||
</method>
|
||||
<method name="texture_2d_create">
|
||||
<return type="RID">
|
||||
</return>
|
||||
|
@ -187,19 +187,11 @@ bool SceneTreeEditor::_add_nodes(Node *p_node, TreeItem *p_parent) {
|
||||
TreeItem *item = tree->create_item(p_parent);
|
||||
|
||||
item->set_text(0, p_node->get_name());
|
||||
if (can_rename && !part_of_subscene /*(p_node->get_owner() == get_scene_node() || p_node==get_scene_node())*/)
|
||||
if (can_rename && !part_of_subscene)
|
||||
item->set_editable(0, true);
|
||||
|
||||
item->set_selectable(0, true);
|
||||
if (can_rename) {
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
if (p_node->has_meta("_editor_collapsed")) {
|
||||
//remove previous way of storing folding, which did not get along with scene inheritance and instancing
|
||||
if ((bool)p_node->get_meta("_editor_collapsed"))
|
||||
p_node->set_display_folded(true);
|
||||
p_node->set_meta("_editor_collapsed", Variant());
|
||||
}
|
||||
#endif
|
||||
bool collapsed = p_node->is_displayed_folded();
|
||||
if (collapsed)
|
||||
item->set_collapsed(true);
|
||||
@ -497,21 +489,6 @@ void SceneTreeEditor::_node_script_changed(Node *p_node) {
|
||||
|
||||
MessageQueue::get_singleton()->push_call(this, "_update_tree");
|
||||
tree_dirty = true;
|
||||
/*
|
||||
changes the order :|
|
||||
TreeItem* item=p_node?_find(tree->get_root(),p_node->get_path()):NULL;
|
||||
if (p_node->get_script().is_null()) {
|
||||
|
||||
int idx=item->get_button_by_id(0,2);
|
||||
if (idx>=0)
|
||||
item->erase_button(0,idx);
|
||||
} else {
|
||||
|
||||
int idx=item->get_button_by_id(0,2);
|
||||
if (idx<0)
|
||||
item->add_button(0,get_icon("Script","EditorIcons"),2);
|
||||
|
||||
}*/
|
||||
}
|
||||
|
||||
void SceneTreeEditor::_node_removed(Node *p_node) {
|
||||
|
@ -82,8 +82,8 @@ void ConeTwistJointBullet::set_param(PhysicsServer::ConeTwistJointParam p_param,
|
||||
case PhysicsServer::CONE_TWIST_JOINT_RELAXATION:
|
||||
coneConstraint->setLimit(coneConstraint->getSwingSpan1(), coneConstraint->getSwingSpan2(), coneConstraint->getTwistSpan(), coneConstraint->getLimitSoftness(), coneConstraint->getBiasFactor(), p_value);
|
||||
break;
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
|
||||
case PhysicsServer::CONE_TWIST_MAX:
|
||||
// Internal size value, nothing to do.
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -100,8 +100,10 @@ real_t ConeTwistJointBullet::get_param(PhysicsServer::ConeTwistJointParam p_para
|
||||
return coneConstraint->getLimitSoftness();
|
||||
case PhysicsServer::CONE_TWIST_JOINT_RELAXATION:
|
||||
return coneConstraint->getRelaxationFactor();
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
|
||||
case PhysicsServer::CONE_TWIST_MAX:
|
||||
// Internal size value, nothing to do.
|
||||
return 0;
|
||||
}
|
||||
// Compiler doesn't seem to notice that all code paths are fulfilled...
|
||||
return 0;
|
||||
}
|
||||
|
@ -173,6 +173,9 @@ void Generic6DOFJointBullet::set_param(Vector3::Axis p_axis, PhysicsServer::G6DO
|
||||
case PhysicsServer::G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT:
|
||||
sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_equilibriumPoint = p_value;
|
||||
break;
|
||||
case PhysicsServer::G6DOF_JOINT_MAX:
|
||||
// Internal size value, nothing to do.
|
||||
break;
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
|
||||
break;
|
||||
@ -214,6 +217,9 @@ real_t Generic6DOFJointBullet::get_param(Vector3::Axis p_axis, PhysicsServer::G6
|
||||
return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_springDamping;
|
||||
case PhysicsServer::G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT:
|
||||
return sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_equilibriumPoint;
|
||||
case PhysicsServer::G6DOF_JOINT_MAX:
|
||||
// Internal size value, nothing to do.
|
||||
return 0;
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
|
||||
return 0;
|
||||
@ -240,20 +246,20 @@ void Generic6DOFJointBullet::set_flag(Vector3::Axis p_axis, PhysicsServer::G6DOF
|
||||
sixDOFConstraint->setLimit(p_axis + 3, 0, -1); // Free
|
||||
}
|
||||
break;
|
||||
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING:
|
||||
sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_enableSpring = p_value;
|
||||
break;
|
||||
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING:
|
||||
sixDOFConstraint->getTranslationalLimitMotor()->m_enableSpring[p_axis] = p_value;
|
||||
break;
|
||||
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_MOTOR:
|
||||
sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_enableMotor = flags[p_axis][p_flag];
|
||||
break;
|
||||
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR:
|
||||
sixDOFConstraint->getTranslationalLimitMotor()->m_enableMotor[p_axis] = flags[p_axis][p_flag];
|
||||
break;
|
||||
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING:
|
||||
sixDOFConstraint->getTranslationalLimitMotor()->m_enableSpring[p_axis] = p_value;
|
||||
break;
|
||||
case PhysicsServer::G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING:
|
||||
sixDOFConstraint->getRotationalLimitMotor(p_axis)->m_enableSpring = p_value;
|
||||
break;
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The flag " + itos(p_flag) + " is deprecated.");
|
||||
case PhysicsServer::G6DOF_JOINT_FLAG_MAX:
|
||||
// Internal size value, nothing to do.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,9 @@ real_t HingeJointBullet::get_hinge_angle() {
|
||||
|
||||
void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t p_value) {
|
||||
switch (p_param) {
|
||||
case PhysicsServer::HINGE_JOINT_BIAS:
|
||||
WARN_DEPRECATED_MSG("The HingeJoint parameter \"bias\" is deprecated.");
|
||||
break;
|
||||
case PhysicsServer::HINGE_JOINT_LIMIT_UPPER:
|
||||
hingeConstraint->setLimit(hingeConstraint->getLowerLimit(), p_value, hingeConstraint->getLimitSoftness(), hingeConstraint->getLimitBiasFactor(), hingeConstraint->getLimitRelaxationFactor());
|
||||
break;
|
||||
@ -116,8 +119,8 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
|
||||
case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
|
||||
hingeConstraint->setMaxMotorImpulse(p_value);
|
||||
break;
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The HingeJoint parameter " + itos(p_param) + " is deprecated.");
|
||||
case PhysicsServer::HINGE_JOINT_MAX:
|
||||
// Internal size value, nothing to do.
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -125,8 +128,8 @@ void HingeJointBullet::set_param(PhysicsServer::HingeJointParam p_param, real_t
|
||||
real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const {
|
||||
switch (p_param) {
|
||||
case PhysicsServer::HINGE_JOINT_BIAS:
|
||||
WARN_DEPRECATED_MSG("The HingeJoint parameter \"bias\" is deprecated.");
|
||||
return 0;
|
||||
break;
|
||||
case PhysicsServer::HINGE_JOINT_LIMIT_UPPER:
|
||||
return hingeConstraint->getUpperLimit();
|
||||
case PhysicsServer::HINGE_JOINT_LIMIT_LOWER:
|
||||
@ -141,10 +144,12 @@ real_t HingeJointBullet::get_param(PhysicsServer::HingeJointParam p_param) const
|
||||
return hingeConstraint->getMotorTargetVelocity();
|
||||
case PhysicsServer::HINGE_JOINT_MOTOR_MAX_IMPULSE:
|
||||
return hingeConstraint->getMaxMotorImpulse();
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The HingeJoint parameter " + itos(p_param) + " is deprecated.");
|
||||
case PhysicsServer::HINGE_JOINT_MAX:
|
||||
// Internal size value, nothing to do.
|
||||
return 0;
|
||||
}
|
||||
// Compiler doesn't seem to notice that all code paths are fulfilled...
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HingeJointBullet::set_flag(PhysicsServer::HingeJointFlag p_flag, bool p_value) {
|
||||
|
@ -84,10 +84,9 @@ real_t PinJointBullet::get_param(PhysicsServer::PinJointParam p_param) const {
|
||||
return p2pConstraint->m_setting.m_damping;
|
||||
case PhysicsServer::PIN_JOINT_IMPULSE_CLAMP:
|
||||
return p2pConstraint->m_setting.m_impulseClamp;
|
||||
default:
|
||||
WARN_DEPRECATED_MSG("The parameter " + itos(p_param) + " is deprecated.");
|
||||
return 0;
|
||||
}
|
||||
// Compiler doesn't seem to notice that all code paths are fulfilled...
|
||||
return 0;
|
||||
}
|
||||
|
||||
void PinJointBullet::setPivotInA(const Vector3 &p_pos) {
|
||||
|
@ -4099,10 +4099,6 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
||||
|
||||
_ADVANCE_AND_CONSUME_NEWLINES;
|
||||
|
||||
if (tokenizer->get_token() == GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
|
||||
WARN_DEPRECATED_MSG("Exporting bit flags hint requires string constants.");
|
||||
break;
|
||||
}
|
||||
if (tokenizer->get_token() != GDScriptTokenizer::TK_COMMA) {
|
||||
_set_error("Expected \",\" in the bit flags hint.");
|
||||
return;
|
||||
|
@ -810,7 +810,7 @@ void GDScriptTokenizerText::_advance() {
|
||||
break; //wtf
|
||||
|
||||
case 'u': {
|
||||
//hexnumbarh - oct is deprecated
|
||||
// hex number
|
||||
i += 1;
|
||||
for (int j = 0; j < 4; j++) {
|
||||
CharType c = GETCHAR(i + j);
|
||||
|
@ -266,12 +266,6 @@ namespace Godot
|
||||
this[index] = value;
|
||||
}
|
||||
|
||||
[Obsolete("GetAxis is deprecated. Use GetColumn instead.")]
|
||||
public Vector3 GetAxis(int axis)
|
||||
{
|
||||
return new Vector3(this.Row0[axis], this.Row1[axis], this.Row2[axis]);
|
||||
}
|
||||
|
||||
public int GetOrthogonalIndex()
|
||||
{
|
||||
var orth = this;
|
||||
|
@ -104,33 +104,6 @@ namespace Godot
|
||||
return this / Length;
|
||||
}
|
||||
|
||||
[Obsolete("Set is deprecated. Use the Quat(" + nameof(real_t) + ", " + nameof(real_t) + ", " + nameof(real_t) + ", " + nameof(real_t) + ") constructor instead.", error: true)]
|
||||
public void Set(real_t x, real_t y, real_t z, real_t w)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.w = w;
|
||||
}
|
||||
|
||||
[Obsolete("Set is deprecated. Use the Quat(" + nameof(Quat) + ") constructor instead.", error: true)]
|
||||
public void Set(Quat q)
|
||||
{
|
||||
this = q;
|
||||
}
|
||||
|
||||
[Obsolete("SetAxisAngle is deprecated. Use the Quat(" + nameof(Vector3) + ", " + nameof(real_t) + ") constructor instead.", error: true)]
|
||||
public void SetAxisAngle(Vector3 axis, real_t angle)
|
||||
{
|
||||
this = new Quat(axis, angle);
|
||||
}
|
||||
|
||||
[Obsolete("SetEuler is deprecated. Use the Quat(" + nameof(Vector3) + ") constructor instead.", error: true)]
|
||||
public void SetEuler(Vector3 eulerYXZ)
|
||||
{
|
||||
this = new Quat(eulerYXZ);
|
||||
}
|
||||
|
||||
public Quat Slerp(Quat b, real_t t)
|
||||
{
|
||||
#if DEBUG
|
||||
|
@ -248,19 +248,6 @@ namespace Godot
|
||||
return new Vector2(Mathf.Round(x), Mathf.Round(y));
|
||||
}
|
||||
|
||||
[Obsolete("Set is deprecated. Use the Vector2(" + nameof(real_t) + ", " + nameof(real_t) + ") constructor instead.", error: true)]
|
||||
public void Set(real_t x, real_t y)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
[Obsolete("Set is deprecated. Use the Vector2(" + nameof(Vector2) + ") constructor instead.", error: true)]
|
||||
public void Set(Vector2 v)
|
||||
{
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
}
|
||||
|
||||
public Vector2 Sign()
|
||||
{
|
||||
Vector2 v;
|
||||
|
@ -270,21 +270,6 @@ namespace Godot
|
||||
return new Basis(axis, phi).Xform(this);
|
||||
}
|
||||
|
||||
[Obsolete("Set is deprecated. Use the Vector3(" + nameof(real_t) + ", " + nameof(real_t) + ", " + nameof(real_t) + ") constructor instead.", error: true)]
|
||||
public void Set(real_t x, real_t y, real_t z)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
[Obsolete("Set is deprecated. Use the Vector3(" + nameof(Vector3) + ") constructor instead.", error: true)]
|
||||
public void Set(Vector3 v)
|
||||
{
|
||||
x = v.x;
|
||||
y = v.y;
|
||||
z = v.z;
|
||||
}
|
||||
|
||||
public Vector3 Sign()
|
||||
{
|
||||
Vector3 v;
|
||||
|
@ -392,8 +392,7 @@ Error VisualScriptExpression::_get_token(Token &r_token) {
|
||||
case 'f': res = 12; break;
|
||||
case 'r': res = 13; break;
|
||||
case 'u': {
|
||||
//hexnumbarh - oct is deprecated
|
||||
|
||||
// hex number
|
||||
for (int j = 0; j < 4; j++) {
|
||||
CharType c = GET_CHAR();
|
||||
|
||||
@ -418,7 +417,7 @@ Error VisualScriptExpression::_get_token(Token &r_token) {
|
||||
v = c - 'A';
|
||||
v += 10;
|
||||
} else {
|
||||
ERR_PRINT("BUG");
|
||||
ERR_PRINT("Bug parsing hex constant.");
|
||||
v = 0;
|
||||
}
|
||||
|
||||
@ -427,13 +426,8 @@ Error VisualScriptExpression::_get_token(Token &r_token) {
|
||||
}
|
||||
|
||||
} break;
|
||||
//case '\"': res='\"'; break;
|
||||
//case '\\': res='\\'; break;
|
||||
//case '/': res='/'; break;
|
||||
default: {
|
||||
res = next;
|
||||
//r_err_str="Invalid escape sequence";
|
||||
//return ERR_PARSE_ERROR;
|
||||
} break;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
};
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1583,12 +1583,6 @@ void VisualServer::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("force_sync"), &VisualServer::sync);
|
||||
ClassDB::bind_method(D_METHOD("force_draw", "swap_buffers", "frame_step"), &VisualServer::draw, DEFVAL(true), DEFVAL(0.0));
|
||||
|
||||
// "draw" and "sync" are deprecated duplicates of "force_draw" and "force_sync"
|
||||
// FIXME: Add deprecation messages using GH-4397 once available, and retire
|
||||
// once the warnings have been enabled for a full release cycle
|
||||
ClassDB::bind_method(D_METHOD("sync"), &VisualServer::sync);
|
||||
ClassDB::bind_method(D_METHOD("draw", "swap_buffers", "frame_step"), &VisualServer::draw, DEFVAL(true), DEFVAL(0.0));
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#warning TODO all texture methods need re-binding
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user