Make _validate_property a multilevel method
This commit is contained in:
@ -245,14 +245,14 @@ bool PathFollow2D::get_cubic_interpolation() const {
|
||||
return cubic;
|
||||
}
|
||||
|
||||
void PathFollow2D::_validate_property(PropertyInfo &property) const {
|
||||
if (property.name == "offset") {
|
||||
void PathFollow2D::_validate_property(PropertyInfo &p_property) const {
|
||||
if (p_property.name == "offset") {
|
||||
real_t max = 10000.0;
|
||||
if (path && path->get_curve().is_valid()) {
|
||||
max = path->get_curve()->get_baked_length();
|
||||
}
|
||||
|
||||
property.hint_string = "0," + rtos(max) + ",0.01,or_lesser,or_greater";
|
||||
p_property.hint_string = "0," + rtos(max) + ",0.01,or_lesser,or_greater";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user