Variant: Sync docs with new constructors, fixups after #43403

Change DocData comparators for MethodDoc and ArgumentDoc to get a better
ordering of constructors.
This commit is contained in:
Rémi Verschelde 2020-11-09 17:46:03 +01:00
parent efc4d217d6
commit 0f249f5c0a
No known key found for this signature in database
GPG key ID: C3336907360768E1
45 changed files with 764 additions and 647 deletions

View file

@ -292,7 +292,7 @@ public:
}
static Variant::Type get_base_type() {
return Variant::CALLABLE;
return Variant::SIGNAL;
}
};
@ -569,10 +569,12 @@ void Variant::_register_variant_constructors() {
add_constructor<VariantConstructNoArgs<int64_t>>(sarray());
add_constructor<VariantConstructor<int64_t, int64_t>>(sarray("from"));
add_constructor<VariantConstructor<int64_t, double>>(sarray("from"));
add_constructor<VariantConstructor<int64_t, bool>>(sarray("from"));
add_constructor<VariantConstructNoArgs<double>>(sarray());
add_constructor<VariantConstructor<double, double>>(sarray("from"));
add_constructor<VariantConstructor<double, int64_t>>(sarray("from"));
add_constructor<VariantConstructor<double, bool>>(sarray("from"));
add_constructor<VariantConstructNoArgs<String>>(sarray());
add_constructor<VariantConstructor<String, String>>(sarray("from"));
@ -613,13 +615,15 @@ void Variant::_register_variant_constructors() {
add_constructor<VariantConstructNoArgs<Transform2D>>(sarray());
add_constructor<VariantConstructor<Transform2D, Transform2D>>(sarray("from"));
add_constructor<VariantConstructor<Transform2D, Vector2, Vector2, Vector2>>(sarray("x", "y", "origin"));
add_constructor<VariantConstructor<Transform2D, float, Vector2>>(sarray("rotation", "position"));
add_constructor<VariantConstructor<Transform2D, Vector2, Vector2, Vector2>>(sarray("x_axis", "y_axis", "origin"));
add_constructor<VariantConstructNoArgs<Plane>>(sarray());
add_constructor<VariantConstructor<Plane, Plane>>(sarray("from"));
add_constructor<VariantConstructor<Plane, Vector3, double>>(sarray("normal", "d"));
add_constructor<VariantConstructor<Plane, Vector3, Vector3>>(sarray("point", "normal"));
add_constructor<VariantConstructor<Plane, Vector3, Vector3, Vector3>>(sarray("point1", "point2", "point3"));
add_constructor<VariantConstructor<Plane, double, double, double, double>>(sarray("a", "b", "c", "d"));
add_constructor<VariantConstructNoArgs<Quat>>(sarray());
add_constructor<VariantConstructor<Quat, Quat>>(sarray("from"));
@ -627,6 +631,7 @@ void Variant::_register_variant_constructors() {
add_constructor<VariantConstructor<Quat, Vector3>>(sarray("euler"));
add_constructor<VariantConstructor<Quat, Vector3, double>>(sarray("axis", "angle"));
add_constructor<VariantConstructor<Quat, Vector3, Vector3>>(sarray("arc_from", "arc_to"));
add_constructor<VariantConstructor<Quat, double, double, double, double>>(sarray("x", "y", "z", "w"));
add_constructor<VariantConstructNoArgs<::AABB>>(sarray());
add_constructor<VariantConstructor<::AABB, ::AABB>>(sarray("from"));
@ -635,14 +640,20 @@ void Variant::_register_variant_constructors() {
add_constructor<VariantConstructNoArgs<Basis>>(sarray());
add_constructor<VariantConstructor<Basis, Basis>>(sarray("from"));
add_constructor<VariantConstructor<Basis, Quat>>(sarray("from"));
add_constructor<VariantConstructor<Basis, Vector3, Vector3, Vector3>>(sarray("x", "y", "z"));
add_constructor<VariantConstructor<Basis, Vector3>>(sarray("euler"));
add_constructor<VariantConstructor<Basis, Vector3, double>>(sarray("axis", "phi"));
add_constructor<VariantConstructor<Basis, Vector3, Vector3, Vector3>>(sarray("x_axis", "y_axis", "z_axis"));
add_constructor<VariantConstructNoArgs<Transform>>(sarray());
add_constructor<VariantConstructor<Transform, Transform>>(sarray("from"));
add_constructor<VariantConstructor<Transform, Basis, Vector3>>(sarray("basis", "origin"));
add_constructor<VariantConstructor<Transform, Vector3, Vector3, Vector3, Vector3>>(sarray("x_axis", "y_axis", "z_axis", "origin"));
add_constructor<VariantConstructNoArgs<Color>>(sarray());
add_constructor<VariantConstructor<Color, Color>>(sarray("from"));
add_constructor<VariantConstructor<Color, Color, double>>(sarray("from", "alpha"));
add_constructor<VariantConstructor<Color, double, double, double>>(sarray("r", "g", "b"));
add_constructor<VariantConstructor<Color, double, double, double, double>>(sarray("r", "g", "b", "a"));
add_constructor<VariantConstructNoArgs<StringName>>(sarray());
add_constructor<VariantConstructor<StringName, StringName>>(sarray("from"));