Fix method bindings in FBXDocument by making them virtual in GLTFDocument.

This commit is contained in:
Lyuma 2024-03-15 12:22:39 -07:00
parent 68ad520da4
commit 8232759100
3 changed files with 13 additions and 14 deletions

View File

@ -2347,7 +2347,7 @@ PackedByteArray FBXDocument::generate_buffer(Ref<GLTFState> p_state) {
return PackedByteArray();
}
Error write_to_filesystem(Ref<GLTFState> p_state, const String &p_path) {
Error FBXDocument::write_to_filesystem(Ref<GLTFState> p_state, const String &p_path) {
return ERR_UNAVAILABLE;
}

View File

@ -53,14 +53,13 @@ public:
static String _gen_unique_name(HashSet<String> &unique_names, const String &p_name);
public:
Error append_from_file(String p_path, Ref<GLTFState> p_state, uint32_t p_flags = 0, String p_base_path = String());
Error append_from_buffer(PackedByteArray p_bytes, String p_base_path, Ref<GLTFState> p_state, uint32_t p_flags = 0);
Error append_from_scene(Node *p_node, Ref<GLTFState> p_state, uint32_t p_flags = 0);
Error append_from_file(String p_path, Ref<GLTFState> p_state, uint32_t p_flags = 0, String p_base_path = String()) override;
Error append_from_buffer(PackedByteArray p_bytes, String p_base_path, Ref<GLTFState> p_state, uint32_t p_flags = 0) override;
Error append_from_scene(Node *p_node, Ref<GLTFState> p_state, uint32_t p_flags = 0) override;
public:
Node *generate_scene(Ref<GLTFState> p_state, float p_bake_fps = 30.0f, bool p_trimming = false, bool p_remove_immutable_tracks = true);
PackedByteArray generate_buffer(Ref<GLTFState> p_state);
Error write_to_filesystem(Ref<GLTFState> p_state, const String &p_path);
Node *generate_scene(Ref<GLTFState> p_state, float p_bake_fps = 30.0f, bool p_trimming = false, bool p_remove_immutable_tracks = true) override;
PackedByteArray generate_buffer(Ref<GLTFState> p_state) override;
Error write_to_filesystem(Ref<GLTFState> p_state, const String &p_path) override;
protected:
static void _bind_methods();

View File

@ -311,13 +311,13 @@ private:
static float get_max_component(const Color &p_color);
public:
Error append_from_file(String p_path, Ref<GLTFState> p_state, uint32_t p_flags = 0, String p_base_path = String());
Error append_from_buffer(PackedByteArray p_bytes, String p_base_path, Ref<GLTFState> p_state, uint32_t p_flags = 0);
Error append_from_scene(Node *p_node, Ref<GLTFState> p_state, uint32_t p_flags = 0);
virtual Error append_from_file(String p_path, Ref<GLTFState> p_state, uint32_t p_flags = 0, String p_base_path = String());
virtual Error append_from_buffer(PackedByteArray p_bytes, String p_base_path, Ref<GLTFState> p_state, uint32_t p_flags = 0);
virtual Error append_from_scene(Node *p_node, Ref<GLTFState> p_state, uint32_t p_flags = 0);
Node *generate_scene(Ref<GLTFState> p_state, float p_bake_fps = 30.0f, bool p_trimming = false, bool p_remove_immutable_tracks = true);
PackedByteArray generate_buffer(Ref<GLTFState> p_state);
Error write_to_filesystem(Ref<GLTFState> p_state, const String &p_path);
virtual Node *generate_scene(Ref<GLTFState> p_state, float p_bake_fps = 30.0f, bool p_trimming = false, bool p_remove_immutable_tracks = true);
virtual PackedByteArray generate_buffer(Ref<GLTFState> p_state);
virtual Error write_to_filesystem(Ref<GLTFState> p_state, const String &p_path);
public:
Error _parse_gltf_state(Ref<GLTFState> p_state, const String &p_search_path);