GLTF imports & exports material texture filters

This commit is contained in:
The Tophat Demon
2021-10-04 10:49:42 -05:00
committed by LunaticInAHat
parent 62792eeb9f
commit c1a600545c
14 changed files with 428 additions and 6 deletions

View File

@@ -33,8 +33,11 @@
void GLTFTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_src_image"), &GLTFTexture::get_src_image);
ClassDB::bind_method(D_METHOD("set_src_image", "src_image"), &GLTFTexture::set_src_image);
ClassDB::bind_method(D_METHOD("get_sampler"), &GLTFTexture::get_sampler);
ClassDB::bind_method(D_METHOD("set_sampler", "sampler"), &GLTFTexture::set_sampler);
ADD_PROPERTY(PropertyInfo(Variant::INT, "src_image"), "set_src_image", "get_src_image"); // int
ADD_PROPERTY(PropertyInfo(Variant::INT, "sampler"), "set_sampler", "get_sampler"); // int
}
GLTFImageIndex GLTFTexture::get_src_image() const {
@@ -44,3 +47,11 @@ GLTFImageIndex GLTFTexture::get_src_image() const {
void GLTFTexture::set_src_image(GLTFImageIndex val) {
src_image = val;
}
GLTFTextureSamplerIndex GLTFTexture::get_sampler() const {
return sampler;
}
void GLTFTexture::set_sampler(GLTFTextureSamplerIndex val) {
sampler = val;
}