Fix max argument count on AnimationTrackEdit spinbox
This commit is contained in:
parent
c7b78b9538
commit
fc30f6350a
1 changed files with 4 additions and 2 deletions
|
@ -584,7 +584,8 @@ public:
|
||||||
} break;
|
} break;
|
||||||
case Animation::TYPE_METHOD: {
|
case Animation::TYPE_METHOD: {
|
||||||
p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
|
p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
|
||||||
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1"));
|
static_assert(VARIANT_ARG_MAX == 8, "PROPERTY_HINT_RANGE needs to be updated if VARIANT_ARG_MAX != 8");
|
||||||
|
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,8,1"));
|
||||||
|
|
||||||
Dictionary d = animation->track_get_key_value(track, key);
|
Dictionary d = animation->track_get_key_value(track, key);
|
||||||
ERR_FAIL_COND(!d.has("args"));
|
ERR_FAIL_COND(!d.has("args"));
|
||||||
|
@ -1247,7 +1248,8 @@ public:
|
||||||
} break;
|
} break;
|
||||||
case Animation::TYPE_METHOD: {
|
case Animation::TYPE_METHOD: {
|
||||||
p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
|
p_list->push_back(PropertyInfo(Variant::STRING_NAME, "name"));
|
||||||
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,5,1"));
|
static_assert(VARIANT_ARG_MAX == 8, "PROPERTY_HINT_RANGE needs to be updated if VARIANT_ARG_MAX != 8");
|
||||||
|
p_list->push_back(PropertyInfo(Variant::INT, "arg_count", PROPERTY_HINT_RANGE, "0,8,1"));
|
||||||
|
|
||||||
Dictionary d = animation->track_get_key_value(first_track, first_key);
|
Dictionary d = animation->track_get_key_value(first_track, first_key);
|
||||||
ERR_FAIL_COND(!d.has("args"));
|
ERR_FAIL_COND(!d.has("args"));
|
||||||
|
|
Loading…
Reference in a new issue