From c6316bff65c92d4a9a4b06ca801082d431b35b37 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Wed, 24 Jan 2024 10:14:22 -0800 Subject: [PATCH] Avoid saving the texture_rd_rid property of TextureRD resources RIDs do not persist between runs, so they should not be saved --- doc/classes/Texture2DRD.xml | 2 +- doc/classes/Texture3DRD.xml | 2 +- doc/classes/TextureLayeredRD.xml | 2 +- scene/resources/texture_rd.cpp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/classes/Texture2DRD.xml b/doc/classes/Texture2DRD.xml index b935a7763b5..fe3a8a32134 100644 --- a/doc/classes/Texture2DRD.xml +++ b/doc/classes/Texture2DRD.xml @@ -10,7 +10,7 @@ - + The RID of the texture object created on the [RenderingDevice]. diff --git a/doc/classes/Texture3DRD.xml b/doc/classes/Texture3DRD.xml index f9d72b7a0fb..38cd454bec3 100644 --- a/doc/classes/Texture3DRD.xml +++ b/doc/classes/Texture3DRD.xml @@ -9,7 +9,7 @@ - + The RID of the texture object created on the [RenderingDevice]. diff --git a/doc/classes/TextureLayeredRD.xml b/doc/classes/TextureLayeredRD.xml index 65f2d876244..c3de7f69137 100644 --- a/doc/classes/TextureLayeredRD.xml +++ b/doc/classes/TextureLayeredRD.xml @@ -9,7 +9,7 @@ - + The RID of the texture object created on the [RenderingDevice]. diff --git a/scene/resources/texture_rd.cpp b/scene/resources/texture_rd.cpp index 6f25af68639..49e13824a93 100644 --- a/scene/resources/texture_rd.cpp +++ b/scene/resources/texture_rd.cpp @@ -37,7 +37,7 @@ void Texture2DRD::_bind_methods() { ClassDB::bind_method(D_METHOD("set_texture_rd_rid", "texture_rd_rid"), &Texture2DRD::set_texture_rd_rid); ClassDB::bind_method(D_METHOD("get_texture_rd_rid"), &Texture2DRD::get_texture_rd_rid); - ADD_PROPERTY(PropertyInfo(Variant::RID, "texture_rd_rid"), "set_texture_rd_rid", "get_texture_rd_rid"); + ADD_PROPERTY(PropertyInfo(Variant::RID, "texture_rd_rid", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_texture_rd_rid", "get_texture_rd_rid"); } int Texture2DRD::get_width() const { @@ -128,7 +128,7 @@ void TextureLayeredRD::_bind_methods() { ClassDB::bind_method(D_METHOD("set_texture_rd_rid", "texture_rd_rid"), &TextureLayeredRD::set_texture_rd_rid); ClassDB::bind_method(D_METHOD("get_texture_rd_rid"), &TextureLayeredRD::get_texture_rd_rid); - ADD_PROPERTY(PropertyInfo(Variant::RID, "texture_rd_rid"), "set_texture_rd_rid", "get_texture_rd_rid"); + ADD_PROPERTY(PropertyInfo(Variant::RID, "texture_rd_rid", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_texture_rd_rid", "get_texture_rd_rid"); } TextureLayered::LayeredType TextureLayeredRD::get_layered_type() const { @@ -255,7 +255,7 @@ void Texture3DRD::_bind_methods() { ClassDB::bind_method(D_METHOD("set_texture_rd_rid", "texture_rd_rid"), &Texture3DRD::set_texture_rd_rid); ClassDB::bind_method(D_METHOD("get_texture_rd_rid"), &Texture3DRD::get_texture_rd_rid); - ADD_PROPERTY(PropertyInfo(Variant::RID, "texture_rd_rid"), "set_texture_rd_rid", "get_texture_rd_rid"); + ADD_PROPERTY(PropertyInfo(Variant::RID, "texture_rd_rid", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_texture_rd_rid", "get_texture_rd_rid"); } Image::Format Texture3DRD::get_format() const {