Fix compilation

- Node was not declared anymore in header
- Cannot implicitely cast Variant to Node* anymore
This commit is contained in:
Marc Gilleron 2022-01-30 15:21:59 +00:00
parent 771992c274
commit 1631e186b5
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,8 @@
#include "voxel_tool.h"
class Node;
namespace zylann::voxel {
class VoxelLodTerrain;

View File

@ -53,7 +53,7 @@ void VoxelGraphEditorPlugin::edit(Object *p_object) {
VoxelNode *voxel_node = nullptr;
Array selected_nodes = get_editor_interface()->get_selection()->get_selected_nodes();
for (int i = 0; i < selected_nodes.size(); ++i) {
Node *node = selected_nodes[i];
Node *node = Object::cast_to<Node>(selected_nodes[i]);
ERR_FAIL_COND(node == nullptr);
VoxelNode *vn = Object::cast_to<VoxelNode>(node);
if (vn != nullptr && vn->get_generator() == graph_ptr) {