Clamp GradientTexture2D dimensions to 2048×2048 in the inspector
Larger sizes take up a lot of memory for little visual benefit. They also take a while to initialize, which makes the inspector slow to refresh when the texture needs to be regenerated.
This commit is contained in:
parent
ffa566c770
commit
34d382eab6
1 changed files with 2 additions and 2 deletions
|
@ -2103,8 +2103,8 @@ void GradientTexture2D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("_update"), &GradientTexture2D::_update);
|
||||
|
||||
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,2048,1,or_greater"), "set_width", "get_width");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "height", PROPERTY_HINT_RANGE, "1,2048,1,or_greater"), "set_height", "get_height");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "width", PROPERTY_HINT_RANGE, "1,2048"), "set_width", "get_width");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "height", PROPERTY_HINT_RANGE, "1,2048"), "set_height", "get_height");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_hdr"), "set_use_hdr", "is_using_hdr");
|
||||
|
||||
ADD_GROUP("Fill", "fill_");
|
||||
|
|
Loading…
Reference in a new issue