Expose Curve points in the inspector
Exposes the Curve, Curve2D and Curve3D points as an array property.
This commit is contained in:
parent
0ba0d51c9e
commit
a9a41df0c8
5 changed files with 280 additions and 19 deletions
|
|
@ -76,6 +76,8 @@ public:
|
|||
|
||||
int get_point_count() const { return _points.size(); }
|
||||
|
||||
void set_point_count(int p_count);
|
||||
|
||||
int add_point(Vector2 p_position,
|
||||
real_t left_tangent = 0,
|
||||
real_t right_tangent = 0,
|
||||
|
|
@ -126,6 +128,10 @@ public:
|
|||
|
||||
void ensure_default_setup(real_t p_min, real_t p_max);
|
||||
|
||||
bool _set(const StringName &p_name, const Variant &p_value);
|
||||
bool _get(const StringName &p_name, Variant &r_ret) const;
|
||||
void _get_property_list(List<PropertyInfo> *p_list) const;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
|
|
@ -174,11 +180,16 @@ class Curve2D : public Resource {
|
|||
Dictionary _get_data() const;
|
||||
void _set_data(const Dictionary &p_data);
|
||||
|
||||
bool _set(const StringName &p_name, const Variant &p_value);
|
||||
bool _get(const StringName &p_name, Variant &r_ret) const;
|
||||
void _get_property_list(List<PropertyInfo> *p_list) const;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
int get_point_count() const;
|
||||
void set_point_count(int p_count);
|
||||
void add_point(const Vector2 &p_position, const Vector2 &p_in = Vector2(), const Vector2 &p_out = Vector2(), int p_atpos = -1);
|
||||
void set_point_position(int p_index, const Vector2 &p_position);
|
||||
Vector2 get_point_position(int p_index) const;
|
||||
|
|
@ -241,11 +252,16 @@ class Curve3D : public Resource {
|
|||
Dictionary _get_data() const;
|
||||
void _set_data(const Dictionary &p_data);
|
||||
|
||||
bool _set(const StringName &p_name, const Variant &p_value);
|
||||
bool _get(const StringName &p_name, Variant &r_ret) const;
|
||||
void _get_property_list(List<PropertyInfo> *p_list) const;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
int get_point_count() const;
|
||||
void set_point_count(int p_count);
|
||||
void add_point(const Vector3 &p_position, const Vector3 &p_in = Vector3(), const Vector3 &p_out = Vector3(), int p_atpos = -1);
|
||||
void set_point_position(int p_index, const Vector3 &p_position);
|
||||
Vector3 get_point_position(int p_index) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue