Fix property binding hints.

This commit is contained in:
Relintai 2023-06-02 12:12:04 +02:00
parent de9da3151f
commit e3e9450882
4 changed files with 10 additions and 10 deletions

View File

@ -121,15 +121,15 @@ MMFillChannel::~MMFillChannel() {
void MMFillChannel::_bind_methods() { void MMFillChannel::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_image"), &MMFillChannel::get_image); ClassDB::bind_method(D_METHOD("get_image"), &MMFillChannel::get_image);
ClassDB::bind_method(D_METHOD("set_image", "value"), &MMFillChannel::set_image); ClassDB::bind_method(D_METHOD("set_image", "value"), &MMFillChannel::set_image);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_image", "get_image"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_image", "get_image");
ClassDB::bind_method(D_METHOD("get_input"), &MMFillChannel::get_input); ClassDB::bind_method(D_METHOD("get_input"), &MMFillChannel::get_input);
ClassDB::bind_method(D_METHOD("set_input", "value"), &MMFillChannel::set_input); ClassDB::bind_method(D_METHOD("set_input", "value"), &MMFillChannel::set_input);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_input", "get_input"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_input", "get_input");
ClassDB::bind_method(D_METHOD("get_value"), &MMFillChannel::get_value); ClassDB::bind_method(D_METHOD("get_value"), &MMFillChannel::get_value);
ClassDB::bind_method(D_METHOD("set_value", "value"), &MMFillChannel::set_value); ClassDB::bind_method(D_METHOD("set_value", "value"), &MMFillChannel::set_value);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "value", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_value", "get_value"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "value", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_value", "get_value");
ClassDB::bind_method(D_METHOD("get_channel"), &MMFillChannel::get_channel); ClassDB::bind_method(D_METHOD("get_channel"), &MMFillChannel::get_channel);
ClassDB::bind_method(D_METHOD("set_channel", "value"), &MMFillChannel::set_channel); ClassDB::bind_method(D_METHOD("set_channel", "value"), &MMFillChannel::set_channel);

View File

@ -100,11 +100,11 @@ MMFillToPosition::~MMFillToPosition() {
void MMFillToPosition::_bind_methods() { void MMFillToPosition::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_image"), &MMFillToPosition::get_image); ClassDB::bind_method(D_METHOD("get_image"), &MMFillToPosition::get_image);
ClassDB::bind_method(D_METHOD("set_image", "value"), &MMFillToPosition::set_image); ClassDB::bind_method(D_METHOD("set_image", "value"), &MMFillToPosition::set_image);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_image", "get_image"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_image", "get_image");
ClassDB::bind_method(D_METHOD("get_input"), &MMFillToPosition::get_input); ClassDB::bind_method(D_METHOD("get_input"), &MMFillToPosition::get_input);
ClassDB::bind_method(D_METHOD("set_input", "value"), &MMFillToPosition::set_input); ClassDB::bind_method(D_METHOD("set_input", "value"), &MMFillToPosition::set_input);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_input", "get_input"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_input", "get_input");
ClassDB::bind_method(D_METHOD("get_axis"), &MMFillToPosition::get_axis); ClassDB::bind_method(D_METHOD("get_axis"), &MMFillToPosition::get_axis);
ClassDB::bind_method(D_METHOD("set_axis", "value"), &MMFillToPosition::set_axis); ClassDB::bind_method(D_METHOD("set_axis", "value"), &MMFillToPosition::set_axis);

View File

@ -81,7 +81,7 @@ MMCircularGradient::~MMCircularGradient() {
void MMCircularGradient::_bind_methods() { void MMCircularGradient::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_image"), &MMCircularGradient::get_image); ClassDB::bind_method(D_METHOD("get_image"), &MMCircularGradient::get_image);
ClassDB::bind_method(D_METHOD("set_image", "value"), &MMCircularGradient::set_image); ClassDB::bind_method(D_METHOD("set_image", "value"), &MMCircularGradient::set_image);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_image", "get_image"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "image", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_image", "get_image");
ClassDB::bind_method(D_METHOD("get_repeat"), &MMCircularGradient::get_repeat); ClassDB::bind_method(D_METHOD("get_repeat"), &MMCircularGradient::get_repeat);
ClassDB::bind_method(D_METHOD("set_repeat", "value"), &MMCircularGradient::set_repeat); ClassDB::bind_method(D_METHOD("set_repeat", "value"), &MMCircularGradient::set_repeat);

View File

@ -220,19 +220,19 @@ MMSdf3dRender::~MMSdf3dRender() {
void MMSdf3dRender::_bind_methods() { void MMSdf3dRender::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_input"), &MMSdf3dRender::get_input); ClassDB::bind_method(D_METHOD("get_input"), &MMSdf3dRender::get_input);
ClassDB::bind_method(D_METHOD("set_input", "value"), &MMSdf3dRender::set_input); ClassDB::bind_method(D_METHOD("set_input", "value"), &MMSdf3dRender::set_input);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_input", "get_input"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "input", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_input", "get_input");
ClassDB::bind_method(D_METHOD("get_out_height_map"), &MMSdf3dRender::get_out_height_map); ClassDB::bind_method(D_METHOD("get_out_height_map"), &MMSdf3dRender::get_out_height_map);
ClassDB::bind_method(D_METHOD("set_out_height_map", "value"), &MMSdf3dRender::set_out_height_map); ClassDB::bind_method(D_METHOD("set_out_height_map", "value"), &MMSdf3dRender::set_out_height_map);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "out_height_map", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_out_height_map", "get_out_height_map"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "out_height_map", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_out_height_map", "get_out_height_map");
ClassDB::bind_method(D_METHOD("get_out_normal_map"), &MMSdf3dRender::get_out_normal_map); ClassDB::bind_method(D_METHOD("get_out_normal_map"), &MMSdf3dRender::get_out_normal_map);
ClassDB::bind_method(D_METHOD("set_out_normal_map", "value"), &MMSdf3dRender::set_out_normal_map); ClassDB::bind_method(D_METHOD("set_out_normal_map", "value"), &MMSdf3dRender::set_out_normal_map);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "out_normal_map", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_out_normal_map", "get_out_normal_map"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "out_normal_map", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_out_normal_map", "get_out_normal_map");
ClassDB::bind_method(D_METHOD("get_out_color_map"), &MMSdf3dRender::get_out_color_map); ClassDB::bind_method(D_METHOD("get_out_color_map"), &MMSdf3dRender::get_out_color_map);
ClassDB::bind_method(D_METHOD("set_out_color_map", "value"), &MMSdf3dRender::set_out_color_map); ClassDB::bind_method(D_METHOD("set_out_color_map", "value"), &MMSdf3dRender::set_out_color_map);
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "out_color_map", PROPERTY_HINT_RESOURCE_TYPE, "Ref<MMNodeUniversalProperty>"), "set_out_color_map", "get_out_color_map"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "out_color_map", PROPERTY_HINT_RESOURCE_TYPE, "MMNodeUniversalProperty"), "set_out_color_map", "get_out_color_map");
ClassDB::bind_method(D_METHOD("sdf3d_raymarch", "uv"), &MMSdf3dRender::sdf3d_raymarch); ClassDB::bind_method(D_METHOD("sdf3d_raymarch", "uv"), &MMSdf3dRender::sdf3d_raymarch);
ClassDB::bind_method(D_METHOD("sdf3d_normal", "p"), &MMSdf3dRender::sdf3d_normal); ClassDB::bind_method(D_METHOD("sdf3d_normal", "p"), &MMSdf3dRender::sdf3d_normal);