|
@@ -58,7 +58,6 @@ void NoiseTexture::_bind_methods() {
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_width", "width"), &NoiseTexture::set_width);
|
|
|
ClassDB::bind_method(D_METHOD("set_height", "height"), &NoiseTexture::set_height);
|
|
|
- ClassDB::bind_method(D_METHOD("set_size", "size"), &NoiseTexture::set_size);
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("set_noise", "noise"), &NoiseTexture::set_noise);
|
|
|
ClassDB::bind_method(D_METHOD("get_noise"), &NoiseTexture::get_noise);
|
|
@@ -73,7 +72,8 @@ void NoiseTexture::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("_generate_texture"), &NoiseTexture::_generate_texture);
|
|
|
ClassDB::bind_method(D_METHOD("_thread_done", "image"), &NoiseTexture::_thread_done);
|
|
|
|
|
|
- ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size");
|
|
|
+ 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::BOOL, "seamless"), "set_seamless", "get_seamless");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "as_normalmap"), "set_as_normalmap", "is_normalmap");
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "OpenSimplexNoise"), "set_noise", "get_noise");
|
|
@@ -208,17 +208,6 @@ bool NoiseTexture::is_normalmap() {
|
|
|
return as_normalmap;
|
|
|
}
|
|
|
|
|
|
-void NoiseTexture::set_size(Vector2 p_size) {
|
|
|
- if (p_size == size) return;
|
|
|
- size = p_size;
|
|
|
- _queue_update();
|
|
|
-}
|
|
|
-
|
|
|
-Vector2 NoiseTexture::get_size() {
|
|
|
-
|
|
|
- return size;
|
|
|
-}
|
|
|
-
|
|
|
int NoiseTexture::get_width() const {
|
|
|
|
|
|
return size.x;
|