diff options
Diffstat (limited to 'scene/3d/gi_probe.cpp')
-rw-r--r-- | scene/3d/gi_probe.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 2174f924ac..0232ce7653 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -1091,7 +1091,7 @@ void GIProbe::_plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, Baker *p_b void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) { - MeshInstance *mi = p_at_node->cast_to<MeshInstance>(); + MeshInstance *mi = Object::cast_to<MeshInstance>(p_at_node); if (mi && mi->get_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT)) { Ref<Mesh> mesh = mi->get_mesh(); if (mesh.is_valid()) { @@ -1113,9 +1113,8 @@ void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) { } } - if (p_at_node->cast_to<Spatial>()) { + if (Spatial *s = Object::cast_to<Spatial>(p_at_node)) { - Spatial *s = p_at_node->cast_to<Spatial>(); Array meshes = p_at_node->call("get_meshes"); for (int i = 0; i < meshes.size(); i += 2) { @@ -1488,10 +1487,10 @@ void GIProbe::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "compress"), "set_compress", "is_compressed"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "data", PROPERTY_HINT_RESOURCE_TYPE, "GIProbeData"), "set_probe_data", "get_probe_data"); - BIND_CONSTANT(SUBDIV_64); - BIND_CONSTANT(SUBDIV_128); - BIND_CONSTANT(SUBDIV_256); - BIND_CONSTANT(SUBDIV_MAX); + BIND_ENUM_CONSTANT(SUBDIV_64); + BIND_ENUM_CONSTANT(SUBDIV_128); + BIND_ENUM_CONSTANT(SUBDIV_256); + BIND_ENUM_CONSTANT(SUBDIV_MAX); } GIProbe::GIProbe() { |