summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorHendrik Brucker <hendrik.brucker@mail.de>2022-07-17 04:04:57 +0200
committerHendrik Brucker <hendrik.brucker@mail.de>2022-07-17 04:04:57 +0200
commit655e2935cfce67c33a91bf9de849505e0a3d303f (patch)
tree3ca3f28cbde564fbd5517ed16f0d851ed57efd2a /scene
parente3a8ab68ce7497b3752d29965c6a54c50d548144 (diff)
Automatically create a Gradient resource when creating a GradientTexture1D
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/texture.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 8c175e9ced..3a8f50c3c3 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -2157,7 +2157,7 @@ void GradientTexture1D::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update"), &GradientTexture1D::_update);
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_gradient", "get_gradient");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "Gradient", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT), "set_gradient", "get_gradient");
ADD_PROPERTY(PropertyInfo(Variant::INT, "width", PROPERTY_HINT_RANGE, "1,16384,suffix:px"), "set_width", "get_width");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_hdr"), "set_use_hdr", "is_using_hdr");
}