0.2.0-dev Download ZIP
216 lines ·10.1 KB Raw
| 1 | /**************************************************************************/ |
| 2 | /* gltf_state.compat.inc */ |
| 3 | /**************************************************************************/ |
| 4 | /* This file is part of: */ |
| 5 | /* GODOT ENGINE */ |
| 6 | /* https://godotengine.org */ |
| 7 | /**************************************************************************/ |
| 8 | /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ |
| 9 | /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ |
| 10 | /* */ |
| 11 | /* Permission is hereby granted, free of charge, to any person obtaining */ |
| 12 | /* a copy of this software and associated documentation files (the */ |
| 13 | /* "Software"), to deal in the Software without restriction, including */ |
| 14 | /* without limitation the rights to use, copy, modify, merge, publish, */ |
| 15 | /* distribute, sublicense, and/or sell copies of the Software, and to */ |
| 16 | /* permit persons to whom the Software is furnished to do so, subject to */ |
| 17 | /* the following conditions: */ |
| 18 | /* */ |
| 19 | /* The above copyright notice and this permission notice shall be */ |
| 20 | /* included in all copies or substantial portions of the Software. */ |
| 21 | /* */ |
| 22 | /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ |
| 23 | /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ |
| 24 | /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ |
| 25 | /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ |
| 26 | /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ |
| 27 | /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ |
| 28 | /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ |
| 29 | /**************************************************************************/ |
| 30 | |
| 31 | #ifndef DISABLE_DEPRECATED |
| 32 | |
| 33 | #include "gltf_state.h" |
| 34 | |
| 35 | #include "core/object/class_db.h" |
| 36 | |
| 37 | // Non-const getters for compatibility. |
| 38 | int32_t GLTFState::_get_handle_binary_image_bind_compat_113172() { |
| 39 | return get_handle_binary_image(); |
| 40 | } |
| 41 | |
| 42 | Dictionary GLTFState::_get_json_bind_compat_113172() { |
| 43 | return get_json(); |
| 44 | } |
| 45 | |
| 46 | int GLTFState::_get_major_version_bind_compat_113172() { |
| 47 | return get_major_version(); |
| 48 | } |
| 49 | |
| 50 | int GLTFState::_get_minor_version_bind_compat_113172() { |
| 51 | return get_minor_version(); |
| 52 | } |
| 53 | |
| 54 | Vector<uint8_t> GLTFState::_get_glb_data_bind_compat_113172() { |
| 55 | return get_glb_data(); |
| 56 | } |
| 57 | |
| 58 | bool GLTFState::_get_use_named_skin_binds_bind_compat_113172() { |
| 59 | return get_use_named_skin_binds(); |
| 60 | } |
| 61 | |
| 62 | bool GLTFState::_get_discard_meshes_and_materials_bind_compat_113172() { |
| 63 | return get_discard_meshes_and_materials(); |
| 64 | } |
| 65 | |
| 66 | TypedArray<GLTFNode> GLTFState::_get_nodes_bind_compat_113172() { |
| 67 | return get_nodes_bind(); |
| 68 | } |
| 69 | |
| 70 | TypedArray<PackedByteArray> GLTFState::_get_buffers_bind_compat_113172() { |
| 71 | return get_buffers_bind(); |
| 72 | } |
| 73 | |
| 74 | TypedArray<GLTFBufferView> GLTFState::_get_buffer_views_bind_compat_113172() { |
| 75 | return get_buffer_views_bind(); |
| 76 | } |
| 77 | |
| 78 | TypedArray<GLTFAccessor> GLTFState::_get_accessors_bind_compat_113172() { |
| 79 | return get_accessors_bind(); |
| 80 | } |
| 81 | |
| 82 | TypedArray<GLTFMesh> GLTFState::_get_meshes_bind_compat_113172() { |
| 83 | return get_meshes_bind(); |
| 84 | } |
| 85 | |
| 86 | TypedArray<Material> GLTFState::_get_materials_bind_compat_113172() { |
| 87 | return get_materials_bind(); |
| 88 | } |
| 89 | |
| 90 | String GLTFState::_get_scene_name_bind_compat_113172() { |
| 91 | return get_scene_name(); |
| 92 | } |
| 93 | |
| 94 | String GLTFState::_get_base_path_bind_compat_113172() { |
| 95 | return get_base_path(); |
| 96 | } |
| 97 | |
| 98 | String GLTFState::_get_extract_path_bind_compat_113172() { |
| 99 | return get_extract_path(); |
| 100 | } |
| 101 | |
| 102 | String GLTFState::_get_extract_prefix_bind_compat_113172() { |
| 103 | return get_extract_prefix(); |
| 104 | } |
| 105 | |
| 106 | PackedInt32Array GLTFState::_get_root_nodes_bind_compat_113172() { |
| 107 | return get_root_nodes(); |
| 108 | } |
| 109 | |
| 110 | TypedArray<GLTFTexture> GLTFState::_get_textures_bind_compat_113172() { |
| 111 | return get_textures_bind(); |
| 112 | } |
| 113 | |
| 114 | TypedArray<GLTFTextureSampler> GLTFState::_get_texture_samplers_bind_compat_113172() { |
| 115 | return get_texture_samplers_bind(); |
| 116 | } |
| 117 | |
| 118 | TypedArray<Texture2D> GLTFState::_get_images_bind_compat_113172() { |
| 119 | return get_images_bind(); |
| 120 | } |
| 121 | |
| 122 | TypedArray<GLTFSkin> GLTFState::_get_skins_bind_compat_113172() { |
| 123 | return get_skins_bind(); |
| 124 | } |
| 125 | |
| 126 | TypedArray<GLTFCamera> GLTFState::_get_cameras_bind_compat_113172() { |
| 127 | return get_cameras_bind(); |
| 128 | } |
| 129 | |
| 130 | TypedArray<GLTFLight> GLTFState::_get_lights_bind_compat_113172() { |
| 131 | return get_lights_bind(); |
| 132 | } |
| 133 | |
| 134 | TypedArray<String> GLTFState::_get_unique_names_bind_compat_113172() { |
| 135 | return get_unique_names_bind(); |
| 136 | } |
| 137 | |
| 138 | TypedArray<String> GLTFState::_get_unique_animation_names_bind_compat_113172() { |
| 139 | return get_unique_animation_names_bind(); |
| 140 | } |
| 141 | |
| 142 | TypedArray<GLTFSkeleton> GLTFState::_get_skeletons_bind_compat_113172() { |
| 143 | return get_skeletons_bind(); |
| 144 | } |
| 145 | |
| 146 | bool GLTFState::_get_create_animations_bind_compat_113172() { |
| 147 | return get_create_animations(); |
| 148 | } |
| 149 | |
| 150 | bool GLTFState::_get_import_as_skeleton_bones_bind_compat_113172() { |
| 151 | return get_import_as_skeleton_bones(); |
| 152 | } |
| 153 | |
| 154 | TypedArray<GLTFAnimation> GLTFState::_get_animations_bind_compat_113172() { |
| 155 | return get_animations_bind(); |
| 156 | } |
| 157 | |
| 158 | Node *GLTFState::_get_scene_node_bind_compat_113172(GLTFNodeIndex p_gltf_node_index) { |
| 159 | return get_scene_node(p_gltf_node_index); |
| 160 | } |
| 161 | |
| 162 | GLTFNodeIndex GLTFState::_get_node_index_bind_compat_113172(Node *p_node) { |
| 163 | return get_node_index(p_node); |
| 164 | } |
| 165 | |
| 166 | int GLTFState::_get_animation_players_count_bind_compat_113172(int p_anim_player_index) { |
| 167 | return get_animation_players_count(p_anim_player_index); |
| 168 | } |
| 169 | |
| 170 | AnimationPlayer *GLTFState::_get_animation_player_bind_compat_113172(int p_anim_player_index) { |
| 171 | return get_animation_player(p_anim_player_index); |
| 172 | } |
| 173 | |
| 174 | Variant GLTFState::_get_additional_data_bind_compat_113172(const StringName &p_extension_name) { |
| 175 | return get_additional_data(p_extension_name); |
| 176 | } |
| 177 | |
| 178 | void GLTFState::_bind_compatibility_methods() { |
| 179 | ClassDB::bind_compatibility_method(D_METHOD("get_handle_binary_image"), &GLTFState::_get_handle_binary_image_bind_compat_113172); |
| 180 | ClassDB::bind_compatibility_method(D_METHOD("get_json"), &GLTFState::_get_json_bind_compat_113172); |
| 181 | ClassDB::bind_compatibility_method(D_METHOD("get_major_version"), &GLTFState::_get_major_version_bind_compat_113172); |
| 182 | ClassDB::bind_compatibility_method(D_METHOD("get_minor_version"), &GLTFState::_get_minor_version_bind_compat_113172); |
| 183 | ClassDB::bind_compatibility_method(D_METHOD("get_glb_data"), &GLTFState::_get_glb_data_bind_compat_113172); |
| 184 | ClassDB::bind_compatibility_method(D_METHOD("get_use_named_skin_binds"), &GLTFState::_get_use_named_skin_binds_bind_compat_113172); |
| 185 | ClassDB::bind_compatibility_method(D_METHOD("get_discard_meshes_and_materials"), &GLTFState::_get_discard_meshes_and_materials_bind_compat_113172); |
| 186 | ClassDB::bind_compatibility_method(D_METHOD("get_nodes"), &GLTFState::_get_nodes_bind_compat_113172); |
| 187 | ClassDB::bind_compatibility_method(D_METHOD("get_buffers"), &GLTFState::_get_buffers_bind_compat_113172); |
| 188 | ClassDB::bind_compatibility_method(D_METHOD("get_buffer_views"), &GLTFState::_get_buffer_views_bind_compat_113172); |
| 189 | ClassDB::bind_compatibility_method(D_METHOD("get_accessors"), &GLTFState::_get_accessors_bind_compat_113172); |
| 190 | ClassDB::bind_compatibility_method(D_METHOD("get_meshes"), &GLTFState::_get_meshes_bind_compat_113172); |
| 191 | ClassDB::bind_compatibility_method(D_METHOD("get_materials"), &GLTFState::_get_materials_bind_compat_113172); |
| 192 | ClassDB::bind_compatibility_method(D_METHOD("get_scene_name"), &GLTFState::_get_scene_name_bind_compat_113172); |
| 193 | ClassDB::bind_compatibility_method(D_METHOD("get_base_path"), &GLTFState::_get_base_path_bind_compat_113172); |
| 194 | ClassDB::bind_compatibility_method(D_METHOD("get_extract_path"), &GLTFState::_get_extract_path_bind_compat_113172); |
| 195 | ClassDB::bind_compatibility_method(D_METHOD("get_extract_prefix"), &GLTFState::_get_extract_prefix_bind_compat_113172); |
| 196 | ClassDB::bind_compatibility_method(D_METHOD("get_root_nodes"), &GLTFState::_get_root_nodes_bind_compat_113172); |
| 197 | ClassDB::bind_compatibility_method(D_METHOD("get_textures"), &GLTFState::_get_textures_bind_compat_113172); |
| 198 | ClassDB::bind_compatibility_method(D_METHOD("get_texture_samplers"), &GLTFState::_get_texture_samplers_bind_compat_113172); |
| 199 | ClassDB::bind_compatibility_method(D_METHOD("get_images"), &GLTFState::_get_images_bind_compat_113172); |
| 200 | ClassDB::bind_compatibility_method(D_METHOD("get_skins"), &GLTFState::_get_skins_bind_compat_113172); |
| 201 | ClassDB::bind_compatibility_method(D_METHOD("get_cameras"), &GLTFState::_get_cameras_bind_compat_113172); |
| 202 | ClassDB::bind_compatibility_method(D_METHOD("get_lights"), &GLTFState::_get_lights_bind_compat_113172); |
| 203 | ClassDB::bind_compatibility_method(D_METHOD("get_unique_names"), &GLTFState::_get_unique_names_bind_compat_113172); |
| 204 | ClassDB::bind_compatibility_method(D_METHOD("get_unique_animation_names"), &GLTFState::_get_unique_animation_names_bind_compat_113172); |
| 205 | ClassDB::bind_compatibility_method(D_METHOD("get_skeletons"), &GLTFState::_get_skeletons_bind_compat_113172); |
| 206 | ClassDB::bind_compatibility_method(D_METHOD("get_create_animations"), &GLTFState::_get_create_animations_bind_compat_113172); |
| 207 | ClassDB::bind_compatibility_method(D_METHOD("get_import_as_skeleton_bones"), &GLTFState::_get_import_as_skeleton_bones_bind_compat_113172); |
| 208 | ClassDB::bind_compatibility_method(D_METHOD("get_animations"), &GLTFState::_get_animations_bind_compat_113172); |
| 209 | ClassDB::bind_compatibility_method(D_METHOD("get_scene_node", "idx"), &GLTFState::_get_scene_node_bind_compat_113172); |
| 210 | ClassDB::bind_compatibility_method(D_METHOD("get_node_index", "node"), &GLTFState::_get_node_index_bind_compat_113172); |
| 211 | ClassDB::bind_compatibility_method(D_METHOD("get_animation_players_count", "idx"), &GLTFState::_get_animation_players_count_bind_compat_113172); |
| 212 | ClassDB::bind_compatibility_method(D_METHOD("get_animation_player", "idx"), &GLTFState::_get_animation_player_bind_compat_113172); |
| 213 | ClassDB::bind_compatibility_method(D_METHOD("get_additional_data", "extension_name"), &GLTFState::_get_additional_data_bind_compat_113172); |
| 214 | } |
| 215 | |
| 216 | #endif // DISABLE_DEPRECATED |