#include #include #include class CompoundTransvoxel: public VoxelMesherTransvoxel { GDCLASS(CompoundTransvoxel, VoxelMesherTransvoxel) friend class CompoundTransvoxelInspector; protected: struct place_item { Ref scene; String scene_path; bool full_instance; bool use_collision; int priority; }; List items; public: CompoundTransvoxel(); ~CompoundTransvoxel(); void build(VoxelMesher::Output &output, const VoxelMesher::Input &input) override; Ref duplicate(bool p_subresources = false) const override; int get_used_channels_mask() const override; protected: static void _bind_methods(); }; class CompoundTransvoxelInspector: public EditorInspectorPlugin { GDCLASS(CompoundTransvoxelInspector, EditorInspectorPlugin) public: virtual bool can_handle(Object *p_object); CompoundTransvoxelInspector(); private: EditorFileDialog *fd; protected: void open_scene(Object *button); void scenes_selected(const PoolVector &p_paths); void parse_begin(Object *p_object); static void _bind_methods(); }; class CompoundTransvoxelEditorPlugin : public EditorPlugin { GDCLASS(CompoundTransvoxelEditorPlugin, EditorPlugin) public: virtual String get_name() const { return "CompoundTransvoxel"; } CompoundTransvoxelEditorPlugin(EditorNode *p_node) { Ref plugin; plugin.instance(); add_inspector_plugin(plugin); } };